From 893e6affb175aa35366ee9352ea04ec2de459b3b Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Thu, 14 Jun 2018 12:56:21 +0100 Subject: [PATCH] Revert this change - no issue, just keeping diff small --- includes/abstracts/abstract-wc-order.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/abstracts/abstract-wc-order.php b/includes/abstracts/abstract-wc-order.php index 665e8aa1739..9bc2abd94fa 100644 --- a/includes/abstracts/abstract-wc-order.php +++ b/includes/abstracts/abstract-wc-order.php @@ -1405,12 +1405,12 @@ abstract class WC_Abstract_Order extends WC_Abstract_Legacy_Order { $this->add_item( $item ); } - if ( 'yes' === get_option( 'woocommerce_tax_round_at_subtotal' ) ) { + if ( 'yes' !== get_option( 'woocommerce_tax_round_at_subtotal' ) ) { + $this->set_shipping_tax( wc_round_tax_total( array_sum( array_map( 'wc_round_tax_total', $shipping_taxes ) ) ) ); + $this->set_cart_tax( wc_round_tax_total( array_sum( array_map( 'wc_round_tax_total', $cart_taxes ) ) ) ); + } else { $this->set_shipping_tax( wc_round_tax_total( array_sum( $shipping_taxes ) ) ); $this->set_cart_tax( wc_round_tax_total( array_sum( $cart_taxes ) ) ); - } else { - $this->set_shipping_tax( array_sum( $shipping_taxes ) ); - $this->set_cart_tax( array_sum( $cart_taxes ) ); } $this->save();