Skip to main content

fc_is_step_complete

Type: Filter

Filters whether a checkout step is complete.

Signature​

apply_filters( 'fc_is_step_complete', $is_step_complete, $step_id, $context );

Parameters​

NameTypeDescription
$is_step_completeboolWhether the step is complete.
$step_idstringCheckout step ID.
$contextstringContext in which the hook runs. Default checkout.

Since​

  • 4.0.0

Source: inc/checkout-steps.php

Examples​

add_filter( 'fc_is_step_complete',
/**
* Set all steps as not-complete to force the user to always start from the first step.
*
* @param bool $is_step_complete Whether the step is complete.
* @param string $step_id Checkout step ID.
* @param string $context Context in which the hook runs. Default checkout.
* @return bool Filtered value.
*/
function( $is_step_complete, $step_id, $context ) {
return false;
},
10,
3
);