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

Apple Pay Google Pay buttons not shown on products that don't require shipping and prices already include tax. #9921

Open
brettshumaker opened this issue Dec 11, 2024 · 1 comment · May be fixed by #9954
Assignees
Labels
component: payment request button Apple Pay, Google Pay, etc focus: checkout payments priority: medium The issue/PR is medium priority—non-critical functionality loss, minimal effect on usability type: bug The issue is a confirmed bug.

Comments

@brettshumaker
Copy link
Contributor

Describe the bug

In #9080 these buttons were disabled due to the possibility of not having billing information available when the payment sheet opens and, therefore, we could potentially be showing an incorrect amount if tax is calculated based on billing address. However, an edge case came up in a ticket where the user did have the tax set to be calculated on the billing address for non-shippable products but their prices were already entered inclusive of tax. Meaning that no tax calculations should be happening on checkout anyway. I think it should be safe to show the EPMs in this instance. The relevant logic is here.

To Reproduce

  1. Go to /wp-admin/admin.php?page=wc-settings&tab=tax and select the radio button to "Yes, I will enter prices inclusive of tax."
  2. Set "Calculate tax based on" to "Customer billing address" and save the settings.
  3. Add a digital or non-shippable product to the cart.
  4. Visit the checkout and the Apple Pay/Google Pay buttons are not added to the page.

Actual behavior

Currently, with the described tax settings, the EPM buttons are not added

Screenshots

Image

Expected behavior

With the tax settings as described above, accurate totals should be able to be sent to the payment sheet and EPM buttons should be enabled.

@brettshumaker brettshumaker added component: payment request button Apple Pay, Google Pay, etc type: bug The issue is a confirmed bug. labels Dec 11, 2024
@timur27 timur27 self-assigned this Dec 13, 2024
@timur27
Copy link
Contributor

timur27 commented Dec 13, 2024

Please add your planning poker estimate with Zenhub @FangedParakeet

The fix itself is pretty straightforward, what I found requiring attention is the current state of the unit tests. I think we need to refactor a few things there because it's pretty hard to unit test this area at the moment.

@pierorocca pierorocca added the priority: medium The issue/PR is medium priority—non-critical functionality loss, minimal effect on usability label Dec 13, 2024
@FangedParakeet FangedParakeet added this to the WooPayments 8.7.0 milestone Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: payment request button Apple Pay, Google Pay, etc focus: checkout payments priority: medium The issue/PR is medium priority—non-critical functionality loss, minimal effect on usability type: bug The issue is a confirmed bug.
Projects
None yet
5 participants