Remove duplicated string in reviews endpoint

This commit is contained in:
Claudio Sanches 2018-10-26 19:31:03 -03:00
parent 3aa9b60b61
commit 47a6c32d5c
1 changed files with 1 additions and 1 deletions

View File

@ -391,7 +391,7 @@ class WC_REST_Product_Reviews_Controller extends WC_REST_Controller {
* Do not allow a comment to be created with missing or empty comment_content. See wp_handle_comment_submission().
*/
if ( empty( $prepared_review['comment_content'] ) ) {
return new WP_Error( 'wc_rest_review_content_invalid', __( 'Invalid product review content.', 'woocommerce' ), array( 'status' => 400 ) );
return new WP_Error( 'woocommerce_rest_review_content_invalid', __( 'Invalid review content.', 'woocommerce' ), array( 'status' => 400 ) );
}
// Setting remaining values before wp_insert_comment so we can use wp_allow_comment().