From 22df8cabb645b77aff13270c794004d8508851a0 Mon Sep 17 00:00:00 2001 From: James Allan Date: Fri, 16 Oct 2020 11:50:28 +1000 Subject: [PATCH] Update the rate when recalculating and updating order tax items --- 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 a694d1aa151..57e38100094 100644 --- a/includes/abstracts/abstract-wc-order.php +++ b/includes/abstracts/abstract-wc-order.php @@ -1610,6 +1610,7 @@ abstract class WC_Abstract_Order extends WC_Abstract_Legacy_Order { continue; } $saved_rate_ids[] = $tax->get_rate_id(); + $tax->set_rate( $tax->get_rate_id() ); $tax->set_tax_total( isset( $cart_taxes[ $tax->get_rate_id() ] ) ? $cart_taxes[ $tax->get_rate_id() ] : 0 ); $tax->set_shipping_tax_total( ! empty( $shipping_taxes[ $tax->get_rate_id() ] ) ? $shipping_taxes[ $tax->get_rate_id() ] : 0 ); $tax->save();