Created
February 13, 2020 05:32
-
-
Save webtoffee-git/89655aa6cbed62d28647ec9bdc920369 to your computer and use it in GitHub Desktop.
Modify sorting of related products using WooCommerce Related Product by WebToffee
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter('wt_related_products_odrerby', function($odrerby){ | |
return 'date'; // default is 'title' -- see WP Query args for more details | |
}); | |
add_filter('wt_related_products_odrer', function($odrer){ | |
return 'DESC'; // default is 'ASC' -- see WP Query args for more details | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment