-
Notifications
You must be signed in to change notification settings - Fork 45
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
fix(modal-checkout): treat express checkouts as modal checkouts #1654
Conversation
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.
This change breaks the checkout for non-Newspack products. modal_checkout
is set under conditions different than defined in this change. The result is that when using the payment request with a non-Newspack product, the customer is redirected to our "Transaction Successful" screen which assumes it's rendered in a modal. The "Continue browsing" button won't do anything, trapping the user on this screen for eternity.
Noooo! Great points. I was overly optimistic about this change, but it looks like we'll have to figure out a way to pass the |
@adekbadek 712858a adds the check we were missing. We can still fetch the referrer URL from the express checkout request, so that lets us see if the request was triggered in a modal checkout. |
## [2.6.1](v2.6.0...v2.6.1) (2024-01-31) ### Bug Fixes * **modal-checkout:** treat express checkouts as modal checkouts ([#1654](#1654)) ([a352511](a352511))
🎉 This PR is included in version 2.6.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
All Submissions:
Changes proposed in this Pull Request:
Fixes some issues with checkout when using express checkout methods (also called "payment requests" in Stripe terminology) in modal checkout. Our
is_modal_checkout
method isn't recognizing express checkout requests as being triggered by modal checkout, so there can be mismatches in the data we're providing via modal checkout and what WooCommerce would expect, thinking the checkout requests is happening via a standard checkout flow. This could affect any behavior we customize for the modal checkout, including:I'm not sure if this is the right answer, but this PR makes all express checkouts behave as modal checkouts. I couldn't figure out a way to differentiate between express checkout requests from modal checkout vs. standard, but if we have to choose it seems making it inherit modal checkout behavior is preferable.
How to test the changes in this Pull Request:
release
, visit your site in Safari and make a donation. You should be able to see the "Buy with Apple Pay" button and use it to complete the transaction.release
, open a new session and attempt to complete another transaction with Apple Pay. This time you should see an error stating "An account is already registered with your email address. Please log in" even though modal checkout should allow the unauthenticated checkout to occur.Other information: