[Backport to release/11.1] Cherry pick 496 - #68961
Conversation
Testing GuidelinesHi @tpaksu , Apart 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:
|
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 commit that changes plugin code. |
The auto cherry-pick left conflict markers in the wc/v1 and wc/v2 product review controller test files, because release/11.1 lags trunk on those files. Keep release/11.1's existing tests and append only #68954's new tests (plus the create_review helper the v1 tests need); drop the unrelated trunk-only tests the 3-way merge swept into the conflict.
|
Hi @woocommercebot! Your PR contains REST API changes. Please consider updating the REST API documentation if your changes affect the public API. Changed API files: |
This PR is a cherry-pick of #68954 to
release/11.1.Warning
This cherry-pick contained conflicts that have not been resolved
cherry pick has conflictslabel (required to merge)Conflicted Files:
plugins/woocommerce/tests/php/includes/rest-api/Controllers/Version1/class-wc-rest-product-reviews-v1-controller-tests.php(modified in both this backport andrelease/11.1)plugins/woocommerce/tests/php/includes/rest-api/Controllers/Version2/class-wc-rest-product-reviews-v2-controller-tests.php(modified in both this backport andrelease/11.1)Original PR Description
Submission Review Guidelines:
Changes proposed in this Pull Request:
Route order review submissions from the Review Order page through core's
wp_new_comment()pipeline, so they receive the same content filtering, moderation and spam checks as any other comment. Also aligns thewc/v1andwc/v2product review creation endpoints withwc/v3.Closes WOO6-167 .
(For Bug Fixes) Bug introduced in PR # .
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:
Covered by the added PHPUnit suites (OrderReviews handler +
wc/v1/wc/v2controllers).phpcsand PHPStan pass.Milestone
Automatically assign milestone for the next WooCommerce versionChangelog entry
Automatically create a changelog entry from the details below.This Pull Request does not require a changelog entry. (Comment required below)Changelog Entry Details
Significance
Type
Message
Route order review submissions through WordPress's comment pipeline so they receive the same filtering and moderation as other comments. (changelog file already added in this PR)
Changelog Entry Comment
Comment
Use of AI Tools