你可能想用钩子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
}
}
这是一个部分答案,但您可以在所需的列中捕获并更改您想要的内容。