[2.6][api] ID needs to be capitalized

Sorting won’t work with lowercase id

Fixes #11635

@claudiosmweb
This commit is contained in:
Mike Jolley 2016-08-08 12:10:29 +01:00
parent 61e2969b83
commit 4a8db96c91
1 changed files with 2 additions and 0 deletions

View File

@ -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;