I created this little hack that might prove useful for others:
add_action('frm_after_update_entry', 'after_entry_updated', 50, 2); function after_entry_updated($entry_id, $form_id){ global $wpdb; $status = $wpdb->get_var("SELECT id FROM {$wpdb->prefix}frm_fields WHERE field_key='abcdefg'"); // Replace abcdefg with your status field key $publish = FrmProEntriesController::get_field_value_shortcode(array('field_id' => $status, 'entry_id' => $entry_id)); if ( $form_id == 123 && $publish == 'pending' ) {//Replace 123 with your form ID FrmFormActionsController::trigger_actions( 'create', $form_id, $entry_id, 'paypal' ); add_action('frm_after_update_entry', 'FrmPaymentsController::redirect_for_payment', 51, 2); } }
On my form, the Submit Button includes the price in the custom HTML. If someone submits a form, but doesn't pay, the button shows 'Update' when editing the form. It would be great if someone could add to this script so the Submit Button only shows 'Update' only after payment is made.
Update: This script appears to have stopped working since the last round of WP core and plugin updates. Does anyone see anything that would have changed recently and should be updated in the script above?