Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/253.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 在订单查看页面的客户详细信息中显示额外字段_Php_Wordpress_Woocommerce - Fatal编程技术网

Php 在订单查看页面的客户详细信息中显示额外字段

Php 在订单查看页面的客户详细信息中显示额外字段,php,wordpress,woocommerce,Php,Wordpress,Woocommerce,当客户提交订单时,他会进入“感谢”页面,在该页面上会显示订单详细信息。在客户详细信息中,我想显示一个注释。目前我已经编辑了“orderdetailscuster.php”,它工作得很好,但我想用woocommerce钩子来处理这个问题。我尝试过这个代码,但它不起作用 function action_woocommerce_order_details_after_customer_details( $order ) { echo 'Hi Customer'; } add_action(

当客户提交订单时,他会进入“感谢”页面,在该页面上会显示订单详细信息。在客户详细信息中,我想显示一个注释。目前我已经编辑了“orderdetailscuster.php”,它工作得很好,但我想用woocommerce钩子来处理这个问题。我尝试过这个代码,但它不起作用

function action_woocommerce_order_details_after_customer_details( $order ) { 
    echo 'Hi Customer';
}

add_action( 'woocommerce_order_details_after_customer_details', 'action_woocommerce_order_details_after_customer_details', 10, 1 ); 
以下是客户详细信息的位置:


你好,很好,我在like中遇到了一个类似的问题,我通过在表中添加钩子函数解决了这个问题

add_action('woocommerce_order_details_后接客户_details',数组('this,'action_-woocommerce_order_details_后接客户_details'),10,1)