[2.6][api] ID needs to be capitalized
Sorting won’t work with lowercase id Fixes #11635 @claudiosmweb
This commit is contained in:
parent
61e2969b83
commit
4a8db96c91
|
@ -521,6 +521,8 @@ abstract class WC_REST_Posts_Controller extends WC_REST_Controller {
|
|||
|
||||
if ( 'include' === $query_args['orderby'] ) {
|
||||
$query_args['orderby'] = 'post__in';
|
||||
} elseif ( 'id' === $query_args['orderby'] ) {
|
||||
$query_args['orderby'] = 'ID'; // ID must be capitalized
|
||||
}
|
||||
|
||||
return $query_args;
|
||||
|
|
Loading…
Reference in New Issue