Changes from master

This commit is contained in:
Mike Jolley 2019-06-26 15:26:58 +01:00
parent 53fccbbf7d
commit 4ba989a07e
2 changed files with 6 additions and 1 deletions

View File

@ -133,7 +133,7 @@ class WC_REST_Customers_V2_Controller extends WC_REST_Customers_V1_Controller {
'readonly' => true,
),
'date_created_gmt' => array(
'description' => __( 'The date the order was created, as GMT.', 'woocommerce-rest-api' ),
'description' => __( 'The date the customer was created, as GMT.', 'woocommerce-rest-api' ),
'type' => 'date-time',
'context' => array( 'view', 'edit' ),
'readonly' => true,

View File

@ -132,6 +132,7 @@ abstract class WC_REST_Controller extends WP_REST_Controller {
// Get the request params.
$items = array_filter( $request->get_params() );
$query = $request->get_query_params();
$response = array();
// Check batch limit.
@ -156,6 +157,10 @@ abstract class WC_REST_Controller extends WP_REST_Controller {
// Set request parameters.
$_item->set_body_params( $item );
// Set query (GET) parameters.
$_item->set_query_params( $query );
$_response = $this->create_item( $_item );
if ( is_wp_error( $_response ) ) {