WooCommerce: Show Product Images @ Checkout Page

The Order Review section of the WooCommerce Checkout Page shows the product name, quantity and subtotal. No sign of the product image, which can be very useful to identify/differentiate between similar products or product variations.

This simple snippet will help you display just that: the featured image beside the product name inside the order review table. Easy peasy. Enjoy!

By adding the PHP snippet below, you can quickly display product featured images beside the product name in the Checkout page

PHP Snippet: Add Product Featured Image @ WooCommerce Checkout Page Order Review Table

Please note the snippet below will generate a thumbnail with size 50*50 pixels (feel free to change that size inside the array()) and will align it to the left (remove the array containing the class to avoid that in case).

 * @snippet       Product Images @ Woo Checkout
 * @how-to        Get CustomizeWoo.com FREE
 * @author        Rodolfo Melogli
 * @compatible    WooCommerce 5
 * @community     https://businessbloomer.com/club/
add_filter( 'woocommerce_cart_item_name', 'bbloomer_product_image_review_order_checkout', 9999, 3 );
function bbloomer_product_image_review_order_checkout( $name, $cart_item, $cart_item_key ) {
    if ( ! is_checkout() ) return $name;
    $product = $cart_item['data'];
    $thumbnail = $product->get_image( array( '50', '50' ), array( 'class' => 'alignleft' ) );
    return $thumbnail . $name;

Where to add custom code?

You should place custom PHP in functions.php and custom CSS in style.css of your child theme: where to place WooCommerce customization?

This code still works, unless you report otherwise. To exclude conflicts, temporarily switch to the Storefront theme, disable all plugins except WooCommerce, and test the snippet again: WooCommerce troubleshooting 101

Related content

  • WooCommerce: Cart and Checkout on the Same Page
    This is your ultimate guide – complete with shortcodes, snippets and workarounds – to completely skip the Cart page and have both cart table and checkout form on the same (Checkout) page. But first… why’d you want to do this? Well, if you sell high ticket products (i.e. on average, you sell no more than […]
  • WooCommerce: Disable Payment Method If Product Category @ Cart
    Today we take a look at the WooCommerce Checkout and specifically at how to disable a payment gateway (e.g. PayPal) if a specific product category is in the Cart. There are two tasks to code in this case: (1) based on all the products in the Cart, calculate the list of product categories in the […]
  • WooCommerce: Add Privacy Policy Checkbox @ Checkout
    Here’s a snippet regarding the checkout page. If you’ve been affected by GDPR, you will know you now need users to give you Privacy Policy consent. Or, you might need customer to acknowledge special shipping requirements for example. So, how do we display an additional tick box on the Checkout page (together with the existing […]
  • WooCommerce: Redirect to Custom Thank you Page
    How can you redirect customers to a beautifully looking, custom, thank you page? Thankfully you can add some PHP code to your functions.php or install a simple plugin and define a redirect to a custom WordPress page (as opposed to the default order-received endpoint). This is a great way for you to add specific up-sells, […]
  • WooCommerce: Disable Payment Gateway by Country
    You might want to disable PayPal for non-local customers or enable a specific gateway for only one country… Either way, this is a very common requirement for all of those who trade internationally. Here’s a simple snippet you can further customize to achieve your objective. Simply pick the payment gateway “slug” you want to disable/enable […]

Rodolfo Melogli

Business Bloomer Founder

Author, WooCommerce expert and WordCamp speaker, Rodolfo has worked as an independent WooCommerce freelancer since 2011. His goal is to help entrepreneurs and developers overcome their WooCommerce nightmares. Rodolfo loves travelling, chasing tennis & soccer balls and, of course, wood fired oven pizza. Follow @rmelogli

24 thoughts on “WooCommerce: Show Product Images @ Checkout Page

  1. Hi, thank you! Your guide was very useful for us!

  2. Cool thanks for this snippet

  3. It gave me this error I need your help please and thank you

  4. Hi thx for the guide, it works at the pc but doesnt work on mobile, may i know how to do it on mobile type?

    1. Even if you temporarily switch to – say – Storefront theme? I fear it may be your custom theme

  5. Hi there
    this was working perfectly on woodmart theme, but suddenly there are two pictures at check out. Any ideas why this would be?
    I checked I hadn’t duplicated the snippet, but after that, I don’t know!
    Thank you

    1. ooops sorry I have just realised I put this up earlier! I’m seeing double everywhere now!

      No prob!

      1. I am still getting two pictures of each product at checkout. Any ideas as to how this could happen?

        1. I find that odd. What if you switch temporarily to another theme – does it work ok?

  6. Thank you very much for your help
    I was able to display the product image in the checkout section
    Can you help me how can I add a product attribute to this section?
    Help us if you can

    1. Hello Hamed, thanks so much for your comment! Yes, this is definitely possible, but I’m afraid it’s custom work. If you’d like to get a quote, feel free to contact me here. Thanks a lot for your understanding!

  7. Hi! Thank you so much for this, it’s wonderful. The only issue is my thumbnails are showing up twice – one right next to the other. Any idea on why this could be happening?

    Thanks so much.


    1. Even if you try the snippet with another theme? This may be because your theme’s custom PHP code

  8. It used to work but after the latest Woo update some products images are now kept at their original width/height in the checkout table, though there are no differences inspecting the CSS.
    Do you have any idea how it happened?

    1. You may need custom CSS for that

  9. Thank you for the code. It’s working perfectly on desktop but the product title does not aligned properly on mobile. Hope you can fix it.

    1. It’s probably your custom theme. You’ll need custom CSS for that

  10. I’m always delighted to receive your newsletter

    Please consider sharing snippets to improve the checkout page to enhance one page checkout experience – with options like Remove from cart and quantity increase/decrease

  11. Nice, I have been thinking how to implement this for a while now. THANK YOU!

Questions? Feedback? Customization? Leave your comment now!

If you are writing code, please wrap it like so: [php]code_here[/php]. Failure to complying with this, as well as going off topic or not using the English language will result in comment disapproval. You should expect a reply in about 2 weeks - this is a popular blog but I need to get paid work done first. Please consider joining the Business Bloomer Club to get quick WooCommerce support. Thank you!

Your email address will not be published. Required fields are marked *