diff --git a/includes/api/class-wc-api-resource.php b/includes/api/class-wc-api-resource.php index ea29c7fa91a..c245c7382f9 100644 --- a/includes/api/class-wc-api-resource.php +++ b/includes/api/class-wc-api-resource.php @@ -199,6 +199,13 @@ class WC_API_Resource { unset( $request_args['post_status'] ); } + // filter by a list of post id + if ( ! empty( $request_args['in'] ) ) { + $args['post__in'] = explode(",",$request_args['in']); + unset( $request_args['in'] ); + } + + // resource page $args['paged'] = ( isset( $request_args['page'] ) ) ? absint( $request_args['page'] ) : 1;