Some months ago I wrote a post about how to add the unit price in the checkout page.
It would be useful though to have the same unit price also in the emails sent both to the admin and to the customer.

Doing this it’s harder than what we did for the checkout page.
There are more templates to tweak and we also have to consider both plain and HTML emails.

But it’s not impossible, obviously.

Download “Unit price in the emails” emails.zip – Downloaded 993 times – 8 KB

Download the zip above, then extract it. You will have a folder names emails in your computer. Copy that folder and put it in wp-content/themes/your-theme-name/woocommerce/.

Note: If you are using a custom theme which already overrides the emails templates be careful. This may break your theme. Contact the theme author before to override the templates.

This is how the HTML email will look:

unit-price-email

Download “Unit price in the emails” emails.zip – Downloaded 993 times – 8 KB

42 replies
      • Crystal
        Crystal says:

        I’m sorry, it was in the woocommerce-quotation plugin. I had to add in an

        After that worked and was in the correct order.

        Thank you for your help, this should really be part of Woocommerce as a default function. It just makes sense.

        Reply
    • Nicola Mustone
      Nicola Mustone says:

      HI Viviana,
      Sorry for the very late reply!

      Technically yes, it is possible. You need to add the code to print the number. I’m not sure what to add because it depends on the Invoicing plugin you are using.

      Reply
  1. Rob
    Rob says:

    Hi Nicola, it’s not working for me unfortunately.
    I’ve put the file in the child-theme/woocommerce folder and then in the maintheme/woocommerce folder – both extracted of course!
    Not sure what I’m doing wrong unless this fix if pre Woocommerve 2.5?
    I have WC 2.5.5

    Reply
    • Nicola Mustone
      Nicola Mustone says:

      Hi Rob,
      I just tested this on WooCommerce 2.6.1 and it works. I guess it works also for the 2.5 since the templates are the same!

      Make sure that you are pasting the whole emails folder in child-theme/woocommerce/, and not only the files inside the folder.

      Reply
  2. Hove
    Hove says:

    its great …Thanks for this . i have the same issue as Crystal . the columns are switched. quantity has the prices and the Price column has the quantities..
    it will great if get the fix .
    thanks . HOve

    Reply
  3. Laura
    Laura says:

    Does this work with WooCommerce 3.6.6? I am nervous about replacing the “whole folder” since your folder has about half the .php files as the current version.

    Reply
    • Nicola Mustone
      Nicola Mustone says:

      Hi Laura,
      Thanks for reporting. I’ll have to update the templates, but the difference is very small. I simply add a new row in the table. You can open the files from my zip, copy the differences and add them to your templates from the 2.6.6.

      I’ll update the zip in this article as soon as I can.

      Reply
  4. Lyse Tremblay
    Lyse Tremblay says:

    Hi Nicola,

    Thank you so very much for sharing. It works very nicely. However, if an order is fails, I need also the customized order table. Do you have a updated file for this condition that you could share?

    In addition to that, is there an easy way to add a block of text at the top to include the seller company contact information and to move the customer details above the order items table?

    Regards
    Lyse

    Reply
  5. haris
    haris says:

    hello..
    Can someone tell me how I can translate the title Unit Price after insert the file?
    Thank you in advance.
    Haris

    Reply
  6. Lyse
    Lyse says:

    Hi Nicola,

    With WooCommerce v3.0, two templates were modified: email-order-items.php one located in the emails folder the other in the plain folder.

    Are you planning to update your templates to WC version 3.0? That would be very nice.

    Thanks
    Lyse

    Reply
  7. Lyse
    Lyse says:

    Hi Nicola,
    I have to upgrade to WooCommce v3.0 now, so I looked at updating the two templates myself but one of them is giving grief because the new version appears to be stripping tags which your template has and I’m not knowledgeable enough to understand the implications and risk I would be taking guessing what these will do or counter react.

    Any ETA as to when you would have the time to look at these two templates only? The more difficult one for me is the the file in the plain folder.

    Much appreciated
    Lyse

    Reply
  8. Koray
    Koray says:

    Hello I’m using custom plugin for email templates (Email costomizer) how can I add price per unit in my email template?
    THANKS!

    If you want I can send you the template to see if you can

    Reply
  9. Lyse
    Lyse says:

    Hi Nicola,
    I have upgraded to WooCommerce v3.2.1 now, and it looks like three templates have been updated. I was wondering if you could update your templates to reflect the new WooCommerce changes. The templates that have changed are:

    woocommerce/emails/email-order-details.php version 3.0.0 is out of date. The core version is 3.2.0,
    woocommerce/emails/email-order-items.php version 3.0.0 is out of date. The core version is 3.2.0,
    /woocommerce/emails/plain/email-order-items.php version 3.0.0 is out of date. The core version is 3.2.0

    I had a look at updating these myself but I’m a little confused with the new changes.

    Any ETA as to when you would have the time to look at these templates?

    Much appreciated
    Lyse

    Reply
  10. Mike
    Mike says:

    Is there a way to not add discount to the unit price? When I have a discount it shows discount applied instead of just unit price.

    Reply
  11. Vicky
    Vicky says:

    Thank you so much for this, I have been trying to solve this issue for a client for a few weeks now with no joy.
    This worked fantastic, I had to make a small adjustment as the subtotals, tax etc where showing in col 2 which looked untidy so simply changed this to col 3 to achieve.
    Thanks again!!

    Reply
  12. Ander
    Ander says:

    Thank you so much. Working on WP 4.9.

    Only 1 thing:

    In the total, and shipping mode columuns has to be colspan=”3″

    <th class=”td” scope=”row” colspan=”3″”>

    Reply
  13. Lyse
    Lyse says:

    Hi Nicola
    There is now a revised 3.4.0 version of the email-order-items.php and yours is still at version 3.2.0 after I download it.

    Do you have an update of your files available download?

    Thanks
    Lyse

    Reply
  14. Roland
    Roland says:

    Oh man you just saved my day! I was looking for something like this for about 2 days straight.
    Downloaded the files and uploaded them to the right folder and it works right away. Only thing i had to change was the column thing, but that was easy enough..

    BTW since today (nov, 1st) the template is out of date since there’s a 3.5.0 core version, I didn’t test if it’s still working, but i thought i let you know!

    Reply

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

You have to agree to the comment policy.

This site uses Akismet to reduce spam. Learn how your comment data is processed.