I try to change the order of the sorting of the dropdown.
I have changed the function.php of child theme to unset rating by this:
// Modify the default WooCommerce orderby dropdown
//
// Options: menu_order, popularity, rating, date, price, price-desc
function my_woocommerce_catalog_orderby( $orderby ) {
unset($orderby[“rating”]);
return $orderby;
}
add_filter( “woocommerce_catalog_orderby”, “my_woocommerce_catalog_orderby”, 20 );
But i can’t reverse the order of the popularity and newness.
Could you help me?
Thanks a lot