woof_custom_filter_items_order
钩子 woof_custom_filter_items_order 提供更改筛选元素顺序的能力,传递一个筛选键的数组(您可以通过单击 tab Structure 中的附加选项找到筛选区块的键)
示例:
add_filter('woof_custom_filter_items_order', function($order){
//your code here
$order=['by_price','pa_color', 'by_text', 'product_cat', 'pa_size'];
return $order;
});