-
Notifications
You must be signed in to change notification settings - Fork 10.7k
[Backport to release/10.4] [Cart shortcode] Fix undo cart item removal action #62529
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
Conversation
Testing GuidelinesApart from reviewing the code changes, please make sure to review the testing instructions (Guide) and verify that relevant tests (E2E, Unit, Integration, etc.) have been added or updated as needed. Reminder: PR reviewers are required to document testing performed. This includes:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤖 Backwards Compatibility Review - Found 1 potential issue
Generated by Claude via this workflow run
Test using WordPress PlaygroundThe changes in this pull request can be previewed and tested using a WordPress Playground instance. Test this pull request with WordPress Playground. Note that this URL is valid for 30 days from when this comment was last updated. You can update it by closing/reopening the PR or pushing a new commit. |
ralucaStan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fixed the PHPStan baseline conflict.
I tested again and worked as expected
This PR is a cherry-pick of #62472 to
release/10.4.Original PR Description
Submission Review Guidelines:
Changes proposed in this Pull Request:
After updating to WooCommerce 10.4.2, the "Undo" button for cart item removal didn't work anymore.
The
clean_up_removed_cart_contents()method clearedremoved_cart_contentsontemplate_redirecthook, but it ran on the same request that displays the undo link, not on the next user-initiated request.This PR adds a check for the
removed_item=1query parameter, which is set when redirecting after item removal.Closes #62456.
Closes https://linear.app/a8c/issue/WOOPLUG-6006/undo-item-deletion-from-cart-does-not-work-after-update-to-1042
(For Bug Fixes) Bug introduced in PR #61223
How to test the changes in this Pull Request:
Using the WooCommerce Testing Instructions Guide, include your detailed testing instructions:
Testing that has already taken place:
I also tested with Products bundle to make sure the was no regression
Milestone
Changelog entry
Changelog Entry Details
Significance
Type
Message
Changelog Entry Comment
Comment