Menu Close

How to Change the Default Sorting Title in WooCommerce

Before editing your theme file, you should create a child theme. Doing so will ensure that you are not breaking any core functionality of your website. Once complete, open the functions.php file of your child theme paste the following code at the end of the file:

// Changing “Default Sorting” to “Sort” on Shop and Product settings pages

function sip_update_sorting_name( $catalog_orderby ) {
$catalog_orderby = str_replace(“Default sorting”, “Recommended sorting”, $catalog_orderby);
return $catalog_orderby;
}
add_filter( ‘woocommerce_catalog_orderby’, ‘sip_update_sorting_name’ );
add_filter( ‘woocommerce_default_catalog_orderby_options’, ‘sip_update_sorting_name’ );

After pasting, save the file and reload your website. You will see the updated names at the Shop and the WooCommerce settings page. That’s it!