Apply percent discount to items and return an array of discounts granted.
wc_remove_number_precision( $discount
Sortie :
@param WC_Coupon $coupon Coupon object. Passed through filters. @param array $items_to_apply Array of items to apply the coupon to. @return int Total discounted.
// Modifier la valeur avec le filtre 'woocommerce_coupon_get_discount_amount'
add_filter('woocommerce_coupon_get_discount_amount', 'ma_fonction_filtre', 10, 1);
function ma_fonction_filtre(wc_remove_number_precision( $discount) {
// Modifier la valeur
return wc_remove_number_precision( $discount;
}
Chargement des actualités...