Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
*** WooCommerce Tax Changelog ***

= 3.2.2 - 2025-xx-xx =
* Add - Allow round tax at subtotal level, instead of rounding per line.
* Add - Allow calculating taxes for VAT countries without providing ZIP.
* Fix - Taxes were incorrectly calculated using the store’s base address for Ohio.
* Fix - Display TaxJar error notices only after taxes are calculated.
* Tweak - Log detection of potential incorrect California tax nexus in successful TaxJar API and cached responses.

Expand Down
22 changes: 13 additions & 9 deletions classes/class-wc-connect-taxjar-integration.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,15 @@ class WC_Connect_TaxJar_Integration {

private $expected_options = array(
// Users can set either billing or shipping address for tax rates but not shop
'woocommerce_tax_based_on' => 'shipping',
'woocommerce_tax_based_on' => 'shipping',
// Rate calculations assume tax not included
'woocommerce_prices_include_tax' => 'no',
'woocommerce_prices_include_tax' => 'no',
// Use no special handling on shipping taxes, our API handles that
'woocommerce_shipping_tax_class' => '',
// API handles rounding precision
'woocommerce_tax_round_at_subtotal' => 'no',
'woocommerce_shipping_tax_class' => '',
// Rates are calculated in the cart assuming tax not included
'woocommerce_tax_display_shop' => 'excl',
'woocommerce_tax_display_shop' => 'excl',
// TaxJar returns one total amount, not line item amounts
'woocommerce_tax_display_cart' => 'excl',
'woocommerce_tax_display_cart' => 'excl',
);

/**
Expand Down Expand Up @@ -1023,6 +1021,12 @@ public function maybe_apply_taxjar_nexus_addresses_workaround( $body ) {
'from_country' => 'US',
'from_state' => 'AZ',
),
'US-OH' => array(
'to_country' => 'US',
'to_state' => 'OH',
'from_country' => 'US',
'from_state' => 'OH',
),
);

foreach ( $cases as $case ) {
Expand Down Expand Up @@ -1099,7 +1103,7 @@ public function calculate_tax( $options = array() ) {
// Strict conditions to be met before API call can be conducted.
if (
empty( $to_country ) ||
empty( $to_zip ) ||
( empty( $to_zip ) && ! in_array( $to_country, WC()->countries->get_vat_countries() ) ) ||
( empty( $line_items ) && ( empty( $shipping_amount ) ) ) ||
WC()->customer->is_vat_exempt()
) {
Expand Down Expand Up @@ -1441,7 +1445,7 @@ public function smartcalcs_cache_request( $json, $from_state ) {
$zip_state_cache_key = strtolower( 'tj_tax_' . $to_zip . '_' . $to_state );
$response = get_transient( $zip_state_cache_key );
}
$response = $response ? $response : get_transient( $cache_key );
$response = ! empty( $response ) ? $response : get_transient( $cache_key );
if ( $response && 'CA' !== $from_state ) {
// If $from_state is not California, we need to check for incorrect California tax nexus.
try {
Expand Down
3 changes: 3 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ This plugin relies on the following external services:
== Changelog ==

= 3.2.2 - 2025-xx-xx =
* Add - Allow round tax at subtotal level, instead of rounding per line.
* Add - Allow calculating taxes for VAT countries without providing ZIP.
* Fix - Taxes were incorrectly calculated using the store’s base address for Ohio.
* Fix - Display TaxJar error notices only after taxes are calculated.
* Tweak - Log detection of potential incorrect California tax nexus in successful TaxJar API and cached responses.

Expand Down
Loading