Enable support trash status for products when its passed

This commit is contained in:
vedanshujain 2020-05-07 23:06:33 +05:30
parent 569e656459
commit f7eab9db6e
1 changed files with 1 additions and 1 deletions

View File

@ -2115,7 +2115,7 @@ class WC_REST_Products_V2_Controller extends WC_REST_CRUD_Controller {
'default' => 'any',
'description' => __( 'Limit result set to products assigned a specific status.', 'woocommerce-rest-api' ),
'type' => 'string',
'enum' => array_merge( array( 'any', 'future' ), array_keys( get_post_statuses() ) ),
'enum' => array_merge( array( 'any', 'future', 'trash' ), array_keys( get_post_statuses() ) ),
'sanitize_callback' => 'sanitize_key',
'validate_callback' => 'rest_validate_request_arg',
);