Merge pull request #16782 from hjoelr/bugfix-discounts-wrong-var

Bugfix: Discounts not using the right variable
This commit is contained in:
Mike Jolley 2017-09-14 11:32:27 -07:00 committed by GitHub
commit bac98218f3
1 changed files with 1 additions and 1 deletions

View File

@ -472,7 +472,7 @@ class WC_Discounts {
$price_to_discount = ( 'yes' === get_option( 'woocommerce_calc_discounts_sequentially', 'no' ) ) ? $discounted_price : $item->price;
// Run coupon calculations.
$discount = min( $discounted_price, 1 );
$discount = min( $price_to_discount, 1 );
// Store totals.
$total_discount += $discount;