WordPress filter hook

woocommerce_order_item_thumbnail

Defined by WooCommerce and fired by 35 plugins in total, running on 7.3M+ sites between them.

“Email Order Item Thumbnail hook.”

How to use woocommerce_order_item_thumbnail

It's a filter: your callback receives the value and 1 more argument, and must return the (changed) value. Add this to your theme's functions.php or a small custom plugin:

functions.php
add_filter( 'woocommerce_order_item_thumbnail', function( $image, $item ) {
	// Change $image here.
	return $image;
}, 10, 2 );

Argument names come from Kadence WooCommerce Email Designer's source. Other plugins may pass different values: check the call in the plugin you're targeting below.

35 plugins that fire woocommerce_order_item_thumbnail

Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.

  1. WooCommerce icon WooCommerce7+ million installs apply_filters( 'woocommerce_order_item_thumbnail', $image, $item->item ) templates/emails/email-fulfillment-items.php:76
  2. Kadence WooCommerce Email Designer icon Kadence WooCommerce Email Designer90,000+ installs apply_filters( 'woocommerce_order_item_thumbnail', $image, $item ) templates/woo/emails/email-order-items.php:54
  3. Germanized for WooCommerce icon Germanized for WooCommerce70,000+ installs apply_filters( 'woocommerce_order_item_thumbnail', $image, $org_item ) packages/eu-order-withdrawal-button-for-woocommerce/templates/emails/email-withdrawal-items.php:55
  4. YayMail icon YayMail50,000+ installs apply_filters( 'woocommerce_order_item_thumbnail', $image, $item ) templates/shortcodes/order-details/order-items/image-content.php:8
  5. Email Templates Customizer and Designer for WordPress and WooCommerce icon Email Templates Customizer and Designer for WordPress and WooCommerce20,000+ installs apply_filters( 'woocommerce_order_item_thumbnail', $image, $item ) templates/woo/emails/email-order-items.php:65
  6. Mailonix icon Mailonix20,000+ installs apply_filters( 'woocommerce_order_item_thumbnail', $image, $item ) includes/templates/order-items/style-1.php:50
  7. WCFM Marketplace icon WCFM Marketplace10,000+ installs apply_filters( 'woocommerce_order_item_thumbnail', $image, $item ) views/emails/plain/store-new-order.php:124
  8. E2Pdf icon E2Pdf10,000+ installs apply_filters( 'woocommerce_order_item_thumbnail', $image, $item ) classes/model/e2pdf-shortcode.php:5205
  9. WebToffee eCommerce Marketing Automation icon WebToffee eCommerce Marketing Automation10,000+ installs apply_filters( 'woocommerce_order_item_thumbnail', $rp_decorator_image, $rp_decorator_item ) includes/wt-woo-templates/emails/email-order-items.php:57
  10. NP Quote Request for WooCommerce icon NP Quote Request for WooCommerce8,000+ installs apply_filters( 'woocommerce_order_item_thumbnail', '<div style="margin-bottom: 5px"><img src="' . ( $product->get_image_id() ? current( wp_get_attachment_image_src( $product->get_image_id(), 'thumbnail' ) ) : wc_placeholder_img_src() ) . '" alt="' . esc_attr__( 'Product image', 'woo-rfq-for-woocommerce' ) . '" height="' . esc_attr( $image_size[1] ) . '" width="' . esc_attr( $image_size[0] ) . '" style="vertical-align:middle; margin-' . ( is_rtl... ) woocommerce/emails/email-order-items.php:46
  11. Hungarian Pickup Points & Shipping Labels for WooCommerce icon Hungarian Pickup Points & Shipping Labels for WooCommerce7,000+ installs apply_filters( 'woocommerce_order_item_thumbnail', $image, $item ) templates/emails/email-vp-woo-pont-order-details.php:67
  12. Donation Platform for WooCommerce: Fundraising & Donation Management icon Donation Platform for WooCommerce: Fundraising & Donation Management6,000+ installs apply_filters( 'woocommerce_order_item_thumbnail', $image, $item ) includes/wc-templates/emails/email-order-items.php:59
  13. EU Order Withdrawal Button for WooCommerce icon EU Order Withdrawal Button for WooCommerce6,000+ installs apply_filters( 'woocommerce_order_item_thumbnail', $image, $org_item ) templates/emails/email-withdrawal-items.php:55
  14. TrackShip for WooCommerce icon TrackShip for WooCommerce5,000+ installs apply_filters( 'woocommerce_order_item_thumbnail', $image, $item ) templates/emails/tswc-email-order-details.php:66
  15. Quotes for WooCommerce icon Quotes for WooCommerce4,000+ installs apply_filters( 'woocommerce_order_item_thumbnail', $image, $items ) templates/emails/new-quote-request-sent-customer.php:81
  16. WC Vendors icon WC Vendors3,000+ installs apply_filters( 'woocommerce_order_item_thumbnail', '<div style="margin-bottom: 5px"><img src="' . ( $product->get_image_id() ? current( wp_get_attachment_image_src( $product->get_image_id(), 'thumbnail' ) ) : wc_placeholder_img_src() ) . '" alt="' . esc_attr__( 'Product image', 'wc-vendors' ) . '" height="' . esc_attr( $image_size[1] ) . '" width="' . esc_attr( $image_size[0] ) . '" style="vertical-align:middle; margin-' . ( is_rtl() ? 'left' :... ) templates/emails/vendor-order-items.php:33
  17. PDF Builder for WooCommerce. Create invoices,packing slips and more icon PDF Builder for WooCommerce. Create invoices,packing slips and more2,000+ installs apply_filters( 'woocommerce_order_item_thumbnail', $var, $item ) htmlgenerator/fields/PDFRefundTable.php:583
  18. Order Approval for Woocommerce icon Order Approval for Woocommerce1,000+ installs apply_filters( 'woocommerce_order_item_thumbnail', $image, $item ) templates/emails/plain/store-new-preorder.php:140
  19. WP Hotel Booking WooCommerce icon WP Hotel Booking WooCommerce1,000+ installs apply_filters( 'woocommerce_order_item_thumbnail', '<div style="margin-bottom: 5px"><img src="' . ( $product->get_image_id() ? current( wp_get_attachment_image_src( $product->get_image_id(), 'thumbnail' ) ) : wc_placeholder_img_src() ) . '" alt="' . esc_attr__( 'Product image', 'wp-hotel-booking-woocommerce' ) . '" height="' . esc_attr( $image_size[1] ) . '" width="' . esc_attr( $image_size[0] ) . '" style="vertical-align:middle; margin-' . ( i... ) templates/woocommerce/emails/email-order-items.php:51
  20. Partial Shipment for WooCommerce icon Partial Shipment for WooCommerce1,000+ installs apply_filters( 'woocommerce_order_item_thumbnail', $image, $item ) emails/email-partial-order-items.php:46
  21. EU Consumer Rights for WooCommerce icon EU Consumer Rights for WooCommerce200+ installs apply_filters( 'woocommerce_order_item_thumbnail', $image, $org_item ) withdrawal/templates/eggl-withdrawal/emails/email-withdrawal-items.php:55
  22. Email Customizer for WooCommerce icon Email Customizer for WooCommerce200+ installs apply_filters( 'woocommerce_order_item_thumbnail', $edpw_image_html, $edpw_item ) templates/order_items.php:76
  23. Hotel Booking for WooCommerce icon Hotel Booking for WooCommerce100+ installs apply_filters( 'woocommerce_order_item_thumbnail', $image, $reg_item ) templates/emails/email-booking-items.php:337
  24. Split Pay icon Split Pay100+ installs apply_filters( 'woocommerce_order_item_thumbnail', $image, $item ) wc-templates/emails/email-order-items.php:65
  25. ShopMaker icon ShopMaker90+ installs apply_filters( 'woocommerce_order_item_thumbnail', $product->get_image(), $item ) templates/widgets/order/order-details-item.php:36
  26. Printcart Store icon Printcart Store80+ installs apply_filters( 'woocommerce_order_item_thumbnail', $image, $item ) templates/quote/emails/request-quote-items.php:34
  27. MonstaManagement presents WebMonsta! icon MonstaManagement presents WebMonsta!70+ installs apply_filters( 'woocommerce_order_item_thumbnail', $image, $item ) class.monstafrontend.php:824
  28. WC Return products icon WC Return products50+ installs apply_filters( 'woocommerce_order_item_thumbnail', '<img src="' . ( $_product->get_image_id() ? current( wp_get_attachment_image_src( $_product->get_image_id(), 'thumbnail') ) : wc_placeholder_img_src() ) .'" alt="' . __( 'Product Image', 'woocommerce' ) . '" height="' . esc_attr( $image_size[1] ) . '" width="' . esc_attr( $image_size[0] ) . '" style="vertical-align:middle; margin-right: 10px;" />', $item ) template/email_items.php:19
  29. Boopis WooCommerce RFQ icon Boopis WooCommerce RFQ50+ installs apply_filters( 'woocommerce_order_item_thumbnail', '<div style="margin-bottom: 5px"><img src="' . ( $_product->get_image_id() ? current( wp_get_attachment_image_src( $_product->get_image_id(), 'thumbnail') ) : wc_placeholder_img_src() ) .'" alt="' . esc_attr__( 'Product Image', 'woocommerce' ) . '" height="' . esc_attr( $image_size[1] ) . '" width="' . esc_attr( $image_size[0] ) . '" style="vertical-align:middle; margin-right: 10px;" /></div>',... ) templates/emails/email-quote-items.php:18
  30. Email Templates Customizer for WooCommerce + Drag And Drop Template Builder icon Email Templates Customizer for WooCommerce + Drag And Drop Template Builder40+ installs apply_filters( 'woocommerce_order_item_thumbnail', $image, $item ) templates/woocommerce/emails/email-order-items.php:46
  31. Material Dashboard icon Material Dashboard40+ installs apply_filters( 'woocommerce_order_item_thumbnail', is_object( $product ) ? $product->get_image() : "", $item ) ext/woocommerce/view/view_purchase.php:115
  32. User Collections for WooCommerce icon User Collections for WooCommerceFewer than 10 installs apply_filters( 'woocommerce_order_item_thumbnail', $image_html, $item ) src/includes/display-collection.php:53
  33. HoneyBadger.IT icon HoneyBadger.ITFewer than 10 installs apply_filters( 'woocommerce_order_item_thumbnail', $image, $item ) includes/honeybadger-api.php:3071
  34. YayMagic Email Builder icon YayMagic Email BuilderFewer than 10 installs apply_filters( 'woocommerce_order_item_thumbnail', $image, $item ) templates/shortcodes/order-details/order-items/image-content.php:8
  35. AAkron Personalization icon AAkron PersonalizationFewer than 10 installs apply_filters( 'woocommerce_order_item_thumbnail', $image, $item ) admin/woocommerce/emails/email-order-items.php:46

Need a customisation built on this hook?

Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.