Skip to content

Conversation

@bartech
Copy link
Collaborator

@bartech bartech commented Sep 22, 2025

Description

Send 0.01 amount to TaxJar when sum of unit_price of line_items is 0.
TaxJar when all line items price is 0, TaxJar rate response prop is also 0 instead or default rate for given address.
Only affects "As a single total" setting, as "Itemized" use traversing through response line items tax rates where rate is not 0 even for 0 unit_price item.

Related issue(s)

fixes https://linear.app/a8c/issue/WOOSHIP-1453/automatic-taxes-not-calculated-for-subscription-renewals-when-theres-a
fixes https://linear.app/a8c/issue/WOOSHIP-1482/ensure-compatibility-with-woocommerce-subscriptions

Steps to reproduce & screenshots/GIFs

  • Create Simple Product with price $0.00

  • Set tax display in Woo-> Settings -> Tax to "As a single total"
    image

  • Add product to cart and go to checkout

  • Add shipping address that should have taxes calculated

  • On trunk see the saved tax Rate for given address is 0
    image

  • On this branch see correct rate is saved
    image

Checklist

  • unit tests
  • changelog.txt entry added
  • readme.txt entry added

Instead of returning default empty $taxes array we return false so the tax calculation is stopped when we have no response.
@bartech bartech self-assigned this Sep 22, 2025
Copy link
Collaborator

@dustinparker dustinparker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixes the case where the incorrect tax rate is saved when the line items' total amount is zero. LGTM!

@bartech bartech merged commit 67048db into trunk Sep 23, 2025
9 checks passed
@bartech bartech deleted the fix/issue-WOOSHIP-1453-v2 branch September 23, 2025 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants