gravityflow_post_process_workflow

Description

The gravityflow_post_process_workflow action allows the trigger custom logic at the conclusion of any workflow step.

Note: If you want your action to only fire when the workflow is complete, use gravityflow_workflow_complete

ParameterTypeDetails
$formFormThe current form.
$entry_idIntegerThe ID of the current entry.
$step_idIntegerThe ID of the current step.
$starting_step_idIntegerThe ID of the step about to start.

Examples

Perform custom logic for steps within a specific form

add_action('gravityflow_post_process_workflow', 'my_workflow_post_process_function', 10, 4);
function my_workflow_post_process_function(  $form, $entry_id, $step_id, $starting_step_id ) {
    // Replace your Form ID
    if ( $form['id'] == 123 ) {  
        // do stuff
    }
}

Placement

This code can be used in the functions.php file of the active theme, a custom functions plugin, a custom add-on, or with a code snippets plugin.

See also the PHP section in this article: Where Do I Put This Code?