Get the product row subtotal. Gets the tax etc to avoid rounding issues. When on the checkout (review order), this will get the subtotal based on the customer's tax rate rather than the base rate.
$product_subtotal, $product, $quantity, $this
Sortie :
@param WC_Product $product Product object. @param int $quantity Quantity being purchased. @return string formatted price
// Modifier la valeur avec le filtre 'woocommerce_cart_product_subtotal'
add_filter('woocommerce_cart_product_subtotal', 'ma_fonction_filtre', 10, 1);
function ma_fonction_filtre($product_subtotal) {
// Modifier la valeur
return $product_subtotal;
}
Chargement des actualités...