Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use subtotal_tax instead of adding taxes ourselves #373

Merged
merged 1 commit into from
Nov 23, 2021

Conversation

AlexP11223
Copy link
Contributor

Fixes #372

It seems like when we add product and discount taxes ourselves, we get 5.16 + 1.375 = rounded to 6.54 (maybe we need to round differently? Like down instead of up)

get_subtotal_tax returns 6.53, not sure if it fixes the issue completely, but I guess using it is more correct anyway than calculating ourselves.

I also checked when shipping tax is present, looks like it is not included in get_subtotal_tax, so the same as it was before.


I tried looking into the WC code about cart taxes/totals to figure out if we are doing something wrong in general, but not found anything useful so far. For rounding they seem to use the up mode too.

@AlexP11223 AlexP11223 requested a review from Dinamiko November 19, 2021 08:45
@Dinamiko Dinamiko merged commit 2638486 into trunk Nov 23, 2021
@Dinamiko Dinamiko deleted the pcp-333-fix-tax-mismatch branch November 23, 2021 11:33
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.

Coupon causes TAX_TOTAL_MISMATCH (333)
2 participants