-
Notifications
You must be signed in to change notification settings - Fork 69
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
Determine the proper setting for split UPE to work with WooPay #6828
Conversation
d623ec2
to
89c207f
Compare
Test the buildOption 1. Jetpack Beta
Option 2. Jurassic Ninja - available for logged-in A12s🚀 Launch a JN site with this branch 🚀 ℹ️ Install this Tampermonkey script to get more options. Build info:
Note: the build is updated when a new commit is pushed to this PR. |
Size Change: 0 B Total Size: 1.25 MB ℹ️ View Unchanged
|
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.
Can confirm the original issue and that this is indeed resolving it. ✅
Was the root cause of this because the JS config was being overwritten when rendering the payment fields for UPE payment methods? 🤔 If so, maybe we should think about refactoring this in the future, so that like the hooks these global variables are only appended to the page once, to ensure there aren't any more unintended side-effects in the future.
That being said, for now, LGTM. 👍
Yes. This field is now supposed to base only on the card gateway since the flag for non-card gateways was separately added in #6656. I agree the refactor is needed in this area at some point. |
Fixes #6730
Changes proposed in this Pull Request
This PR ensures that for the legacy card gateway in the split UPE, the correct flag is provided to the client side so that the proper Stripe account is used, depending on whether the WooPay is enabled or disabled. Due to the nature of rolling out scripts, we ended up overriding the proper
forceNetworkSavedCards
value with the UPE gateway, which was rolled out as the second and could never use WooPay, leading the flag having the value offalse
always.Testing instructions
giropay
or similar and confirm the successful purchaseCheckout to
develop
, perform steps 1-4 from above and confirm that instead of the fifth successful step, a user is seeingError: No such PaymentMethod: 'pm_${ID}'
.Blocks checkout isn't affected, but making a single purchase and confirming it works will be appreciated.
Perform steps 1-5 for the legacy card gateway and steps 1-6 for the deferred intent creation UPE gateway. Also, sanity checks the legacy UPE checkout by performing steps 1-6 excluding step 2.
npm run changelog
to add a changelog file, choosepatch
to leave it empty if the change is not significant. You can add multiple changelog files in one PR by running this command a few times.Post merge