You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix - Non-taxable product no longer zeroes shared standard tax rate (WOOTAX-240)
In a cart mixing a taxable product and a non-taxable one (Tax Status =
"None", Tax Class = "Standard"), taxes stopped calculating for the whole
cart. get_itemized_tax_rates() writes one WooCommerce tax rate row per
TaxJar breakdown line item, keyed by the product's Tax Class. The
non-taxable product is sent to TaxJar as exempt (code 99999) so its
breakdown line comes back at 0%, but its Tax Class is still Standard — so
create_or_update_tax_rate() overwrote the shared Standard rate row (already
populated by the taxable product) with 0%, zeroing tax for every standard
item. The zeroed row persisted in wp_woocommerce_tax_rates, which is why
adding another taxable product did not restore it.
Skip rate-row writes for line items whose product has Tax Status "None".
WooCommerce already applies no tax to such products, and this leaves the
shared class rate intact for genuinely taxable items. Zero-rate *class*
products are unaffected (they own a separate rate row).
Note: the tax status check in get_line_items() is not the cause — a
tax_status "none" product is already correctly sent as code 99999. The
defect was downstream, in how the itemized rate rows are written.
Adds a regression test driving get_itemized_tax_rates() with a mixed
taxable/exempt breakdown; it fails on trunk (exempt line writes/zeroes the
shared row) and passes with this fix.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: changelog.txt
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,7 @@
4
4
* Fix - TaxJar tax lines wiped when REST API order update includes address change.
5
5
* Fix - Prevent fatal error on sites running WooCommerce versions without StoreApi support.
6
6
* Fix - Prevent unbounded growth of WooCommerce tax rate rows when checkout city contains a semicolon.
7
+
* Fix - Calculate tax correctly for carts mixing taxable and non-taxable products, so a non-taxable product no longer resets the standard tax rate to zero.
7
8
8
9
= 3.6.7 - 2026-07-06 =
9
10
* Fix - Prevent fatal error on Atomic sites caused by incorrect path resolution when loading the API client class.
Copy file name to clipboardExpand all lines: readme.txt
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -74,6 +74,7 @@ This plugin relies on the following external services:
74
74
* Fix - TaxJar tax lines wiped when REST API order update includes address change.
75
75
* Fix - Prevent fatal error on sites running WooCommerce versions without StoreApi support.
76
76
* Fix - Prevent unbounded growth of WooCommerce tax rate rows when checkout city contains a semicolon.
77
+
* Fix - Calculate tax correctly for carts mixing taxable and non-taxable products, so a non-taxable product no longer resets the standard tax rate to zero.
77
78
78
79
= 3.6.7 - 2026-07-06 =
79
80
* Fix - Prevent fatal error on Atomic sites caused by incorrect path resolution when loading the API client class.
Copy file name to clipboardExpand all lines: tests/php/test-class-wc-connect-taxjar-integration.php
+84Lines changed: 84 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1865,4 +1865,88 @@ public function test_create_or_update_tax_rate_does_not_duplicate_rows_for_semic
1865
1865
$this->assertStringNotContainsString( ';', $city, 'Tax rate city stored with a semicolon — `_update_tax_rate_cities()` will split it and break find_rates() on subsequent lookups.' );
1866
1866
}
1867
1867
}
1868
+
1869
+
/**
1870
+
* A non-taxable product (Tax Status = "None") that shares the standard Tax
1871
+
* Class with a taxable product must not zero out the shared Standard rate row.
1872
+
*
1873
+
* TaxJar returns a 0% breakdown line for the exempt product (sent as code
1874
+
* 99999). Because rate rows are keyed by tax class — and Tax Status "None"
1875
+
* does not change the Tax Class — that 0% would overwrite the same Standard
1876
+
* row the taxable product just populated, zeroing tax for the whole cart.
0 commit comments