Skip to content
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 express checkout methods dependency #3847

Merged
merged 7 commits into from
Feb 7, 2025

Conversation

hsingyuc
Copy link
Contributor

@hsingyuc hsingyuc commented Feb 6, 2025

Fixes #3828

Changes proposed in this Pull Request:

  • Add is_payment_request_enabled flag to show or hide Apple Pay and Google Pay on the checkout page
  • Filter express payment types before rendering express checkout buttons
Screen.Recording.2025-02-05.at.11.14.44.AM.mov

Testing instructions

  1. With the feature flag off -- this is the default -- verify that Amazon Pay is not available in Stripe settings or in any store page.
  2. Turn the feature flag on, by setting the _wcstripe_feature_amazon_pay option to yes.
  3. Verify that Amazon Pay is now available in Stripe settings.
  4. Go to WC->Settings->Payments->Stripe->Express checkouts section
  5. Uncheck Apple Pay / Google Pay, make sure that Link and Amazon Pay are checked
  6. Visit the classic checkout page (cart, product, and pay-for-order pages) and see that only the Link and Amazon Pay buttons are rendered
  7. Go back to the settings page and uncheck Link and save
  8. Visit the classic checkout page (cart, product, and pay-for-order pages) and see only Amazon Pay button is rendered
  9. Test other scenarios and make sure there are no regressions.

  • Covered with tests (or have a good reason not to test in description ☝️)
  • Added changelog entry in both changelog.txt and readme.txt (or does not apply)
  • Tested on mobile (or does not apply)

Post merge

@hsingyuc hsingyuc requested review from a team and diegocurbelo and removed request for a team February 6, 2025 01:34
@hsingyuc hsingyuc self-assigned this Feb 6, 2025
Copy link
Member

@diegocurbelo diegocurbelo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works as expected for the Product page, the Shortcode Cart and the Shortcode Checkout, however on the Blocks Cart and Blocks Checkout pages Google Pay is still visible.

Are you planning on implementing this for the Blocks pages in another PR? If so, I'll approve this one.


Screenshot 2025-02-07 at 11 33 30

Screenshot 2025-02-07 at 11 33 45

Screenshot 2025-02-07 at 11 38 14

Screenshot 2025-02-07 at 11 34 05

@hsingyuc hsingyuc force-pushed the fix/express-checkout-methods-dependency branch from 5defebc to 7ee6ce7 Compare February 7, 2025 18:05
@hsingyuc
Copy link
Contributor Author

hsingyuc commented Feb 7, 2025

@diegocurbelo, thank you for catching that! Fixed in 7ee6ce7.

@diegocurbelo diegocurbelo self-requested a review February 7, 2025 19:11
@hsingyuc hsingyuc merged commit 50a0da1 into develop Feb 7, 2025
37 checks passed
@hsingyuc hsingyuc deleted the fix/express-checkout-methods-dependency branch February 7, 2025 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Amazon Pay ECE: allow feature to be enabled even when Google Pay/Apple Pay are not
2 participants