Skip to content

Remove legacy checkout checkbox from settings page #4422

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

Merged
merged 9 commits into from
Jun 20, 2025

Conversation

malithsen
Copy link
Contributor

@malithsen malithsen commented Jun 19, 2025

Fixes STRIPE-535

Changes proposed in this Pull Request:

  • Remove the UI checkbox to enable Legacy Checkout.
  • Remove Legacy Checkout e2e tests as there's no way to setup tests without the checkbox.

Not removed:

We'd want to keep them until we remove the filter introduced in #4385

Testing instructions

  1. Go to Stripe settings YOUR_TEST_SITE/wp-admin/admin.php?page=wc-settings&tab=checkout&section=stripe&panel=settings.
  2. Make sure the checkbox to enable Legacy Checkout is not visible.
  3. (Optional exploratory test) Make sure there's no other option in the UI to enable Legacy checkout

  • 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 June 19, 2025 16:59
@malithsen malithsen requested review from a team, annemirasol, wjrosa and Mayisha and removed request for a team and wjrosa June 19, 2025 16:59
@Mayisha
Copy link
Contributor

Mayisha commented Jun 19, 2025

Let's remove this from the update function also. Removing only from the update function is sufficient as we still want the value in GET response.

malithsen and others added 2 commits June 19, 2025 13:35
This flag is now always set to true. Setting it to false is no longer
possible via UI.
@malithsen
Copy link
Contributor Author

Let's remove this from the update function also. Removing only from the update function is sufficient as we still want the value in GET response

@Mayisha Thanks, that makes sense. Updated in 3915e76

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.

Looks good to me 👍

✅ Legacy checkout checkbox is not displayed anymore on the settings page.
✅ Updating and saving the settings works without any errors.

@annemirasol
Copy link
Contributor

Let's remove this from the update function also. Removing only from the update function is sufficient as we still want the value in GET response

@Mayisha Thanks, that makes sense. Updated in 3915e76

Should we also remove the method update_is_upe_enabled itself? It is private and no longer being used anywhere else.

@malithsen
Copy link
Contributor Author

Should we also remove the method update_is_upe_enabled itself? It is private and no longer being used anywhere else.

@annemirasol Agreed. Removed in dd7bb07

Copy link

📈 PHP Unit Code Coverage Report

Package Line Rate Health
includes/admin/class-wc-rest-stripe-settings-controller.php 82%
Summary 44% (7163 / 16355)

Copy link
Contributor

@annemirasol annemirasol left a comment

Choose a reason for hiding this comment

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

No regressions observed, LGTM!

@malithsen malithsen merged commit e827dc8 into develop Jun 20, 2025
53 checks passed
@malithsen malithsen deleted the update/remove-legacy-toggle branch June 20, 2025 18:05
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.

3 participants