From be042ee8f3143650ce0289733d0b3961213761c7 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Wed, 23 Aug 2017 12:24:33 +0100 Subject: [PATCH] Set to amount before calc --- includes/abstracts/abstract-wc-order.php | 1 + 1 file changed, 1 insertion(+) diff --git a/includes/abstracts/abstract-wc-order.php b/includes/abstracts/abstract-wc-order.php index 21c207574a1..eb84e0aefcb 100644 --- a/includes/abstracts/abstract-wc-order.php +++ b/includes/abstracts/abstract-wc-order.php @@ -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 ) {