From db87fc68b9f1ed1a9aaa3d0ce07f313d66523547 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Thu, 10 Aug 2017 16:33:21 +0100 Subject: [PATCH] Fix refs --- includes/abstracts/abstract-wc-order.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/abstracts/abstract-wc-order.php b/includes/abstracts/abstract-wc-order.php index e7533e304e4..e3944f77b2e 100644 --- a/includes/abstracts/abstract-wc-order.php +++ b/includes/abstracts/abstract-wc-order.php @@ -1028,7 +1028,7 @@ abstract class WC_Abstract_Order extends WC_Abstract_Legacy_Order { $coupon_code_to_id = wc_list_pluck( $coupons, 'get_id', 'get_code' ); // Reset line item totals. - foreach ( $this->get_items() as &$item ) { + foreach ( $this->get_items() as $item ) { $item->set_total( $item->get_subtotal() ); $item->set_total_tax( $item->get_subtotal_tax() ); } @@ -1271,11 +1271,11 @@ abstract class WC_Abstract_Order extends WC_Abstract_Legacy_Order { } // Trigger tax recalculation for all items. - foreach ( $this->get_items( array( 'line_item', 'fee', 'discount' ) ) as $item_id => &$item ) { + foreach ( $this->get_items( array( 'line_item', 'fee', 'discount' ) ) as $item_id => $item ) { $item->calculate_taxes( $calculate_tax_for ); } - foreach ( $this->get_shipping_methods() as $item_id => &$item ) { + foreach ( $this->get_shipping_methods() as $item_id => $item ) { $item->calculate_taxes( array_merge( $calculate_tax_for, array( 'tax_class' => $shipping_tax_class ) ) ); }