/* WooCommerce Remove Default Sorting Options */
function wpflt_unset_default_sorting_options( $options ) {
unset( $options[ 'menu_order' ] );
//unset( $options[ 'popularity' ] );
//unset( $options[ 'rating' ] );
unset( $options[ 'date' ] );
//unset( $options[ 'price' ] );
//unset( $options[ 'price-desc' ] );
return $options;
}
add_filter( 'woocommerce_catalog_orderby', 'wpflt_unset_default_sorting_options' );
The Default Sorting Options in WooCommerce are,
Default Sorting (menu_order)
Sort By Popularity (popularity)
Sort By Average Rating (rating)
Sort By Latest (date)
Sort by Price: Low to High (price)
Sort by Price: High to Low (price-desc)
Add the mentioned Code to your child theme’s functions.php. Only Unset the ‘sorting options’ that you don’t need. Delete/ Comment (//) the rest.
Also Read,