How to Get WordPress, PHP, and Plugin ...
This useful snippet provides essential debugging information, including WordPress, PH...

WPCodeBox
803
This WooCommerce snippet allows you to easily change the default catalog order by price, date, or title. Simply uncomment the desired option (price, date, or title) and comment out the others to customize your product sorting.
<?php
add_filter('woocommerce_default_catalog_orderby', function () {
//return 'date';
//return 'title';
return 'price';
});





