WooCommerce 3.0+更改管理员订单日期列格式 [英] WooCommerce 3.0+ change admin order date column format
本文介绍了WooCommerce 3.0+更改管理员订单日期列格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在WooCommerce中,我使用以下代码更改订单日期列的管理订单视图格式:
In WooCommerce I was using the code below to alter the admin orders view formatting of the order date column:
// Woocommerce show time on order
add_filter('post_date_column_time', 'custom_post_date_column_time', 10, 2);
function custom_post_date_column_time($h_time, $post)
{
return get_the_time(__('Y/m/d g:i:s A', 'woocommerce'), $post);
}
自WooCommerce 3.0+起,它刚刚停止工作。
Since WooCommerce 3.0+ it has just stopped working.
有什么想法吗?
谢谢
推荐答案
正确答案:
请参阅官方 WooCommerce答案线程
Please see the official WooCommerce answer thread
为便于其他参考,新的过滤器将在WooCommerce 3.0.2。中发布。
For ease of reference for others, the new filter is due to be released in WooCommerce 3.0.2.
可以从> https://github.com/woocommerce/ woocommerce / pull / 14253
它与挂钩在 woocommerce_admin_order_date_format
新的过滤器挂钩:
It works with a custom function hooked in woocommerce_admin_order_date_format
new filter hook:
// Woocommerce show time on order
add_filter('woocommerce_admin_order_date_format', 'custom_post_date_column_time');
function custom_post_date_column_time($h_time, $post)
{
return get_the_time(__('Y/m/d G:i', 'woocommerce'), $post);
}
这篇关于WooCommerce 3.0+更改管理员订单日期列格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文