Tax calculations should use `unfiltered` context for tax class

This fixes variations which have a ‘parent’ tax class. It should
inherit from the parent.

Closes #17147
This commit is contained in:
Mike Jolley 2017-10-12 10:12:20 +01:00
parent 8ead48fc64
commit 4f3393fc2f
1 changed files with 1 additions and 1 deletions

View File

@ -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.