Fix issue in order by date (https://github.com/woocommerce/woocommerce-blocks/pull/1598)
* fix order by of date order in products
This commit is contained in:
parent
d7be99b520
commit
7e81841e83
|
@ -31,7 +31,6 @@ const generateQuery = ( { sortValue, currentPage, attributes } ) => {
|
|||
case 'menu_order':
|
||||
case 'popularity':
|
||||
case 'rating':
|
||||
case 'date':
|
||||
case 'price':
|
||||
return {
|
||||
orderby: orderName,
|
||||
|
@ -42,6 +41,11 @@ const generateQuery = ( { sortValue, currentPage, attributes } ) => {
|
|||
orderby: 'price',
|
||||
order: 'desc',
|
||||
};
|
||||
case 'date':
|
||||
return {
|
||||
orderby: 'date',
|
||||
order: 'desc',
|
||||
};
|
||||
}
|
||||
};
|
||||
return {
|
||||
|
|
Loading…
Reference in New Issue