Skip to content

Add review to the list of allowed comment types for the /comments/$comment_id#10855

Merged
jeherve merged 1 commit intomasterfrom
update/single-comment-endpoint-review
Dec 6, 2018
Merged

Add review to the list of allowed comment types for the /comments/$comment_id#10855
jeherve merged 1 commit intomasterfrom
update/single-comment-endpoint-review

Conversation

@emdashcodes
Copy link
Copy Markdown

Changes proposed in this Pull Request:

See p90Yrv-Tz-p2.

Prior to WooCommerce 3.5, product reviews were stored as comments with an empty comment type (''). After 3.5, these are now marked with the review type.

A few things relied on being able to update comment status using the WordPress.com REST API, such as the mobile apps and web notifications.

This PR whitelists the review type to restore that behavior.

This was originally part of #10786 -- but separated out since it is a separate fix for the mobile apps.

Testing instructions:

  • Apply this PR/change.
  • Make sure you have WooCommerce with a product setup. Create a product review notification. Take note of the ID.
  • Go to https://developer.wordpress.com/docs/api/console/ and point towards your test Jetpack site.
  • Make a request to GET /sites/:site/comments/:comment (find via the dropdown) and verify that it does not 404.

Proposed changelog entry for your changes:

N/A

@emdashcodes emdashcodes self-assigned this Dec 6, 2018
@emdashcodes emdashcodes requested review from a team and jeherve December 6, 2018 18:48
@matticbot
Copy link
Copy Markdown
Contributor

D21937-code. (newly created revision)

@jeherve jeherve added this to the 6.8.1 milestone Dec 6, 2018
@jetpackbot
Copy link
Copy Markdown
Collaborator

jetpackbot commented Dec 6, 2018

Warnings
⚠️

The PR is missing at least one [Status] label. Suggestions: [Status] In Progress, [Status] Needs Review

This is automated check which relies on PULL_REQUEST_TEMPLATE.We encourage you to follow that template as it helps Jetpack maintainers do their job. If you think 'Testing instructions' or 'Proposed changelog entry' are not needed for your PR - please explain why you think so. Thanks for cooperation 🤖

Generated by 🚫 dangerJS

@jeherve jeherve added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review This PR is ready for review. labels Dec 6, 2018
jeherve
jeherve previously approved these changes Dec 6, 2018
Copy link
Copy Markdown
Member

@jeherve jeherve left a comment

Choose a reason for hiding this comment

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

It works well in my tests. Merging as soon as the tests pass.

@jeherve
Copy link
Copy Markdown
Member

jeherve commented Dec 6, 2018

Cherry-picked to branch-6.8 in 8d9d247

@jeherve jeherve force-pushed the update/single-comment-endpoint-review branch from 15331e9 to ace75d2 Compare December 6, 2018 20:35
@ghost ghost removed the [Status] Ready to Merge Go ahead, you can push that green button! label Dec 6, 2018
Copy link
Copy Markdown
Member

@jeherve jeherve left a comment

Choose a reason for hiding this comment

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

Merging, now that the tests pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants