# Product Thumbnails in the Checkout Order Summary

> Shows a small image beside each product name in the "Your order" table on the classic checkout.

- Type: PHP
- Runs: Run everywhere
- Category: [WooCommerce](https://wpide.com/library/category/woocommerce/)
- Requires: WooCommerce
- Tags: woocommerce, checkout, images
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/woo-checkout-item-thumbnails/

## Code

```php
add_filter( 'woocommerce_cart_item_name', function ( $name, $item, $key ) {
    $size = array( 48, 48 ); // Thumbnail size in pixels.

    if ( ! is_checkout() || empty( $item['data'] ) ) {
        return $name;
    }

    $thumb = $item['data']->get_image( $size, array( 'style' => 'vertical-align:middle;margin-right:8px;border-radius:3px;' ) );

    return $thumb . $name;
}, 10, 3 );
```

## Notes

Change $size to a different image size or pixel array.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Product Thumbnails in the Checkout Order Summary" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
