-3

From function.php file.

<?php 
        add_action( 'woocommerce_email_after_order_table', 'woocommerce_add_billing_address_to_admin_emails', 15, 2 ); 
         ?>
Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
  • Are you asking a question or giving answer? – Mohammad Ashique Ali Nov 26 '18 at 07:15
  • @Frits i think you got a wrong person tagged on your answer. :) – Mohammad Ashique Ali Nov 26 '18 at 08:06
  • @MohammadAshiqueAli oh lawd sorry 0_o fixing it now! – Frits Nov 26 '18 at 08:09
  • Hi Mujahith iahi - welcome to Stack Overflow. This forum follows a Question and Answer format. Your post seems to be an answer to a question that wasn't asked. You can, if needed, post your question first, and then post your answer, but I would suggest first seeing if the question has already been asked (which is most likely) and then posting your answer to that question if your solution is unique compared to the other answers on that same question. Good luck – Frits Nov 26 '18 at 08:09

1 Answers1

1

Add this to Your function.php file. :-)

<?php 
add_action( 'woocommerce_email_after_order_table', 'woocommerce_add_billing_address_to_admin_emails', 15, 2 ); 
function woocommerce_add_billing_address_to_admin_emails( $order, $is_admin_email ) { 
    if ( $is_admin_email ) { 
        echo '<div style="width:100%; background-color: #f2f2f2;">
            <p style="padding: 15px;margin: 15px 0;">Billing Country: <strong>'.WC()->countries->countries[ $order->billing_country ].'</strong></p>
            </div>';
    } 
} ?>