[REST API] Fixed schema stock_status on products endpoints

This commit is contained in:
Claudio Sanches 2018-10-16 21:12:49 -03:00
parent 8e47d2afd5
commit a9b36a4e23
2 changed files with 4 additions and 2 deletions

View File

@ -567,8 +567,9 @@ class WC_REST_Product_Variations_Controller extends WC_REST_Product_Variations_V
'context' => array( 'view', 'edit' ),
),
'stock_status' => array(
'description' => __( 'Controls the stock status of the product: "instock", "outofstock" or "onbackorder".', 'woocommerce' ),
'description' => __( 'Controls the stock status of the product.', 'woocommerce' ),
'type' => 'string',
'default' => 'instock',
'enum' => array_keys( wc_get_product_stock_status_options() ),
'context' => array( 'view', 'edit' ),
),

View File

@ -926,8 +926,9 @@ class WC_REST_Products_Controller extends WC_REST_Products_V2_Controller {
'context' => array( 'view', 'edit' ),
),
'stock_status' => array(
'description' => __( 'Controls the stock status of the product: "instock", "outofstock" or "onbackorder".', 'woocommerce' ),
'description' => __( 'Controls the stock status of the product.', 'woocommerce' ),
'type' => 'string',
'default' => 'instock',
'enum' => array_keys( wc_get_product_stock_status_options() ),
'context' => array( 'view', 'edit' ),
),