From 4f3393fc2fb929da830e00d182307f12f7385c2a Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Thu, 12 Oct 2017 10:12:20 +0100 Subject: [PATCH] Tax calculations should use `unfiltered` context for tax class MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes variations which have a ‘parent’ tax class. It should inherit from the parent. Closes #17147 --- includes/class-wc-cart-totals.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/class-wc-cart-totals.php b/includes/class-wc-cart-totals.php index f31a6cf11b8..be2e21b7979 100644 --- a/includes/class-wc-cart-totals.php +++ b/includes/class-wc-cart-totals.php @@ -423,7 +423,7 @@ final class WC_Cart_Totals { * @return object */ protected function adjust_non_base_location_price( $item ) { - $base_tax_rates = WC_Tax::get_base_tax_rates( $item->product->get_tax_class( 'edit' ) ); + $base_tax_rates = WC_Tax::get_base_tax_rates( $item->product->get_tax_class( 'unfiltered' ) ); if ( $item->tax_rates !== $base_tax_rates ) { // Work out a new base price without the shop's base tax.