Add Product Images or SKUs to WooCommerce Order Emails

You can send order receipts (and other transactional emails like shipping notifications) with Jilt, and product images & SKUs are automatically included for WooCommerce! Use our drop & drop editor to visually customize your emails, no code needed. Learn More 👉

When WooCommerce sends order emails to your customers, by default it only includes the product name in the order items table within the email.

WooCommerce default email order items

However, it’s possible to add some additional product details here, such as the product SKU or product featured image.

We’d previously written about adding information to WooCommerce order emails so that you could show product SKUs or product images within the WooCommerce order emails for customers. However, the process to do this was changed in a backwards-incompatible way in WooCommerce 2.5.

In previous versions of WooCommerce you were able to filter the entire email output, which made it possible to change whether images or SKUs were included.

However, with WooCommerce 2.5, the filter to change the order items table is still there, but it does not give you all of the data you need to make changes to the order items table in the email in the same way. You don’t have access to the $args that are used in the template to determine what information to show or hide, so this filter pretty much doesn’t allow you to do anything directly.

If you’re already using WooCommerce 2.5, it’s possible to change the information shown in WooCommerce emails, we just have to be a bit more creative in how we use this filter. If you follow this tutorial, be sure you know how to add custom code to your website and that you’re using WooCommerce 2.5 or newer.

Add Product Images to WooCommerce Order Emails

You can add product images to to your order emails with this filter, but we can’t modify the arguments used to get the template directly. Instead, we’ll have to call the $order->email_order_items_table() function again, but with new arguments to use. The reason this gets tricky is because if we call this function, it will call the filter we’re using, which will again call the function, which will again call our filter…you get the idea. We’ll get an infinite loop.

To modify the email output this way, we’ll need to use a static variable as a flag. This will let us only run our code once so that the email output is modified, then our code will bail out after it’s run the first time.

That’s a wrap! This will change the way the email order items table is output to include product images when emails are sent to customers.

WooCommerce order emails with images

Add SKUs to WooCommerce Order Emails

We can use pretty much the exact same code to enable product SKUs in WooCommerce order emails instead of product images.

We’ll use the same snippet as above, but replace:

$args = array(
    'show_image'    => true,
    'image_size'    => array( 100, 100 ),


$args = array(
    'show_sku'      => true,

This will add the SKU after the product name in this format: Product Name (#productSKU) Here’s an example of what this would look like (the images wouldn’t be there of course):

WooCommerce order emails skus added

WooCommerce Order Emails: Show Both Images & SKUs

You can also add both SKUs and images to the order emails by adjusting the arguments to include both of them. The image size can be deleted if you want to use the default 32px by 32px size, or you can add your own size by adjusting the values below.

$args = array(
    'show_sku'      => true,
    'show_image'    => true,
    'image_size'    => array( 100, 100 ),

Replace your WooCommerce emails

If you want to have more control over your order email design, you can also consider using Jilt to replace your transactional emails. For example, you can send emails after orders are completed instead. This would allow you to use Jilt’s visual email editor create emails, including product images and names instead:

Jilt custom email

You can learn more about other ways to improve your emails in our guide to customizing WooCommerce order emails.

Add Product Information to WooCommerce Order Emails

Adding product SKUs or product images to WooCommerce order emails is possible, and you can add both if desired, along with changing the size of your image as needed. Remember, the code outlined above is only for WooCommerce 2.5 or newer. If you’re still using an older version of WooCommerce, check out our previous tutorial for code compatible with your WooCommerce version.


  1. Hi Beka,

    Very interesting read, thank you! Will be looking to implement this.
    Would you know a way to change the email so you have the PPP, number of products and total price?

    For example:
    Product Quantity PPP Total
    Ninja hoodie 2 $10 $20

  2. I have just tried this, and it works perfect on the email send to the shop-owner, but the mail send to the customer is still without images. Do you have any idea what could be wrong here?

    I added the code to functions.php in my child theme.

    1. Afraid not, I’d used this exact code in my test for customer emails so something else may be altering the email templates after this code runs.

  3. Thanks for this! I added the snippet for SKU and Image…both are displaying in my back end confirmation email, but not the customer email. Meaning, when I receive an order, I see the image and SKU, but the customer isn’t seeing either in their confirmation. Any insight? Thanks again!!!

  4. Hey there. How can I use your code to only add the sku? Most of the code involves calling in imagery…which we didn’t want.

    Also, how would we output the order number into the body of the email like it used to? Now it only displays in the email subject line. Much appreciated!

  5. Hello,

    Thanks for this useful guide. It worked great on the admin email, however just like the 2 people above in the comments, this did not apply to the customer confirmation email. Any help would be much appreciated.

    1. I tested this with customer emails and it worked as expected for me on a vanilla, so I’m not sure what else is going on with emails that would cause this for some people. Regardless, WC 2.6 adds a much-needed filter to make this simple again, so I’ll be publishing an updated post once WC 2.6 is out — keep an eye out :)

  6. Hello!

    I need to display the category of the purchached product in my email-order-details.php

    Please can you help me?


  7. Hello, like many others I experience the same, where product photos show in admin email, but not for customers. I have tried to find info about this in 2.6, as you mentioned it has a new filter to make this easy. Any chance you could shed a bit more light on this`?

      1. Excellent Beka, I tried to find this article, but obviously didn’t search very well. Have now updated the code and all is working how I want it. Thanks for your help!

        1. Does anyone mind sharing that article? I clicked on the link and it went to a dead page. I’m having the same issue as you Karl.

  8. Hi Beka,

    I know I’m late to the party on this one, but wondering if you can help! I’m wondering if you know what the merge tag would be to display a certain attribute? I’ve created custom templates for my emails, which are working great, but I’ve had some requests from customers to show the “size” attribute.

    All the info is taken care of with merge tags from this document:

    but I can’t work out what the tag would be for an attribute.

    Any help would be much appreciated!

  9. I never seen such a beauty in content and explaining thing. Really it compel me to write review.

    This is called quality of work which catch the eye of the reader and put good impression in their mind. I really like your article about image in woocommerce email. really i need same thing. I have no word for your this article, SUPERB.

  10. Is it also possible this way to add links to the product within the order confirmation email?

    I would like the customer to be able to click on the link in the order confirmation, which should automatically open the customers browser and then show the product he bought.

    Thanks :-)

  11. Thank you very much for your answer Beka. Appreciate it a lot :-) Best regards – Anders

  12. Hi, in which file i’ll have put function code to put images products in email?


  13. Any idea how to get this change to the on-hold emails sent to customers as well? The above code only adds to the order completed email.

<em>Hmm, looks like this article is quite old! Its content may be outdated, so comments are now closed.</em>