Add "rand" option to orderby
This commit is contained in:
parent
1f5f163916
commit
09d50a04c8
|
@ -485,6 +485,9 @@ class WC_Query {
|
|||
$args['meta_key'] = '';
|
||||
|
||||
switch ( $orderby ) {
|
||||
case 'rand' :
|
||||
$args['orderby'] = 'rand';
|
||||
break;
|
||||
case 'date' :
|
||||
$args['orderby'] = 'date';
|
||||
$args['order'] = $order == 'ASC' ? 'ASC' : 'DESC';
|
||||
|
|
Loading…
Reference in New Issue