woocommerce_order_after_calculate_totals

ACTION woocommerce\includes\abstracts\abstract-wc-order.php (ligne 2017) github
Calculate totals by looking at the contents of the order. Stores the totals and returns the orders final total.

Paramètres

Entrée :
$and_taxes, $this
Sortie :
@param  bool $and_taxes Calc taxes if true.
@return float calculated grand total.

Utilisation

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

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

Actualités

Chargement des actualités...