add_filter( 'woocommerce_catalog_orderby', 'so_37445423_orderby_options', 20 );
function so_37445423_orderby_options( $options ){
$options['menu_order'] = __('Sort the normal way', 'your-child-theme');
return $options;
}
I’ve added the 20 priority, because I’m guessing that your theme is already filtering this and/or hard-coding them into the orderby.php template. I’m guessing this because the default WooCommerce has “Default sorting” instead of “Sort by Default”. “Sort by name” is also not a part of core.
I hope better way to solve your problem. Just copy and paste your theme of functions.php. Okay
Here’s how you can change the options of the orderby via the
woocommerce_catalog_orderby
filter.I’ve added the 20 priority, because I’m guessing that your theme is already filtering this and/or hard-coding them into the
orderby.php
template. I’m guessing this because the default WooCommerce has “Default sorting” instead of “Sort by Default”. “Sort by name” is also not a part of core.Add this to your themes function.php . Change the translation according to your requirement.
Reference : https://wordpress.org/support/topic/change-woocommerce-sort-by-text
For the guys, who is looking for it’s solution in 2017-2018(Version 4.9.1)…
wp-content > plugins > woocommerce > includes > wc-template-functions.php
Search for: “function woocommerce_catalog_ordering()”. Here it’s line 831.
All the text can be change in this function.
Why do you want to change them? If you want to change the language, then use a language pack (that might work for changing the texts in English also)
I hope better way to solve your problem. Just copy and paste your theme of functions.php. Okay
add_filter(‘woocommerce_catalog_orderby’, ‘wc_customize_product_sorting’);