before_woocommerce_pay_form

ACTION woocommerce\includes\shortcodes\class-wc-shortcode-checkout.php (ligne 219) github
Triggered right before the Pay for Order form, after validation of the order and customer.

Paramètres

Entrée :
$order, $order_button_text, $available_gateways
Sortie :
@param WC_Order $order              The order that is being paid for.
@param string   $order_button_text  The text for the submit button.
@param array    $available_gateways All available gateways.

Utilisation

// Ajouter une fonction au hook action 'before_woocommerce_pay_form'
add_action('before_woocommerce_pay_form', 'ma_fonction_personnalisee', 10, 1);

function ma_fonction_personnalisee($order, $order_button_text, $available_gateways) {
    // Votre code ici
    error_log('Hook before_woocommerce_pay_form déclenché');
}

Actualités

Chargement des actualités...