-
Notifications
You must be signed in to change notification settings - Fork 10.8k
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 reference assignment operator #52583
Conversation
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. |
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.
@octaedro I've tested and confirmed this change works as expected and, per our discussion in Slack (p1730226517486409-slack-C02FL3X7KR6), it's probably a better approach than manually resetting the query.
It seems possible that these reference assignment operators are the root cause of the bug to begin with and this issue was just not noticed until much later.
0523d89
to
5398b98
Compare
5b262e9
to
f57d865
Compare
Hi @danielwrobert, @woocommerce/woo-fse Apart from reviewing the code changes, please make sure to review the testing instructions and verify that relevant tests (E2E, Unit, Integration, etc.) have been added or updated as needed. You can follow this guide to find out what good testing instructions should look like: |
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.
Tested again and confirmed everything still works as expected.
Thanks for working on this! 🚀
Thanks for accepting the collaboration @octaedro @danielwrobert 🚀 |
Submission Review Guidelines:
Changes proposed in this Pull Request:
This PR eliminates the reference assignment operator from the following files:
cross-sells
upsells
related
The presence of the reference assignment operator in these files was causing unexpected behaviors.
Before
Screen.Recording.on.2024-11-21.at.01-11-03.mp4
After
after.mp4
There is a more detailed explanation here.
Closes #42785.
Acknowledgements
A big shoutout to @alexiglesias31 for collaborating on this issue and bringing it to our attention. Your vigilance and contributions are greatly appreciated! 🙌
How to test the changes in this Pull Request:
Using the WooCommerce Testing Instructions Guide, include your detailed testing instructions:
Shortcode
block and paste[product_page id="your-product-id"]
. Replaceyour-product-id
with the id of the product you just created.Publish
and refresh the page.Changelog entry
Changelog Entry Details
Significance
Type
Message
Changelog Entry Comment
Comment