woocommerce_cart_product_subtotal

FILTER woocommerce\includes\class-wc-cart.php (ligne 2197) github
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.

Paramètres

Entrée :
$product_subtotal, $product, $quantity, $this
Sortie :
@param WC_Product $product Product object.
@param int        $quantity Quantity being purchased.
@return string formatted price

Utilisation

// 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;
}

Actualités

Chargement des actualités...