嘿,我想在woocommerce订单页面中做一些更改,但我找不到正确的php文件来进行这些更改我更改了html代码,以便我可以看到第一个屏幕截图可能在更改之前
如您所见,我需要移动鼠标以查看订单注释和最后一个客户注释
我需要文件名或任何其他插件,让我这样做
嘿,我想在woocommerce订单页面中做一些更改,但我找不到正确的php文件来进行这些更改我更改了html代码,以便我可以看到第一个屏幕截图可能在更改之前
如您所见,我需要移动鼠标以查看订单注释和最后一个客户注释
我需要文件名或任何其他插件,让我这样做
你可能想用钩子manage_posts_custom_column
有关更多信息,请参阅codex。https://codex.wordpress.org/Plugin_API/Action_Reference/manage_posts_custom_column
add_action(\'manage_shop_order_posts_custom_column\' , \'wpse_306476_order_custom_column\');
function wpse_306476_order_custom_column($colname) {
global $the_order; // Get the order
if($colname == \'customer_message\') // You can also use a switch here
{
$message = $the_order->get_customer_note();
// Do what you have to do here
}
elseif($colname == \'order_note\') // For order_note
{
// Do what you want here
}
}
这是一个部分答案,但您可以在所需的列中捕获并更改您想要的内容。