* fix order by of date order in products
This commit is contained in:
Seghir Nadir 2020-01-20 00:00:43 +01:00 committed by GitHub
parent d7be99b520
commit 7e81841e83
1 changed files with 5 additions and 1 deletions

View File

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