Support » Plugin: Print Invoice & Delivery Notes for WooCommerce » Product Image Add To Print Receipt

  • Resolved labels4everything


    Are you able to add a thumbnail of the image that is purchased next to the title at all? We have over 2000 products so of which are very similar and would like to see the image that is purchased to aid us create the product quicker. Is this something that can be done?

Viewing 1 replies (of 1 total)
  • moksha shah


    Hello @labels4everything,

    For adding a thumbnail of the product image next to the title of all the products, please add the below code in your active theme’s functions.php file or using a plugin like Code Snippets:

    function add_product_image( $product_name, $item ) {
    	$product_id    = $item['product_id'];
    	$product_image = wp_get_attachment_image_src( get_post_thumbnail_id( $product_id ) );
    	<img src="<?php echo esc_url( $product_image[0] ); ?>" width="50" height="50" >
    	echo $product_name;
    } add_filter( 'wcdn_order_item_name', 'add_product_image', 10, 2 );


Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.