parent
bb651761d0
commit
47ccd78b21
|
@ -549,7 +549,7 @@ class WC_API_Customers extends WC_API_Resource {
|
||||||
$query_args['orderby'] = $args['orderby'];
|
$query_args['orderby'] = $args['orderby'];
|
||||||
|
|
||||||
// allow sorting by meta value
|
// allow sorting by meta value
|
||||||
if ( 'meta_value' === $query_args['orderby'] && ! empty( $args['orderby_meta_key'] ) ) {
|
if ( ! empty( $args['orderby_meta_key'] ) ) {
|
||||||
$query_args['meta_key'] = $args['orderby_meta_key'];
|
$query_args['meta_key'] = $args['orderby_meta_key'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -168,7 +168,7 @@ class WC_API_Resource {
|
||||||
$args['orderby'] = $request_args['orderby'];
|
$args['orderby'] = $request_args['orderby'];
|
||||||
|
|
||||||
// allow sorting by meta value
|
// allow sorting by meta value
|
||||||
if ( 'meta_value' === $args['orderby'] && ! empty( $request_args['orderby_meta_key'] ) ) {
|
if ( ! empty( $request_args['orderby_meta_key'] ) ) {
|
||||||
$args['meta_key'] = $request_args['orderby_meta_key'];
|
$args['meta_key'] = $request_args['orderby_meta_key'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue