-
Notifications
You must be signed in to change notification settings - Fork 206
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
Integrating ECE to shortcode checkout #3436
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.
Thanks for kicking these changes off Wesley, I've just taken a quick code review and left some notes.
I will base my branch off this PR to start looking at implementing ECE on the product page
includes/payment-methods/class-wc-stripe-express-checkout-element.php
Outdated
Show resolved
Hide resolved
Thanks, @Mayisha ! Can you and @james-allan test this again now that I have rebased it with your newly created PR? |
// option IDs. | ||
throw new Exception( __( 'Unable to provide shipping options for express checkout.', 'woocommerce-gateway-stripe' ) ); | ||
// The Payment Requests will try to load indefinitely if there are duplicate shipping option IDs. | ||
throw new Exception( __( 'Unable to provide shipping options for Payment Requests.', 'woocommerce-gateway-stripe' ) ); |
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.
QQ - Is the wording of this message and the comment above intentionally changed from express checkout
to Payment requests
?
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.
I think so, to make sense with the class name. This specific line was changed by @mattallan
…oocommerce/woocommerce-gateway-stripe into add/ece-for-shortcode-checkout
@Mayisha, I have fixed the issue you reported on Slack. Some parameters were missing from the fake cart data provided. Now, it is working fine for me (I hope it fixes it for you folks, too). |
This looks good to me. I tested a couple of different general scenarios.
https://github.com/user-attachments/assets/f09ed8fb-2bfa-4545-98e3-48c258a7e35c\
I'm happy if we want to handle this separately given the large size of this PR and the other work depending on this PR being merged. @Mayisha I'm not sure if there are other specific tests you had you want us to check as part of this feature. Let me know if there are specific flows we should check etc. :) |
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 @wjrosa for the implementation. I have tested with Google Pay and everything is working on the shortcode checkout page.
✅ Purchasing simple product, digital product, simple subscription work.
✅ Checkout with different shipping methods (free, flat rate) works. Tested by changing the shipping method both from checkout page and Google Pay modal.
✅ I can not reproduce the issue related to shipping address anymore.
Thanks @james-allan for testing other scenarios. I have created separate issues for the coupon and payment method title errors.
…oocommerce/woocommerce-gateway-stripe into add/ece-for-shortcode-checkout
Fixes #3404
Doc: https://docs.stripe.com/elements/express-checkout-element
Changes proposed in this Pull Request:
This PR introduces the new Stripe Express Checkout Element to our shortcode checkout, replacing the current PRB version.
This integration is heavily based on WCPay's, with just some adjustments to adapt the code to our needs and standards.
Testing instructions
Apply this PR to your test environment (
add/ece-for-shortcode-checkout
)Make sure it is publicly accessible. You can use ngrok for this (or a JN website)
Enable the ECE flag. You can hardcode
is_stripe_ece_enabled
totrue
As a merchant, connect your Stripe account and create a shortcode checkout page
As a customer, add any product to your cart
Go to the shortcode checkout page
Confirm that the new ECE buttons are loaded:
Confirm that you can place an order successfully
changelog.txt
andreadme.txt
(or does not apply)Post merge
cc @Mayisha