Site icon Qaisar Satti's Blogs

How to Add Delivery Address to WooCommerce Order Email

Today we are going to talk about how to add delivery addresses to WooCommerce order email. In order to add a delivery address to the order email paste the following function into the function.php file of your active/child theme:

add_action( 'woocommerce_email_after_order_table', 'qaisarsatti_shipping_details_to_admin_emails', 15, 2 );
function qaisarsatti_shipping_details_to_admin_emails( $orderData, $admin_email ) {
    if ( $admin_email ) {
        <p><?php echo $orderData->get_formatted_shipping_address(); ?></p>
    }
}
Exit mobile version