Automattic / woocommerce-services

WooCommerce Services is a feature plugin that integrates hosted services into WooCommerce (3.0+), and currently includes automated tax rates and the ability to purchase and print USPS shipping labels.
GNU General Public License v2.0
107 stars 20 forks source link

Automated tax, local pickup, and WC Blocks incompatibility #2553

Closed waclawjacek closed 2 years ago

waclawjacek commented 2 years ago

First reported in 5201333-zd-woothemes.

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 but I am posting it here because it might be something WCS&T has to add to integrate with Blocks instead of a bug on Blocks' end.

Testing instructions

  1. Set up a site using WCS&T and WC Blocks.
  2. Add the Cart block and Checkout block to the respective pages (this is essential) and remove the shortcode.
  3. In shipping options, add "Flat rate" for $10 and "Local pickup" for free.
  4. Enable automated taxes in settings.
  5. Payment options: add Cash on delivery.
  6. Set store address to: 123 Test Street, 90210 Beverly Hills, CA, USA.
  7. Add a physical product to the cart.
  8. Check out using the following address: 60 29th Street #343, 94110 San Francisco, CA, USA.
  9. Select Local pickup.
  10. Note how on the cart and checkout pages the tax rate is present.
  11. Complete the order.
  12. See tax rate of $0.00 applied on the Order received page and in WP admin under Edit Order.
NathalyaVides commented 2 years ago

Customer included additional details to replicate the problem:

_The issue is when my customer enters an out-of-state shipping address and selects local pickup because they are working in Los Angeles.

The local pickup option, from what I see using the shortcode, takes priority over the shipping address._

dustinparker commented 2 years ago

@waclawjacek I looked into this a bit and also tested without WCS&T and am getting the same results. This appears to be an issue with the Store API (maybe caching?). I didn't dig too much deeper since it's not really our jurisdiction. Let me know if you'd like me to look into this further or if we can close this out.

waclawjacek commented 2 years ago

Thank you! I have cross-posted this issue to the Blocks repo.

dustinparker commented 2 years ago

I'll go ahead and close this issue out since it appears to not be caused by the WCS&T extension. Feel free to reopen if needed.