Fixedd status

This commit is contained in:
Claudio Sanches 2017-02-17 01:17:52 -02:00
parent 58d90a2ee8
commit a46aea1b77
1 changed files with 1 additions and 1 deletions

View File

@ -222,7 +222,7 @@ abstract class WC_REST_CRUD_Controller extends WC_REST_Posts_Controller {
$object = $this->get_object( (int) $request['id'] );
if ( ! $object || 0 === $object->get_id() ) {
return new WP_Error( "woocommerce_rest_{$this->post_type}_invalid_id", __( 'Invalid ID.', 'woocommerce' ), array( 'status' => 404 ) );
return new WP_Error( "woocommerce_rest_{$this->post_type}_invalid_id", __( 'Invalid ID.', 'woocommerce' ), array( 'status' => 400 ) );
}
$object = $this->save_object( $request, false );