Home Forums Basel support forum Remove some elements from filter "Sort by" Reply To: Remove some elements from filter "Sort by"

#28108

svaldesm
Participant

OK I already found the solution.
In case someone else is looking, this worked for me:


function my_woocommerce_catalog_orderby( $orderby ) {
    unset($orderby["menu-order"]);
	unset($orderby["popularity"]);
    unset($orderby["rating"]);
    return $orderby;
}
add_filter( "woocommerce_catalog_orderby", "my_woocommerce_catalog_orderby", 20 );