[API] Added filter option to show all users on customers endpoint, closes #8884

This commit is contained in:
Claudio Sanches 2015-09-30 18:10:43 +02:00
parent 44f4a3b9be
commit 2559c9287a
1 changed files with 4 additions and 0 deletions

View File

@ -531,6 +531,10 @@ class WC_API_Customers extends WC_API_Resource {
// Custom Role
if ( ! empty( $args['role'] ) ) {
$query_args['role'] = $args['role'];
if ( 'all' === $query_args['role'] ) {
unset( $query_args['role'] );
}
}
// Search