[API] post__in filter for v2
This commit is contained in:
parent
e003b7803f
commit
349fc2f665
|
@ -204,7 +204,7 @@ class WC_API_Resource {
|
|||
$args['post__in'] = explode( ',', $request_args['in'] );
|
||||
unset( $request_args['in'] );
|
||||
}
|
||||
|
||||
|
||||
// exclude by a list of post id
|
||||
if ( ! empty( $request_args['not_in'] ) ) {
|
||||
$args['post__not_in'] = explode( ',', $request_args['not_in'] );
|
||||
|
|
|
@ -205,6 +205,11 @@ class WC_API_Resource {
|
|||
unset( $request_args['in'] );
|
||||
}
|
||||
|
||||
// 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;
|
||||
|
|
Loading…
Reference in New Issue