-
Notifications
You must be signed in to change notification settings - Fork 215
Description
Description
When the store currency is a 2-decimal currency but the number of decimals is set as 0
in the WooCommerce settings, Apple/Google Pay displays the wrong amount on the modal.
We transform the price here to express checkout format. The decimal value sent from the backend is considering the WooCommerce decimal. This is causing the issue in the calculation when 0
is set in the setting for a 2 decimal currency.
Steps to reproduce
- Go to WooCommerce > Settings > General and scroll to Currency options
- Set
USD
as the store currency - Set
0
as the Number of decimals - Enable express checkout in your Stripe settings page
- As a shopper, add a product priced $18 to your cart and go to the checkout page.
- Notice that, Google/Apple Pay is not present
- Go to your cart and increase the number of products to 5 so that the cart total becomes $90.
- Notice that, Google/Apple Pay is now present.
- Click the express checkout button and notice that the displayed price is wrong.
Screenshots
Expected behavior
- The displayed and charged price should be correct.