Menu Close

Add Payment Method to Woocommerce Order Emails

codeamend

If you wish to print the payment gateway name on order emails, Use the below PHP snippet.

All you need to use is the “woocommerce_email_after_order_table” hook to pick the correct position, and then the “get_payment_method_title” WooCommerce function to return the payment gateway name.

Display Payment Gateway name in woocommerce order emails
add_action( 'woocommerce_email_after_order_table', codeamend_display_payment_type_name_emails, 15 );
  
function codeamend_display_payment_type_name_emails( $order ) {
   echo '<h3>Payment Method:</h3><p> ' . $order->get_payment_method_title() . '</p>';
}
 

Share

Posted in WooCommerce

You can also read...

Leave a Reply

Your email address will not be published.