Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

SPE: Remove radio buttons #4138

Merged
merged 5 commits into from
Mar 25, 2025
Merged

SPE: Remove radio buttons #4138

merged 5 commits into from
Mar 25, 2025

Conversation

malithsen
Copy link
Contributor

Fixes #4115

Changes proposed in this Pull Request:

Hide the radio buttons in the SPE by updating the options passed into Stripe.

Before After
Classic CleanShot 2025-03-24 at 15 03 12 CleanShot 2025-03-24 at 15 01 59
Block CleanShot 2025-03-24 at 15 03 41 CleanShot 2025-03-24 at 15 07 03

Testing instructions

  • Checkout and build this branch on your test environment (tweak/spe-changes-to-match-woo-visuals)
  • Connect your Stripe account
  • On your Stripe dashboard, enable multiple payment methods
  • Copy your child payment method configuration ID from here: https://dashboard.stripe.com/settings/payment_methods (labeled "Your configuration")
  • Insert the ID above on client/blocks/upe/upe-deferred-intent-creation/payment-elements.js:139. This is temporary until the parent configuration, labeled WooCommerce Inc., supports all methods by default
  • Insert the ID above on client/classic/upe/payment-processing.js:136 as well
  • Build the frontend files (npm run build:webpack)
  • Enable the SPE feature flag (_wcstripe_feature_spe). You can do it by either hardcoding the return value of is_spe_available to true or by running npm run wp option update _wcstripe_feature_spe 'yes'
  • As a merchant, disable the legacy checkout experience in settings (wp-admin/admin.php?page=wc-settings&tab=checkout&section=stripe&panel=settings)
  • Enable the Single Payment Element feature
  • As a shopper, add any product to the cart and visit Block checkout.
  • Make sure no radio buttons show up in SPE.
  • Switch to the classic checkout.
  • Make sure no radio buttons show up in SPE.

  • 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

@malithsen malithsen marked this pull request as ready for review March 24, 2025 20:13
@malithsen malithsen requested review from a team and Mayisha and removed request for a team March 24, 2025 20:13
Copy link
Contributor

@Mayisha Mayisha left a comment

Choose a reason for hiding this comment

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

Nice little change but a big UI improvement. I do not see the radio buttons with each method anymore. 👍

develop
Screenshot 2025-03-25 at 4 07 04 PM

tweak/spe-remove-radio-btns

Shortcode

Screenshot 2025-03-25 at 4 07 56 PM

Block

Screenshot 2025-03-25 at 4 16 01 PM

@malithsen malithsen enabled auto-merge (squash) March 25, 2025 14:24
@malithsen malithsen merged commit b0b09b1 into develop Mar 25, 2025
35 checks passed
@malithsen malithsen deleted the tweak/spe-remove-radio-btns branch March 25, 2025 15:18
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SPE: Hide the Stripe default radio buttons
2 participants