[REST API] Fixed schema stock_status on products endpoints
This commit is contained in:
parent
8e47d2afd5
commit
a9b36a4e23
|
@ -567,8 +567,9 @@ class WC_REST_Product_Variations_Controller extends WC_REST_Product_Variations_V
|
||||||
'context' => array( 'view', 'edit' ),
|
'context' => array( 'view', 'edit' ),
|
||||||
),
|
),
|
||||||
'stock_status' => array(
|
'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',
|
'type' => 'string',
|
||||||
|
'default' => 'instock',
|
||||||
'enum' => array_keys( wc_get_product_stock_status_options() ),
|
'enum' => array_keys( wc_get_product_stock_status_options() ),
|
||||||
'context' => array( 'view', 'edit' ),
|
'context' => array( 'view', 'edit' ),
|
||||||
),
|
),
|
||||||
|
|
|
@ -926,8 +926,9 @@ class WC_REST_Products_Controller extends WC_REST_Products_V2_Controller {
|
||||||
'context' => array( 'view', 'edit' ),
|
'context' => array( 'view', 'edit' ),
|
||||||
),
|
),
|
||||||
'stock_status' => array(
|
'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',
|
'type' => 'string',
|
||||||
|
'default' => 'instock',
|
||||||
'enum' => array_keys( wc_get_product_stock_status_options() ),
|
'enum' => array_keys( wc_get_product_stock_status_options() ),
|
||||||
'context' => array( 'view', 'edit' ),
|
'context' => array( 'view', 'edit' ),
|
||||||
),
|
),
|
||||||
|
|
Loading…
Reference in New Issue