Closed waclawjacek closed 2 years ago
Hi @waclawjacek! 👋 Thank you for reporting this bug.
I followed the instructions to reproduce it. But I've got the expected behavior with a minor bug:
On the other hand, I'm getting the mentioned bug above on the C&C shortcode instead:
I did the test using:
Please let me know if I'm missing something, and if there’s something additional about your environment that could help with reproducing the bug. (testing again using a fresh install can be helpful)
Hi, I'm the store owner that reported this issue. I just did a retest and got the exact opposite results stated above. The shortcode is correctly adding the tax to the final invoice, the block is not. Here is my setup with WC blocks:
1.) Store location set to Los Angeles, CA 90031 2.) Standard tax rate for Los Angeles = 9.5%. Automated taxes enabled. 3.) Create account. Use out of state address for shipping and billing. Key is shipping address. 4.) Add items to cart. 5.) Choose local pickup. Tax is displayed and added to total. 6.) Choose checkout. Make sure shipping address is out of state. 7.) Tax is displayed and added to total. Shipping is zero. 8.) Choose payment. I select cash. 9.) Place order. 10.) Order received page shows tax removed. Order received total does not match checkout page total.
If you change the block out to the old shortcode, the order received page includes the tax, as it should for local pickup regardless of the shipping address. This should give you the same result as stated above in "to reproduce". The "minor bug" you found, I have not seen. But good on finding it. Good luck.
Thank you, @hollywoodeas, for the detailed explanation! I was able to reproduce the bug thanks to your instructions. 🙌
TL;DR: This isn't a bug related to the WCS&T plugin. It's related to calculating the tax
when selecting the local pickup
shipping method.
Note: The taxes should be based on the base store location by default and not the customer's address when selecting the
local pickup
shipping method.
The current behavior in C&C Blocks:
local pickup
shipping method displays the correct tax
value.Checkout Block
, the tax
is not calculated (or the tax
related to the customer address is used instead if it was set up) on the Order received
page and in WP admin under Edit Order
.So, on the C&C blocks, we are displaying the correct tax
(i.e., based on the store address) when using the local pickup
shipping method. But, after placing an order through the Checkout Block, we are sending the wrong tax
(i.e., The tax based on the customer address).
Scenario 1
123 Test Street, 90210 Beverly Hills, CA, USA
"Standard" tax rates
related to the base store location. Set it to: 10%
60 29th Street #343, 35005 birmingham, AL, USA
)Local pickup
shipping method. Check that we have a tax of 10% applied.Local pickup
shipping method. Check that we have a tax of 10% applied.Order received
page that the displayed tax is not applied anymore.Edit Order
. Check that no taxes were applied there as well.Scenario 2 (The steps from Scenario 1 are required)
"Standard" tax rates
related to the customer address (e.g., 60 29th Street #343, 35005 birmingham, AL, USA
). And set it to: 5%
60 29th Street #343, 35005 birmingham, AL, USA
)Order received
page that a 5% tax is applied this time.Edit Order
. Check that a 5% tax is applied (You can see the name of the newly added tax that was applied).Soooo, what's happening, if anything? I would think a bug that is generating a wrong invoice total would be a somewhat high priority for an e-commerce platform. Am I the only Woocommerce store experiencing this issue (on an almost weekly basis I might add)? Is anything going on behind the scenes?
Thank you, @hollywoodeas, for reaching out and asking for updates about the local pickup tax calculation bug. We fixed the bug, and the fix will be included in next week's release (WC Blocks 8.0.0).
Describe the bug
When using the following setup, there is an issue with calculating tax for an order. The issue is that the tax is displayed throughout the checkout until the "Order received" page it is missing from.
When visiting the Edit Order page, the tax name is there but the tax is not applied to the order.
This issue is not present when using the shortcode.
To reproduce
123 Test Street, 90210 Beverly Hills, CA, USA
.60 29th Street #343, 94110 San Francisco, CA, USA
.Expected behavior
Tax rate is applied to the created order and displayed on the Order received page.