improved the validation for WC_API_Customers::edit_customer() and WC_API_Customers::delete_customer()

This commit is contained in:
claudiosmweb 2014-03-04 23:42:36 -03:00
parent f2d8912bc1
commit 344a0d92c6
1 changed files with 2 additions and 2 deletions

View File

@ -373,7 +373,7 @@ class WC_API_Customers extends WC_API_Resource {
// Return the validate error.
if ( is_wp_error( $id ) ) {
return new WP_Error( $id->get_error_code(), $id->get_error_message(), $id->get_error_data() );
return $id;
}
// Customer email.
@ -408,7 +408,7 @@ class WC_API_Customers extends WC_API_Resource {
// Return the validate error.
if ( is_wp_error( $id ) ) {
return new WP_Error( $id->get_error_code(), $id->get_error_message(), $id->get_error_data() );
return $id;
}
return $this->delete( $id, 'customer' );