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.
WC_Tax::calc_tax( $item->total, $item->tax_rates, $item->price_includes_tax
Sortie :
// 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;
}
Chargement des actualités...