Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
WooCommerce add payment type to emails
<?php
// Place the following code in your theme's functions.php file to add the payment type to all emails
add_action( 'woocommerce_email_after_order_table', 'wc_add_payment_type_to_emails', 15, 2 );
function wc_add_payment_type_to_emails( $order, $is_admin_email ) {
echo '<p><strong>Payment Type:</strong> ' . $order->payment_method_title . '</p>';
}
// Place the following code in your theme's functions.php file to add the payment type to admin emails only
add_action( 'woocommerce_email_after_order_table', 'wc_add_payment_type_to_admin_emails', 15, 2 );
function wc_add_payment_type_to_admin_emails( $order, $is_admin_email ) {
if ( $is_admin_email ) {
echo '<p><strong>Payment Type:</strong> ' . $order->payment_method_title . '</p>';
}
}
?>
@bentasm1

This comment has been minimized.

Copy link

@bentasm1 bentasm1 commented May 14, 2014

Thanks!

@saas786

This comment has been minimized.

Copy link

@saas786 saas786 commented Jul 21, 2014

Thanks.

@GaganTiwari

This comment has been minimized.

Copy link

@GaganTiwari GaganTiwari commented Apr 12, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.