Updated filter to support backward compatibility

This commit is contained in:
anitaamurthy 2022-01-07 16:45:40 +05:30
parent 89d8cb6a9b
commit 2a43c843ec
1 changed files with 1 additions and 1 deletions

View File

@ -29,7 +29,7 @@ class WC_REST_Coupons_Controller extends WC_REST_Coupons_V2_Controller {
$args = WC_REST_CRUD_Controller::prepare_objects_query( $request );
// Set post_status.
$args['post_status'] = $request['status'] ?: 'all';
$args['post_status'] = $request['status'];
if ( ! empty( $request['code'] ) ) {
$id = wc_get_coupon_id_by_code( $request['code'] );