-
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): add custom modal checkout validation #2008
Conversation
8ac649d
to
e05d6d7
Compare
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 for tackling this, @chickenn00dle!
I worked through all the payment gateways you listed, and the only issue I ran into is PayPal Payments now shows a "Proceed to PayPal" button:
When I switch back to trunk, the button goes away. The Yellow button works as expected; the Proceed to PayPal button technically works, but it's kind of weird - it loads the form inside of the checkout modal, and then redirects to a full screen to authenticate, then into a non-modal order confirmation.
Just let me know if this doesn't match what you're seeing and I'll see if I can recreate it elsewhere!
e05d6d7
to
93392a5
Compare
Thanks for the review @laurelfulford!
Good catch! I was checking Fixed in 93392a5 |
/** | ||
* Process modal checkout validation. | ||
*/ | ||
public static function validate_checkout_request() { |
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.
@miguelpeixe, I'd love your opinion on this approach for "hijacking" the form validation from Woo. In particular, do you think its safe to rename the woocommerce-process-checkout-nonce
on the front end, then reassign in the backend before triggering WC_Checkout::process_checkout
?
Seems this is no longer needed, so gonna close this one! |
All Submissions:
Changes proposed in this Pull Request:
This PR moves the modal checkout validation request to newspack blocks. We still call
WC_Checkout::process_checkout
, but beforehand we override the needs payment flag so that step 1 of modal checkout doesn't validate payment method (not needed at this point).How to test the changes in this Pull Request:
Other information: