Skip to content

[Backport to release/11.1] Cherry pick 496 - #68961

Merged
senadir merged 2 commits into
release/11.1from
cherry-pick-PR68954-to-release/11.1
Sep 22, 2026
Merged

senadir merged 2 commits into
release/11.1from
cherry-pick-PR68954-to-release/11.1

Conversation

@woocommercebot

Copy link
Copy Markdown
Collaborator

This PR is a cherry-pick of #68954 to release/11.1.

Warning

This cherry-pick contained conflicts that have not been resolved

  1. Review and resolve all conflicts
  2. Remove the cherry pick has conflicts label (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 and release/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 and release/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 the wc/v1 and wc/v2 product review creation endpoints with wc/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:

  1. Enable the Customer Review Request feature.
  2. Open the Review Order page for a completed order, submit reviews, and confirm they render correctly on the product page and the Store API.
  3. Confirm submissions honor Settings → Discussion (comment moderation, disallowed keys) like any other comment, and that resubmitting for an item updates the existing review instead of creating duplicates.

Testing that has already taken place:

Covered by the added PHPUnit suites (OrderReviews handler + wc/v1 / wc/v2 controllers). phpcs and PHPStan pass.

Milestone

Note: Check the box above to have the milestone automatically assigned when merged.
Alternatively (e.g. for point releases), manually assign the appropriate milestone.

Changelog 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

  • Patch
  • Minor
  • Major

Type

  • Fix - Fixes an existing bug
  • Add - Adds functionality
  • Update - Update existing functionality
  • Dev - Development related task
  • Tweak - A minor adjustment to the codebase
  • Performance - Address performance issues
  • Enhancement - Improvement to existing functionality

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

@github-actions

Copy link
Copy Markdown
Contributor

Testing Guidelines

Hi @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:

  • 🖼️ Screenshots or screen recordings.
  • 📝 List of functionality tested / steps followed.
  • 🌐 Site details (environment attributes such as hosting type, plugins, theme, store size, store age, and relevant settings).
  • 🔍 Any analysis performed, such as assessing potential impacts on environment attributes and other plugins, conducting performance profiling, or using LLM/AI-based analysis.

⚠️ Within the testing details you provide, please ensure that no sensitive information (such as API keys, passwords, user data, etc.) is included in this public issue.

@github-actions github-actions Bot added this to the 11.1.0 milestone Sep 22, 2026
@github-actions github-actions Bot added the plugin: woocommerce Issues related to the WooCommerce Core plugin. label Sep 22, 2026
@woocommercebot woocommercebot mentioned this pull request Sep 22, 2026
18 tasks
@github-actions

github-actions Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Test using WordPress Playground

The changes in this pull request can be previewed and tested using a WordPress Playground instance.
WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

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.
@senadir
senadir merged commit 9ff4f20 into release/11.1 Sep 22, 2026
27 of 34 checks passed
@senadir
senadir deleted the cherry-pick-PR68954-to-release/11.1 branch September 22, 2026 13:31
@github-actions github-actions Bot added the metric: feature freeze exception A tracking label for PRs that were merged after the feature freeze. label Sep 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ API Documentation Reminder

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:

plugins/woocommerce/includes/rest-api/Controllers/Version1/class-wc-rest-product-reviews-v1-controller.php

@github-actions github-actions Bot added the needs: documentation The issue/PR requires documentation to be added. label Sep 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

metric: feature freeze exception A tracking label for PRs that were merged after the feature freeze. needs: documentation The issue/PR requires documentation to be added. plugin: woocommerce Issues related to the WooCommerce Core plugin.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants