Updated to include coupon on woocommerce_item_is_discounted filter. Filters should always include all information used to arrive at the default filtered value.
This commit is contained in:
parent
d8ec3aa094
commit
9387ca6acf
|
@ -982,7 +982,7 @@ class WC_Cart {
|
|||
$this_item_is_discounted = false;
|
||||
|
||||
// Apply filter
|
||||
$this_item_is_discounted = apply_filters( 'woocommerce_item_is_discounted', $this_item_is_discounted, $values, $before_tax = true );
|
||||
$this_item_is_discounted = apply_filters( 'woocommerce_item_is_discounted', $this_item_is_discounted, $values, $before_tax = true, $coupon );
|
||||
|
||||
// Apply the discount
|
||||
if ( $this_item_is_discounted ) {
|
||||
|
@ -1142,7 +1142,7 @@ class WC_Cart {
|
|||
$this_item_is_discounted = false;
|
||||
|
||||
// Apply filter
|
||||
$this_item_is_discounted = apply_filters( 'woocommerce_item_is_discounted', $this_item_is_discounted, $values, $before_tax = false );
|
||||
$this_item_is_discounted = apply_filters( 'woocommerce_item_is_discounted', $this_item_is_discounted, $values, $before_tax = false, $coupon );
|
||||
|
||||
// Apply the discount
|
||||
if ( $this_item_is_discounted ) {
|
||||
|
|
Loading…
Reference in New Issue