woocommerce_get_discounted_price

FILTER woocommerce\includes\class-wc-cart-totals.php (ligne 673) 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_remove_number_precision( $item->total
Sortie :
N/A

Utilisation

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

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

Actualités

Chargement des actualités...