fc_before_substep_{substep_id}
Type: Action
Fires before a checkout substep.
The dynamic portion of the hook name, $substep_id, refers to the checkout substep ID. Additional hook names are created for substeps registered by other plugins. Possible hook names include:
fc_before_substep_contactfc_before_substep_shipping_addressfc_before_substep_shipping_methodfc_before_substep_order_notesfc_before_substep_billing_addressfc_before_substep_paymentfc_before_substep_coupon_codes
Signature
do_action( 'fc_before_substep_{substep_id}', $step_id, $substep_id, $context );
Parameters
| Name | Type | Description |
|---|---|---|
$step_id | string | Checkout step ID. |
$substep_id | string | Checkout substep ID. |
$context | string | Context in which the hook runs. Default checkout. |
Since
1.2.9
Source: inc/checkout-steps.php
Examples
In fc_before_substep_{substep_id}, shipping_methods replaces {substep_id}.
add_action( 'fc_before_substep_shipping_methods',
/**
* Add extra content before the sub-step contents.
*
* @param string $step_id Checkout step ID.
* @param string $substep_id Checkout substep ID.
* @param string $context Context in which the hook runs. Default checkout.
*/
function( $step_id, $substep_id, $context ) {
echo '<div>Custom content before sub-step.</div>';
},
10,
3
);