Fix process navigation
This commit is contained in:
@@ -4,6 +4,8 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$is_step_completed = $current_step->get_status() === 'complete' || $current_step->get_status() === 'approved';
|
||||||
|
|
||||||
// get next step id
|
// get next step id
|
||||||
$next_step = gravity_flow()->get_next_step($current_step, $current_step->get_entry(), $current_step->get_form());
|
$next_step = gravity_flow()->get_next_step($current_step, $current_step->get_entry(), $current_step->get_form());
|
||||||
$next_step_id = empty($next_step) ? null : $next_step->get_id();
|
$next_step_id = empty($next_step) ? null : $next_step->get_id();
|
||||||
@@ -19,7 +21,7 @@ foreach ($steps as $step) {
|
|||||||
$previous_step_id = empty($previous_step) ? null : $previous_step->get_id();
|
$previous_step_id = empty($previous_step) ? null : $previous_step->get_id();
|
||||||
|
|
||||||
// bail out if none exist
|
// bail out if none exist
|
||||||
if ( empty($next_step_id) && empty($previous_step_id) ) {
|
if ( empty($next_step_id) && empty($previous_step_id) && $is_step_completed) {
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user