WooCommerce - New Order Email - Add Shipping Address

I am looking to add the shipping address from the order to the New Order email. Can anyone please provide detailed information on how to do so? I am pretty new to editing functions.php, hooks, etc.

Thanks

1 answer

  • answered 2017-11-14 23:29 Ali_k

    Use this you can comment out the conditional part if you want to have it on customer email as well.

    add_action( 'woocommerce_email_after_order_table', 'woocommerce_add_shipping_address_to_admin_emails', 15, 2 );
    function woocommerce_add_shipping_address_to_admin_emails( $order, $is_admin_email ) {
        if ( $is_admin_email ) {
            echo '<p><strong>Shipping Address:</strong> ' . $order->get_formatted_shipping_address() . '</p>';
        }
    }