📜  woocommerce_default_catalog_orderby desc - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:28.780000             🧑  作者: Mango

代码示例1
/**
 * This code should be added to functions.php of your theme
 **/

add_filter('woocommerce_default_catalog_orderby', 'custom_default_catalog_orderby');

function custom_default_catalog_orderby() {
     return 'date'; // Can also use title and price
}