Changes from master
This commit is contained in:
parent
53fccbbf7d
commit
4ba989a07e
|
@ -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,
|
||||
|
|
|
@ -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 ) ) {
|
||||
|
|
Loading…
Reference in New Issue