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

Hide Express Checkout in block editor if disabled #3523

Draft
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

annemirasol
Copy link
Contributor

@annemirasol annemirasol commented Oct 17, 2024

Fixes #3437

Changes proposed in this Pull Request:

Do not display the express checkout buttons (PRB or ECE) in the block editor when they are not enabled as payment methods.

Testing instructions

  1. With Apple Pay/Google Pay and/or Link enabled, go to wp-admin Pages and edit the (Block) Checkout page.
  2. You should see the Express Payment block in the editor. See Screenshot 1.
  3. Disable Apple Pay/Google Pay, and refresh the editor.
  4. You should no long see the Express Payment block in the editor. See Screenshot 2.
  5. Test this for both ECE and PRB by toggling the feature flag.
    • To enable ECE, add _wcstripe_feature_ece with the value of yes to your wp_options table.
  6. Test the same for when editing the Cart page.
  7. Verify that the actual cart and checkout pages still work as expected, i.e. customer can see Apple Pay/Google Pay if enabled, and can purchase using them.

Screenshot 1. Apple Pay/Google Pay is enabled, and appears in the block editor.
Screenshot 2024-10-18 at 3 57 58 PM

Screenshot 2: Apple Pay/Google Pay is not enabled, and does not appear in the block editor.
Screenshot 2024-10-18 at 3 58 14 PM


  • 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

@annemirasol annemirasol force-pushed the fix/3437-hide-disabled-express-checkout-in-block-editor branch from 8ebb5e4 to 89a04a6 Compare October 18, 2024 21:57
@annemirasol annemirasol marked this pull request as ready for review October 18, 2024 22:15
@annemirasol annemirasol requested review from a team and diegocurbelo and removed request for a team October 18, 2024 22:18
@annemirasol annemirasol self-assigned this Oct 18, 2024
@annemirasol annemirasol force-pushed the fix/3437-hide-disabled-express-checkout-in-block-editor branch from b0ff2e9 to 19cd1ca Compare October 30, 2024 15:19
@annemirasol annemirasol marked this pull request as draft October 30, 2024 15:23
@annemirasol annemirasol removed the request for review from diegocurbelo October 30, 2024 15:32
@annemirasol
Copy link
Contributor Author

Outstanding issues:

  • When only Link is enabled, the block shows Apple Pay only
  • When only Apple Pay/Google Pay is enabled, the block shows Apple Pay, Google Pay and Link

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.

Editing the Checkout Block displays express payment method buttons even when they are disabled
1 participant