woocommerce / woocommerce-gateway-stripe

The official Stripe Payment Gateway for WooCommerce
https://wordpress.org/plugins/woocommerce-gateway-stripe/
232 stars 204 forks source link

ApplePay / GooglePay not charging tax on product pages #1411

Open mdmoore opened 3 years ago

mdmoore commented 3 years ago

Describe the bug On the product page, if you open Google Pay, no tax is shown. However, if you first add the product to the cart, then use Google Pay, tax is charged correctly in the popup. Not sure why it works that way? Changing the default customer location doesn't seem to matter.

To Reproduce Steps to reproduce the behavior:

  1. Ensure taxes are enabled
  2. Attempt to purchase a product using Google Pay from a product page
  3. No tax is charged

Expected behavior Tax should be charged when using Google Pay to purchase products on the product page.

Environment (please complete the following information):

3564115-zen

jrodger commented 3 years ago

I thought this might be intended behaviour, but the fact the tax is calculated at the checkout (before the shopper has entered a location) suggests there might be something missing from the product page?

Tax isn't calculated if the tax settings are set to just use the store's location either.

v18 commented 3 years ago

I'm able to see that no tax is shown, but it's re-calculated before the payment is made. I'm not able to check out without the tax. I changed the label to enhancement instead.

If it's possible to pay for the order without tax, let me know.

v18 commented 3 years ago

The reason this happens is because we don't get the cart tax totals when using get_product_data() in scripts().

In some cases the tax depends on the address of the customer, so it's not always possible to set it correctly. But when it is, we could get the tax amount using WC()->cart->tax_total, similar to what we do in build_display_items().

melek commented 3 years ago

Really not sure if this may help, but at least one forum user is seeing very similar behavior in Square with Avatax enabled - tax is not displayed in Google/Apple pay, but it is charged: https://wordpress.org/support/topic/avatax-not-displaying-tax-for-apple-google-pay/

Here are their Tax settings: https://snipboard.io/ilAneE.jpg

johndcoy commented 3 years ago

I was able to confirm this is still an issue, especially for digital products. The same problem with GooglePay persists for ApplePay as well.

nicdwilson commented 2 years ago

5505604-zen, especially digital products.

meilers commented 1 year ago

Having the same issue here in Quebec Canada (2 taxes: GST and QST) for Apple Pay and Google Pay.

msolav commented 1 year ago

The issue still exists for me in Quebec.

wyter commented 7 months ago

7681992-zen