[2.3] Use exclusive price and exclusive subtotal to work out % of discount

This commit is contained in:
Mike Jolley 2015-04-17 20:42:18 +01:00
parent 3e99768047
commit c8467b143a
1 changed files with 1 additions and 1 deletions

View File

@ -614,7 +614,7 @@ class WC_Coupon {
*
* Uses price inc tax if prices include tax to work around https://github.com/woothemes/woocommerce/issues/7669
*/
$discount_percent = ( $cart_item['data']->get_price() * $cart_item_qty ) / ( wc_prices_include_tax() ? WC()->cart->subtotal : WC()->cart->subtotal_ex_tax );
$discount_percent = ( $cart_item['data']->get_price_excluding_tax() * $cart_item_qty ) / WC()->cart->subtotal_ex_tax;
$discount = ( $this->coupon_amount * $discount_percent ) / $cart_item_qty;
} elseif ( $this->is_type( 'fixed_product' ) ) {