隐藏“我的帐户最近的订单"列表页面中的订单状态 [英] Hiding order status in My Account recent orders list page

查看:51
本文介绍了隐藏“我的帐户最近的订单"列表页面中的订单状态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在WooCommerce中,我有一个Woocommerce网站,并且在客户的最近订单页面上,此示例链接上有一个表,其中包含订单详细信息: https://example.com/my-account/view-order/

In WooCommerce, I have a Woocommerce site and on the customer's recent orders page, there is a table with order details on this example link: https://example.com/my-account/view-order/

如果可能的话,我想从表格中完全隐藏订单状态.

I would like to completely hide order status from the table if possible.

我该如何实现?

谢谢

推荐答案

已更新:

只需使用连接到 woocommerce_my_account_my_orders_columns 过滤器挂钩的自定义函数即可:

Just use this custom function hooked in woocommerce_my_account_my_orders_columns filter hook:

add_filter('woocommerce_my_account_my_orders_columns', 'custom_removing_order_status', 10, 1);

function custom_removing_order_status( $order ){
    unset($order['order-status']);
    return $order;
}

代码会出现在您活动的子主题(或主题)的function.php文件或任何插件文件中.

无需编辑woocommerce模板.此代码已经过测试并且可以正常工作.

No need of editing woocommerce templates. This code is tested and works.

这篇关于隐藏“我的帐户最近的订单"列表页面中的订单状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆