Woocommerce display extra field in customer details in order view page

When customer submits order and he goes to a thank you page where order details are shown. Inside the customer details, i want to display a single note. Currently i have edited ‘order-details-customer.php’, it works fine but i want to handle this using woocommerce hooks. I have tried this code, but its not working.

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 ); 

Here is the placement of customer details:

Read More

enter image description here

Related posts

1 comment

  1. hello good I had a similar problem in like I solved by adding the function of the hook in a table

    add_action( 'woocommerce_order_details_after_customer_details',array($this, 'action_woocommerce_order_details_after_customer_details'),10,1);

Comments are closed.