I need to display the item price in emails sent to admin and to customers using WooCommerce.
The default templates display Item, Quantity, and Price (item price X quantity). I can add the columns to the tables, but don’t know how to get the data from the product.
(It is interesting that this has not been included in the default. I dont think i’ve ever placed an order online that did not include the single item price.)
This post was helpful, but didn’t give me quite all needed:
display tax in woocommerce invoice
It has been a while but this may come handy to someone else.
As far as I am aware, there is no method that returns the unit price, but you can just calculate it by dividing the total price of the item by its quantity like so:
Since this will return just a number, you would probably want to add a currency symbol, so, you would end up with something like this:
I edited plugins/woocommerce/templates/emails/email-order-items.php
After product name I inserted the price:
NB! I put my custom files in directory mytheme/woocommerce/emails/ – without “templates” folder (!). Strange but it’s the only way to force them working.
Looks like @Anunja‘s code up above may no longer work – instead just add the following line underneath Product Name in a copied version of templates/emails/email-order-items.php