• Resolved doreym

    (@doreym)


    Hi, currently my Admin New Order email is only showing a subtotal inc. VAT then the VAT value itself next to it.

    I would also like to show the ex VAT subtotal too on the New Order email but I am struggling to find the correct code. Essentially, I would like what you see on the backend of a customer order to be displayed on the Admin New Order email.

    Many thanks!

Viewing 1 replies (of 1 total)
  • Saif

    (@babylon1999)

    Hello @doreym,

    Thank you for reaching out!

    You can use the woocommerce_email_order_details hook to edit the WooCommerce new order email. :?)

    Here’s a basic example which you can tailor to what you’re trying to achieve:

    
    function custom_order_email_total_after_tax( $order, $sent_to_admin, $plain_text, $email ) {
        // Check if the email is being sent to an admin
        if ( $sent_to_admin ) {
            echo '<p><strong>Total Without Tax:</strong> ' . wc_price( $order->get_total() - $order->get_total_tax() ) . '</p>';
        }
    }
    add_action( 'woocommerce_email_order_details', 'custom_order_email_total_after_tax', 20, 4 );
    

    If you require the assistance of a developer, consider hiring a WooExpert as custom solutions is not something we can assist with per our support policy.

    You can also check this guide on How to Customize WooCommerce Emails.

    Let us know if you have any other questions.

Viewing 1 replies (of 1 total)
  • The topic ‘Add ex VAT Subtotal Price to New Order Email’ is closed to new replies.