gravityflow_send_to_step_condition_met_required

The gravityflow_send_to_step_condition_met_required filter confirms whether the step conditions being met is required to send a workflow to a specific step. It is set to false by default to ensure backwards compatibility to workflow processing prior to Gravity Flow 2.5.10 that introduced the filter.

  • If a (potential) new step does not meet its' step conditions a message will be logged to the timeline and subsequent steps after the new step will be checked and if valid will be sent to instead.
    Display of the timeline showing when a step does / does not meet conditions.
  • If no steps after the (potential) new step meet their conditions, the entry will remain at the current step.

If you are customizing this filter, you may also want to look at gravityflow_send_to_step_condition_not_met.

Parameters

Parameter Type Definition
$conditions_met_required Boolean Whether to pass a workflow to a step that has failed its required conditions.
Default set to false.
$new_step Gravity_Flow_Step The proposed new step.
$current_step Gravity_Flow_Step The current step.
$entry Array The current entry array.
$form Array The current form.

Examples

Example 1 - Ensure all API send to step (including admin actions) must meet their step conditions to be sent to.

add_filter( 'gravityflow_send_to_step_condition_met_required', 'jo_send_to_step_condition_not_required', 10, 5 );
function jo_send_to_step_condition_not_required( $conditions_met_required, $new_step, $current_step, $entry, $form ) {
	$conditions_met_required = true;
	return $conditions_met_required;
}

Placement

This code should be placed in the functions.php file of your active theme or in a custom functions plugin.