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

Amazon Pay ECE: update settings to use new payment method #4022

Draft
wants to merge 5 commits into
base: add/amazon-pay-payment-method
Choose a base branch
from

Conversation

annemirasol
Copy link
Contributor

@annemirasol annemirasol commented Mar 6, 2025

Based on add/amazon-pay-payment-method

Part of #3859

Changes proposed in this Pull Request:

As part of supporting subscriptions and payment tokens for Amazon Pay, we introduced Amazon Pay's own payment method class, i.e. WC_Stripe_UPE_Payment_Method_Amazon_Pay, in #4015.

In order for the new payment method to be available to use, it needs to be present in the list of enabled payment methods. This PR updates how we enable and disable Amazon Pay as a payment method, from using a boolean flag to adding and removing it from said list.

Testing instructions

  1. With the Amazon Pay feature flag off (default), verify that you do not see Amazon Pay in wp-admin or in the store.
  2. Turn on the feature flag by:
    • adding _wcstripe_feature_amazon_pay with a value of yes to your wp_options table, or
    • forcing the WC_Stripe_Feature_Flags::is_amazon_pay_available() function to return true
  3. Enable Amazon Pay as a payment method, in the wp-admin Stripe settings page.
  4. Verify that you are able to see Amazon Pay in the product, cart (classic and block), and checkout (classic and block) pages.
  5. Disable Amazon Pay as a payment method, in the wp-admin Stripe settings page.
  6. Verify that you are no longer able to see Amazon Pay in the product, cart (classic and block), and checkout (classic and block) pages.

  • Covered with tests (or have a good reason not to test in description ☝️)
  • Tested on mobile (or does not apply)

Changelog entry

  • This Pull Request does not require a changelog entry. (Comment required below)
Changelog Entry Comment

Comment

Post merge

@annemirasol annemirasol force-pushed the add/amazon-pay-payment-method branch from ffb17cd to 82bc8c6 Compare March 6, 2025 17:47
@annemirasol annemirasol force-pushed the update/amazon-pay-settings branch 2 times, most recently from ef2f0f1 to 22389ef Compare March 7, 2025 17:57
@annemirasol annemirasol self-assigned this Mar 7, 2025
@annemirasol annemirasol force-pushed the add/amazon-pay-payment-method branch from 82bc8c6 to fcf70df Compare March 7, 2025 18:53
@annemirasol annemirasol force-pushed the update/amazon-pay-settings branch from 22389ef to 6b8d82a Compare March 7, 2025 19:06
@annemirasol annemirasol force-pushed the update/amazon-pay-settings branch from 6b8d82a to 2cba565 Compare March 7, 2025 21:31
@annemirasol annemirasol force-pushed the add/amazon-pay-payment-method branch from 6428bcc to a8bccba Compare March 10, 2025 18:58
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.

1 participant