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:
Steven Mathias 2012-12-17 16:46:54 -07:00
parent d8ec3aa094
commit 9387ca6acf
1 changed files with 2 additions and 2 deletions

View File

@ -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 ) {