How to add order comments, Customer Name and phone number in interfax email receipt?

customization-woocommerce-560x300
General / Technical

How to add order comments, Customer Name and phone number in interfax email receipt?

How to add order comments, Customer Name and phone number in Interfax email receipt?

PHPWORDPRESS

After configuring inter-fax in woo-commerce Interfax Configuration. After we installed a woo-commerce plugin called inter-fax, which is used to send order completion email to fax number. It does include everything on the order email template except leaving the order note field, customer name, phone number. Below is the custom source code of inter-fax plugin customization.

Here is an custom code of adding the customer’s note to the bottom of all emails in fax machine.

add_action( ‘woocommerce_email_after_order_table’ , ‘so_28333042_add_customer_note’ );
function so_28333042_add_customer_note( $order ){
$post = get_post( $order->id );
if( $post->post_excerpt != ” ){
echo “Customer Note:
” . wp_kses_post( $post->post_excerpt );
}
}

Below custom code for customer name, phone number in custom notes for ordered item

if( $post->post_excerpt != ” ){
echo “Customer Note:
” . wp_kses_post( $post->post_excerpt );
}
echo ”
Customer Name:
” . wp_kses_post( $order->billing_first_name );
echo ”
Phone Number:
” . wp_kses_post( $order->billing_phone );
}
?>

Leave your thought here

Need Help? Chat with us
Please accept our privacy policy first to start a conversation.