Skip to content
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

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

Merged
merged 1 commit into from
Dec 6, 2018

Conversation

justinshreve
Copy link
Contributor

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

@justinshreve justinshreve added [Feature] WPCOM API [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. labels Dec 6, 2018
@justinshreve justinshreve self-assigned this Dec 6, 2018
@justinshreve justinshreve requested review from jeherve and a team December 6, 2018 18:48
@matticbot
Copy link
Contributor

D21937-code. (newly created revision)

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

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 To request a review from fellow Jetpack developers. Label will be renamed soon. labels Dec 6, 2018
jeherve
jeherve previously approved these changes Dec 6, 2018
Copy link
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
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
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