Showing Card type in Admin New Order email
-
Looking to show the credit card type (Visa, AMEX etc.) from a given order in the admin new order email notification, but am struggling to get it working. Here is what I came up with. I’m not very good with php, so apologies if this is not even close. This is what I added to my functions.php:
add_action( ‘woocommerce_email_after_order_table’, ‘add_card_type_to_admin_new_order’, 15, 2 );
function add_card_type_to_admin_new_order( $order, $is_admin_email ) {
if ( $is_admin_email ) {
echo ‘<p>Card Type: ‘ . $order->credit_card_type_label . ‘</p>’;
}
}
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Showing Card type in Admin New Order email’ is closed to new replies.