Skip to main content

fc_after_substep_{substep_id}

Type: Action

Fires after a checkout substep.

The dynamic portion of the hook name, $substep_id, refers to the checkout substep ID. This hook runs before the optional substep edit and save buttons. Additional hook names are created for substeps registered by other plugins. Possible hook names include:

  • fc_after_substep_contact
  • fc_after_substep_shipping_address
  • fc_after_substep_shipping_method
  • fc_after_substep_order_notes
  • fc_after_substep_billing_address
  • fc_after_substep_payment
  • fc_after_substep_coupon_codes

Signature​

do_action( 'fc_after_substep_{substep_id}', $step_id, $substep_id, $output_edit_buttons, $context );

Parameters​

NameTypeDescription
$step_idstringCheckout step ID.
$substep_idstringCheckout substep ID.
$output_edit_buttonsmixedWhether edit and save buttons are output for the substep.
$contextstringContext in which the hook runs. Default checkout.

Since​

  • 1.2.9

Source: inc/checkout-steps.php

Examples​

In fc_after_substep_{substep_id}, shipping_methods replaces {substep_id}.

add_action( 'fc_after_substep_shipping_methods',
/**
* Add extra content after the sub-step contents.
*
* @param string $step_id Checkout step ID.
* @param string $substep_id Checkout substep ID.
* @param mixed $output_edit_buttons Whether edit and save buttons are output for the substep.
* @param string $context Context in which the hook runs. Default checkout.
*/
function( $step_id, $substep_id, $output_edit_buttons, $context ) {
echo '<div>Custom content after sub-step.</div>';
},
10,
4
);