woocommerce_calculate_item_totals_taxes

FILTER woocommerce\includes\class-wc-cart-totals.php (ligne 678) github
Allow plugins to filter this price like in the legacy cart class. This is legacy and should probably be deprecated in the future. $item->object is the cart item object. $this->cart is the cart object.

Paramètres

Entrée :
WC_Tax::calc_tax( $item->total, $item->tax_rates, $item->price_includes_tax
Sortie :
N/A

Utilisation

// Modifier la valeur avec le filtre 'woocommerce_calculate_item_totals_taxes'
add_filter('woocommerce_calculate_item_totals_taxes', 'ma_fonction_filtre', 10, 1);

function ma_fonction_filtre(WC_Tax::calc_tax( $item->total) {
    // Modifier la valeur
    return WC_Tax::calc_tax( $item->total;
}

Actualités

Chargement des actualités...