public function update_item_permissions_check( $request ) {

		$id = (int) $request['id'];

		$comment = get_comment( $id );

		if ( $comment && ! $this->check_edit_permission( $comment ) ) {
			return new WP_Error( 'rest_cannot_edit', __( 'Sorry, you can not edit this comment.' ), array( 'status' => rest_authorization_required_code() ) );
		}

		return true;
	}
public function update_item_permissions_check( $request ) {

		$id = (int) $request['id'];

		$comment = get_comment( $id );

		if ( $comment && ! $this->check_edit_permission( $comment ) ) {
			return new WP_Error( 'rest_cannot_edit', __( 'Sorry, you can not edit this comment.' ), array( 'status' => rest_authorization_required_code() ) );
		}

		return true;
	}
public function update_item_permissions_check ( $ request ) { $ id = ( int ) $ request [ 'id' ] ; $ comment = get_comment ( $ id ) ; if ( $ comment && ! $ this -> check_edit_permission ( $ comment ) ) { return new WP_Error ( 'rest_cannot_edit' , __ ( 'Sorry, you can not edit this comment.' ) , array ( 'status' => rest_authorization_required_code ( ) ) ) ; } return true ; }
Check if a given request has access to update a comment

@param  WP_REST_Request $request Full details about the request.
@return WP_Error|boolean
Check if a given request has access to update a comment