Skip to main content

fc_is_step_complete_{step_id}

Type: Filter

Filters whether a checkout step is complete.

The dynamic portion of the hook name, $step_id, refers to the checkout step ID. Additional hook names are created for steps registered by other plugins. Possible hook names include:

  • fc_is_step_complete_contact
  • fc_is_step_complete_shipping
  • fc_is_step_complete_billing
  • fc_is_step_complete_payment

Signature​

apply_filters( 'fc_is_step_complete_{step_id}', $is_step_complete, $context );

Parameters​

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

Since​

  • 4.0.0

Source: inc/checkout-steps.php

Examples​

In fc_is_step_complete_{step_id}, shipping replaces {step_id}.

add_filter( 'fc_is_step_complete_shipping',
/**
* Set specific step as not-complete to force the user to always review that step.
*
* @param bool $is_step_complete Whether the step is complete.
* @param string $context Context in which the hook runs. Default checkout.
* @return bool Filtered value.
*/
function( $is_step_complete, $context ) {
return false;
},
10,
2
);