• Resolved atelierdevs

    (@atelierdevs)


    When i click on print invoice, it shows all the details apart from the product image, I have updated to the latest update.

    this is somthing that i believe use to work.

    • This topic was modified 2 years, 7 months ago by atelierdevs.
Viewing 1 replies (of 1 total)
  • moksha shah

    (@mokshasharmila13)

    Hello @atelierdevs,

    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" >
    	<?php
    	echo $product_name;
    } add_filter( 'wcdn_order_item_name', 'add_product_image', 10, 2 );

    Regards,
    Moksha.

Viewing 1 replies (of 1 total)
  • The topic ‘Image Missing’ is closed to new replies.