From 41a5b147e9b61228b92e7b54dd9b16a38def761d Mon Sep 17 00:00:00 2001 From: claudiosmweb Date: Tue, 4 Mar 2014 18:05:22 -0300 Subject: [PATCH] improved the WP_Error's ids in customers api --- includes/api/class-wc-api-customers.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/api/class-wc-api-customers.php b/includes/api/class-wc-api-customers.php index 96a01a7b676..fd2d8ffb4f5 100644 --- a/includes/api/class-wc-api-customers.php +++ b/includes/api/class-wc-api-customers.php @@ -326,7 +326,7 @@ class WC_API_Customers extends WC_API_Resource { // Checks with the email is missing. if ( ! isset( $data['email'] ) ) { - return new WP_Error( 'woocommerce_api_user_cannot_create_customer', sprintf( __( 'Missing parameter %s' ), 'email' ), array( 'status' => 400 ) ); + return new WP_Error( 'woocommerce_api_missing_customer_email', sprintf( __( 'Missing parameter %s' ), 'email' ), array( 'status' => 400 ) ); } // Sets the username. @@ -344,7 +344,7 @@ class WC_API_Customers extends WC_API_Resource { // Checks for an error in the customer creation. if ( is_wp_error( $id ) ) { - return new WP_Error( 'woocommerce_api_user_cannot_create_customer', $id->get_error_message(), array( 'status' => 400 ) ); + return new WP_Error( 'woocommerce_api_cannot_create_customer', $id->get_error_message(), array( 'status' => 400 ) ); } // Added customer data.