Merge pull request #13732 from woocommerce/rest-api-fix-context

[REST API] Fixed context from items in schema
This commit is contained in:
Mike Jolley 2017-03-23 11:04:50 +00:00 committed by GitHub
commit b334af4544
3 changed files with 3 additions and 3 deletions

View File

@ -369,7 +369,7 @@ class WC_REST_Order_Refunds_Controller extends WC_REST_Orders_Controller {
'refunded_by' => array(
'description' => __( 'User ID of user who created the refund.', 'woocommerce' ),
'type' => 'integer',
'context' => array( 'view' ),
'context' => array( 'view', 'edit' ),
),
'meta_data' => array(
'description' => __( 'Meta data.', 'woocommerce' ),

View File

@ -1913,7 +1913,7 @@ class WC_REST_Products_Controller extends WC_REST_Legacy_Products_Controller {
'variations' => array(
'description' => __( 'List of variations IDs.', 'woocommerce' ),
'type' => 'array',
'context' => array( 'view' ),
'context' => array( 'view', 'edit' ),
'items' => array(
'type' => 'integer',
),

View File

@ -1914,7 +1914,7 @@ class WC_REST_Products_V1_Controller extends WC_REST_Posts_Controller {
'type' => 'string',
'default' => 'standard',
'enum' => array( 'standard' ),
'context' => array( 'view' ),
'context' => array( 'view', 'edit' ),
),
'external_url' => array(
'description' => __( 'Product external URL. Only for external products.', 'woocommerce' ),