Set to amount before calc

This commit is contained in:
Mike Jolley 2017-08-23 12:24:33 +01:00
parent 804feb9333
commit be042ee8f3
1 changed files with 1 additions and 0 deletions

View File

@ -1336,6 +1336,7 @@ abstract class WC_Abstract_Order extends WC_Abstract_Legacy_Order {
$amount = $item->get_amount();
if ( 0 > $amount ) {
$item->set_total( $amount );
$max_discount = round( $cart_total + $fee_total + $shipping_total, wc_get_price_decimals() ) * -1;
if ( $item->get_total() < $max_discount ) {