66
If you wish to print the payment gateway name on order emails (in its own paragraph below the order items table), here’s a handy snippet for you.
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. Enjoy!
PHP Snippet: Show Payment Gateway Name @ WooCommerce Order Emails
/**
* @snippet Echo Payment Method Name @ Order Emails
* @how-to Get tutoraspire.com FREE
* @author Tutor Aspire
* @testedwith WooCommerce 3.9
* @donate $9 https://tutoraspire.com
*/
add_action( 'woocommerce_email_after_order_table', 'tutoraspire_display_payment_type_name_emails', 15 );
function tutoraspire_display_payment_type_name_emails( $order ) {
echo 'Payment Type:
' . $order->get_payment_method_title() . '
';
}