woocommerce_coupon_get_discount_amount, wc_remove_number_precision( $discount
woocommerce_coupon_get_discount_amount, wc_remove_number_precision( $discount
Appears in: woocommerce.11.0.0
Hook Type: filter
Displaying hooks found in version: woocommerce.11.0.0apply_filters('woocommerce_coupon_get_discount_amount, wc_remove_number_precision( $discount') is found 2 times:
- /includes/class-wc-discounts.php line 392
$discount = floor( $price_to_discount * ( $coupon_amount / 100 ) ); if ( is_a( $this->object, 'WC_Cart' ) && has_filter( 'woocommerce_coupon_get_discount_amount' ) ) { // Send through the legacy filter, but not as cents. $filtered_discount = wc_add_number_precision( apply_filters( 'woocommerce_coupon_get_discount_amount', wc_remove_number_precision( $discount ), wc_remove_number_precision( $price_to_discount ), $item->object, false, $coupon ) ); if ( $filtered_discount !== $discount ) { $discount = $filtered_discount; $adjust_final_discount = false; } } - /includes/class-wc-discounts.php line 457
} if ( is_a( $this->object, 'WC_Cart' ) && has_filter( 'woocommerce_coupon_get_discount_amount' ) ) { // Send through the legacy filter, but not as cents. $discount = wc_add_number_precision( apply_filters( 'woocommerce_coupon_get_discount_amount', wc_remove_number_precision( $discount ), wc_remove_number_precision( $price_to_discount ), $item->object, false, $coupon ) ); } $discount = min( $discounted_price, $discount ); $total_discount = $total_discount + $discount; $applied_count = $applied_count + $apply_quantity;