diff --git a/includes/api/class-wc-rest-products-controller.php b/includes/api/class-wc-rest-products-controller.php index bfbd88115bb..bd5cc003f46 100644 --- a/includes/api/class-wc-rest-products-controller.php +++ b/includes/api/class-wc-rest-products-controller.php @@ -751,7 +751,7 @@ class WC_REST_Products_Controller extends WC_REST_Products_V2_Controller { 'description' => __( 'Product status (post status).', 'woocommerce' ), 'type' => 'string', 'default' => 'publish', - 'enum' => array_keys( get_post_statuses() ), + 'enum' => array_merge( array_keys( get_post_statuses() ), array( 'future' ) ), 'context' => array( 'view', 'edit' ), ), 'featured' => array( diff --git a/includes/api/v1/class-wc-rest-products-controller.php b/includes/api/v1/class-wc-rest-products-controller.php index dcf4d740c0b..f8162881862 100644 --- a/includes/api/v1/class-wc-rest-products-controller.php +++ b/includes/api/v1/class-wc-rest-products-controller.php @@ -1781,7 +1781,7 @@ class WC_REST_Products_V1_Controller extends WC_REST_Posts_Controller { 'description' => __( 'Product status (post status).', 'woocommerce' ), 'type' => 'string', 'default' => 'publish', - 'enum' => array_keys( get_post_statuses() ), + 'enum' => array_merge( array_keys( get_post_statuses() ), array( 'future' ) ), 'context' => array( 'view', 'edit' ), ), 'featured' => array( @@ -2588,7 +2588,7 @@ class WC_REST_Products_V1_Controller extends WC_REST_Posts_Controller { 'default' => 'any', 'description' => __( 'Limit result set to products assigned a specific status.', 'woocommerce' ), 'type' => 'string', - 'enum' => array_merge( array( 'any' ), array_keys( get_post_statuses() ) ), + 'enum' => array_merge( array( 'any', 'future' ), array_keys( get_post_statuses() ) ), 'sanitize_callback' => 'sanitize_key', 'validate_callback' => 'rest_validate_request_arg', ); diff --git a/includes/api/v2/class-wc-rest-products-v2-controller.php b/includes/api/v2/class-wc-rest-products-v2-controller.php index d9f3be54f55..0f2d7978aa7 100644 --- a/includes/api/v2/class-wc-rest-products-v2-controller.php +++ b/includes/api/v2/class-wc-rest-products-v2-controller.php @@ -1538,7 +1538,7 @@ class WC_REST_Products_V2_Controller extends WC_REST_Legacy_Products_Controller 'description' => __( 'Product status (post status).', 'woocommerce' ), 'type' => 'string', 'default' => 'publish', - 'enum' => array_keys( get_post_statuses() ), + 'enum' => array_merge( array_keys( get_post_statuses() ), array( 'future' ) ), 'context' => array( 'view', 'edit' ), ), 'featured' => array( @@ -2105,7 +2105,7 @@ class WC_REST_Products_V2_Controller extends WC_REST_Legacy_Products_Controller 'default' => 'any', 'description' => __( 'Limit result set to products assigned a specific status.', 'woocommerce' ), 'type' => 'string', - 'enum' => array_merge( array( 'any' ), array_keys( get_post_statuses() ) ), + 'enum' => array_merge( array( 'any', 'future' ), array_keys( get_post_statuses() ) ), 'sanitize_callback' => 'sanitize_key', 'validate_callback' => 'rest_validate_request_arg', );