This tutorial will show you how to customize the default sort / order drop-down list in Woocommerce:

You can check the steps listed below:

Log in to the FTP / File Manager and go to the wp-content / themes / themeXXXXX / includes folder to open the custom-function.php file:

Add this code to the bottom of the custom-function.php file, before closing the code? >

// Edit WooCommerce dropdown menu item of shop page//
// Options: menu_order, popularity, rating, date, price, price-desc

function my_woocommerce_catalog_orderby( $orderby ) {
unset($orderby["price"]);
unset($orderby["price-desc"]);
return $orderby;
}
add_filter( "woocommerce_catalog_orderby", "my_woocommerce_catalog_orderby", 20 );

Each is not set ($ orderby [ “field_from_Options”]); the required part will be deleted by simply replacing field_from_Options with the fields you need.

You can select a field name from the following options: menu_order, popularity, rating, date, price, price.

Save the file and refresh the site to view the changes: