Skip to content

v0.5.0 — Per-state nexus filter

Choose a tag to compare

@ejosterberg ejosterberg released this 15 May 18:35
· 18 commits to main since this release

Added

  • Per-state nexus filter. Mirrors the Vendure v1.2 / Magento v1.4 sibling pattern. New admin toggle "Per-state nexus filter" + "Nexus states" text field under WooCommerce → Settings → Tax → OpenSalesTax. When enabled, the woocommerce_calc_tax handler resolves the destination state up-front and returns an empty array for any state not on the allowlist — WooCommerce's built-in tax-rate calculation handles those (typically: no tax).

Behavior

Configuration Behavior
Filter off (default) Identical to v0.4.1. Engine consulted for every taxable line.
Filter on, state in list Engine consulted as normal.
Filter on, state not in list No engine call, no tax line, WC falls back to built-in calc.
Filter on, empty list No tax anywhere (degenerate but honored).
Filter on, state unresolvable Fail-closed (no tax). Safer for an explicit opt-in.

State resolution honors the same woocommerce_tax_based_on option (billing / shipping / base) as the existing ZIP resolution.

Quality

  • 115 PHPUnit tests / 195 assertions (was 110 / 190); 5 new TaxHandler tests cover the four filter paths plus the back-compat default.
  • PHPStan max, PHP-CS-Fixer, and composer audit all clean on PHP 8.2 / 8.3 / 8.4.

Compatibility

No breaking changes. Merchants who don't toggle the filter on see identical v0.4.1 behavior.