woocommerce_order_before_calculate_taxes

ACTION woocommerce\includes\abstracts\abstract-wc-order.php (ligne 1816) github
Calculate taxes for all line items and shipping, and store the totals and tax rows. If by default the taxes are based on the shipping address and the current order doesn't have any, it would use the billing address rather than using the Shopping base location. Will use the base country unless customer addresses are set.

Paramètres

Entrée :
$args, $this
Sortie :
@param array $args Added in 3.0.0 to pass things like location.

Utilisation

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

function ma_fonction_personnalisee($args, $this) {
    // Votre code ici
    error_log('Hook woocommerce_order_before_calculate_taxes déclenché');
}

Actualités

Chargement des actualités...