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

Remove support for legacy form checkout #3691

Merged
merged 1 commit into from
Jan 20, 2025
Merged

Conversation

claudiulodro
Copy link
Contributor

@claudiulodro claudiulodro commented Jan 20, 2025

All Submissions:

Changes proposed in this Pull Request:

Removes support for the legacy form-based WooCommerce checkout. Other than for backwards compatibility, I believe the main purpose it's still around is to support browsers that have JS disabled, but that's not something we support (especially since it wouldn't work with reCaptcha).

How to test the changes in this Pull Request:

Simplest way to verify that it's been removed:

  1. Add a die( 'ATTEMPTING FORM CHECKOUT' ); here in your Woo plugin in the checkout_action method.
  2. Put this script somewhere:
<?php

$site = 'http://newspackdev.local';

$body = [
	'woocommerce_checkout_place_order'    => 1,
];

var_dump( wp_remote_post( $site, [ 'body' => $body, 'timeout' => 50 ] ) );
  1. Run it with wp eval-file scriptfile.php before applying this patch. Observe that the response contains that ATTEMPTING FORM CHECKOUT string within it.
  2. Apply the patch. Run the script again. Observe that the response doesn't contain the string.
  3. Verify regular Checkout screen and modal checkout work.

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully ran tests with your changes locally?

@claudiulodro claudiulodro added the [Status] Needs Review The issue or pull request needs to be reviewed label Jan 20, 2025
@claudiulodro claudiulodro requested a review from a team as a code owner January 20, 2025 20:16
@github-actions github-actions bot added [Status] Approved The pull request has been reviewed and is ready to merge and removed [Status] Needs Review The issue or pull request needs to be reviewed labels Jan 20, 2025
Copy link
Contributor

@dkoo dkoo left a comment

Choose a reason for hiding this comment

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

@claudiulodro this could be a hotfix, if we wanted it to go out sooner

@claudiulodro
Copy link
Contributor Author

I'm OK sending it through the regular release flow just to benefit from the alpha release testing/process. It's pretty straightforward to add this code snippet to a site in an emergency in the meantime though.

@claudiulodro claudiulodro merged commit 46a3c16 into trunk Jan 20, 2025
10 checks passed
@claudiulodro claudiulodro deleted the add/woo-checkout branch January 20, 2025 23:24
Copy link

Hey @claudiulodro, good job getting this PR merged! 🎉

Now, the needs-changelog label has been added to it.

Please check if this PR needs to be included in the "Upcoming Changes" and "Release Notes" doc. If it doesn't, simply remove the label.

If it does, please add an entry to our shared document, with screenshots and testing instructions if applicable, then remove the label.

Thank you! ❤️

matticbot pushed a commit that referenced this pull request Jan 23, 2025
# [5.13.0-alpha.1](v5.12.2...v5.13.0-alpha.1) (2025-01-23)

### Bug Fixes

* add supported gateways check ([#3650](#3650)) ([74f7773](74f7773))
* **corrections:** replace deprecated sanitize method ([#3694](#3694)) ([ce50e24](ce50e24))
* remove support for legacy form checkout ([#3691](#3691)) ([46a3c16](46a3c16))
* **wcs:** expire manual subscriptions after on-hold duration ([#3681](#3681)) ([658416c](658416c))

### Features

* add custom bylines ([#3667](#3667)) ([3f45a6f](3f45a6f))
* rate limit checkout attempts ([#3678](#3678)) ([d275524](d275524))
@matticbot
Copy link
Contributor

🎉 This PR is included in version 5.13.0-alpha.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released on @alpha [Status] Approved The pull request has been reviewed and is ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants