woocommerce_calc_tax

FILTER woocommerce\includes\class-wc-tax.php (ligne 74) github
Calculate tax for a line.

Paramètres

Entrée :
$taxes, $price, $rates, $price_includes_tax, $deprecated
Sortie :
@param  float   $price              Price to calc tax on.
@param  array   $rates              Rates to apply.
@param  boolean $price_includes_tax Whether the passed price has taxes included.
@param  boolean $deprecated         Whether to suppress any rounding from taking place. No longer used here.
@return array                       Array of rates + prices after tax.

Utilisation

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

function ma_fonction_filtre($taxes) {
    // Modifier la valeur
    return $taxes;
}

Actualités

Chargement des actualités...