我正在将开源插件转换为 HPOS 兼容。其功能之一是管理中订单列表上的附加过滤器(与订单状态一致),例如:
我似乎无法实际执行查询的修改。pre_get_posts以前,当不再使用 WP_Post 时,我正在挂钩显然不再相关。
pre_get_posts
然后对于过滤器字段也是如此,我将其挂接到restrict_manage_posts. 找到了等效的钩子:woocommerce_order_list_table_restrict_manage_orders
restrict_manage_posts
woocommerce_order_list_table_restrict_manage_orders
有人知道要使用哪个钩子吗?
php wordpress orders woocommerce hook-woocommerce
hook-woocommerce ×1
orders ×1
php ×1
woocommerce ×1
wordpress ×1