-
Notifications
You must be signed in to change notification settings - Fork 216
Fix wrong price formatting in Apple/Google Pay #4480
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
Conversation
includes/payment-methods/class-wc-stripe-express-checkout-helper.php
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some optional comments. It works as expected, but when I attempt to add a product slightly cheaper than the $18 amount (the mocked beanie product with discount) I get the error below in console and the buttons are not present:

Not directly related I guess, but might be worth fixing it if that's something simple to do here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Mayisha, this looks good to me 🚢
📈 PHP Unit Code Coverage Report
|
* make 'three_decimal_currencies' method public * use currency decimal supported in Stripe * add changelog * remove unnecessary else * convert currency to lower case * add test for test_get_stripe_currency_decimals
Fixes STRIPE-573
Fixes #4479
Changes proposed in this Pull Request:
currency_decimals
instead of what's saved in the WooCommerce settings.Testing instructions
USD
as the store currency0
as the Number of decimalsdevelop
, notice that Google/Apple Pay is not presentdevelop
, notice that, Google/Apple Pay is now present on the checkout page. But when you click the express checkout button, notice that the displayed price is wrong.JPY
and confirm that the price is correct on Google/Apple Pay and Link modals for JPY.