From ec5db3b123fdab3d4ac85bc8ef41219dcf523fc9 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Mon, 20 Nov 2017 16:30:23 +0000 Subject: [PATCH] When adding precision to taxes, don't round when adding precision. --- includes/class-wc-cart-totals.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/class-wc-cart-totals.php b/includes/class-wc-cart-totals.php index fec8bda64a5..8a0c128701f 100644 --- a/includes/class-wc-cart-totals.php +++ b/includes/class-wc-cart-totals.php @@ -349,8 +349,8 @@ final class WC_Cart_Totals { $shipping_line->tax_class = get_option( 'woocommerce_shipping_tax_class' ); $shipping_line->taxable = true; $shipping_line->total = wc_add_number_precision_deep( $shipping_object->cost ); - $shipping_line->taxes = wc_add_number_precision_deep( $shipping_object->taxes ); - $shipping_line->total_tax = wc_add_number_precision_deep( array_sum( $shipping_object->taxes ) ); + $shipping_line->taxes = wc_add_number_precision_deep( $shipping_object->taxes, false ); + $shipping_line->total_tax = wc_add_number_precision_deep( array_sum( $shipping_object->taxes ), false ); if ( ! $this->round_at_subtotal() ) { $shipping_line->total_tax = wc_round_tax_total( $shipping_line->total_tax, wc_get_rounding_precision() );