Merge pull request #7360 from helpforfitness/master
Filter api results by a list of ids, closes #7359
This commit is contained in:
commit
1452bde645
|
@ -199,6 +199,13 @@ class WC_API_Resource {
|
||||||
unset( $request_args['post_status'] );
|
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
|
// resource page
|
||||||
$args['paged'] = ( isset( $request_args['page'] ) ) ? absint( $request_args['page'] ) : 1;
|
$args['paged'] = ( isset( $request_args['page'] ) ) ? absint( $request_args['page'] ) : 1;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue