-
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
Added a notice about custom checkout fields conflicting with express checkout #8339
Added a notice about custom checkout fields conflicting with express checkout #8339
Conversation
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: -93.9 kB (-7%) ✅ Total Size: 1.19 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.
@gpressutto5 I enjoyed reviewing the implementation, and it tests well, thank you! Two things from my side:
1️⃣ I'm curious if checking the following hooks as well is worth consideration? They also allow adding custom fields. Happy to hear your opinion.
woocommerce_before_checkout_billing_form
woocommerce_after_checkout_billing_form
woocommerce_before_checkout_shipping_form
woocommerce_after_checkout_shipping_form
2️⃣ On the Google Pay / Apple Pay settings page, the positioning of notification seems to be a little bit unexpected
Hey @timur27 1️⃣ The purpose of those filters we're checking is to be used to alter checkout fields. These actions are visual hooks and are not a safe way to add new fields. It can be challenging to check all the possible ways to add new fields, so I checked several different plugins and saw that they always use these filters. So, I believe we can use the filters, and if we still have problems in the future, we can think of another way. What do you think? 2️⃣ The notice component in your print seems different. Could you try rebuilding the bundle and clearing the cache? If the error still persists, please check how the notice is rendered in WooPay's settings page as we are using the same component. |
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.
@gpressutto5 below are my responses but TL;DR is that I'm approving the PR and there's nothing blocking it from being merged. Thanks for the work you did here!
So, I believe we can use the filters, and if we still have problems in the future, we can think of another way. What do you think?
Totally agree with starting small and seeing if there is a need to extend the list of hooks we check. The reason I asked is I remember seeing these additional hooks in a pretty popular third-party plugin.
The notice component in your print seems different. Could you try rebuilding the bundle and clearing the cache? If the error still persists, please check how the notice is rendered in WooPay's settings page as we are using the same component.
I rebuilt, and still, things display strangely. I tried using a different browser and cleared the cache, but had no luck. But then the WooPay notification on develop
(screenshot below) displays the same way, so I am pretty sure this is unrelated to your PR.
Fixes #8299
Changes proposed in this Pull Request
Custom fields are currently incompatible with express checkout methods. This PR adds a notice next to the Apple Pay and Google Pay settings when a change in the checkout fields is detected.
Testing instructions
woocommerce_billing_fields
,woocommerce_shipping_fields
, andwoocommerce_checkout_fields
.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