wooCommerce how to add featured image in ORDER DETAILS table

Anyone knows how to customize wooCommerce ORDER DETAILS table and add product (featured) image in it?

I tried to use:

Read More
$img = wp_get_attachment_image_src( $item['product_id'] );
<img src="' . img[0] . '">'

In woocommerce/templates/single-product/order-details.php
but its not working.

Related posts

Leave a Reply

2 comments

  1. within your order-details.php add the following, I hope this works for you aswell.

    echo get_the_post_thumbnail( $item['product_id'], 'full' ); 
    
  2. The order-details.php is in the /wp-content/plugins/woocommerce/templates/order folder.
    You will have to copy it to wp-content/themes/your-theme/woocommerce/order folder.

    Than add the following line:
    echo $thumbnail = apply_filters( ‘woocommerce_in_cart_product_thumbnail’, $_product->get_image() );

    before the lines containing this text:
    echo apply_filters( ‘woocommerce_order_item_name’

    Well done!