title: Display product image on Woocommerce My Account Downloads section
body: <p>I’ve got a problem that I can’t seem to figure out. I’m trying to add the product image to each item in the my-account/downloads/ section. I have tried multiple codes that I found but none seem to work for me.</p>
  <p>I am using 3 plugins with all other plugins disabled trying to figure this out. These 3 plugins are required, so I need this to work with all 3 of these plugins activated.</p>
  <p>The 3 plugins are:</p>
  <p><strong>Woocommerce Memberships</strong></p>
  <p><strong>Woocommerce Subscriptions</strong></p>
  <p><strong>Woocommerce Subscriptions Downloads</strong></p>
  <p>All my products are virtual so I need an image next to their name in the downloads section. I'm pulling my hair out here... Anyway, to the things I've tried.</p>
  <p>I have tried this code which I found in <a href="https://wordpress.org/support/topic/product-image-in-download-section/" rel="nofollow noreferrer">This form post</a></p>
  <pre><code>function my_account_downloads_column_download_product( $download ) {
      // Get $product object from product ID
      $product = wc_get_product( $download['product_id'] );
      
      // Get thumbnail
      $thumbnail = $product-&gt;get_image(array( 36, 36)); // Get the product thumbnail (from product object)
      
      // Image found
      if( $product-&gt;get_image_id() &gt; 0 ) {
          $item_name = '&lt;div class=&quot;item-thumbnail&quot;&gt;' . $thumbnail . '&lt;/div&gt;';
          echo $item_name;
      }
  
      echo '&lt;a href=&quot;' . $product-&gt;get_permalink() . '&quot;&gt;' . $product-&gt;get_name() . '&lt;/a&gt;';
   }
  </code></pre>
  <p>I also tried the other codes present in that form but they didn’t work for me.</p>
  <p>Based on <em><a href="https://stackoverflow.com/questions/50936156/add-the-product-image-to-woocommerce-my-account-order-view/50937087#50937087">Add the product image to Woocommerce my account order view</a></em> answer code, which works great for the view-order page, I have made some changes trying to make it work for my-account/downloads/ section.</p>
  <p>Here’s my code attempt:</p>
  <pre><code>// Display the product thumbnail in order view pages
  add_filter( 'woocommerce_my_account_my_downloads_title', 'display_product_image_in_downloads', 20, 3 
      );
  function display_product_image_in_downloads( $item_name, $item, $is_visible ) {
      // Targeting view order pages only
      if( is_wc_endpoint_url( 'downloads' ) ) {
          $product       = $item-&gt;get_product(); // Get the WC_Product object (from order item)
          $product_image = $product-&gt;get_image(array( 80, 80)); // Get the product thumbnail (from product 
      object)
          $item_name     = '&lt;div class=&quot;item-thumbnail&quot;&gt;' . $product_image . '&lt;/div&gt;' . $item_name;
      }
      return $item_name;
  }
  </code></pre>
  <p>I changed <code>woocommerce_my_account_my_downloads_title</code>  out to every one I could find related to downloads on the <a href="https://docs.woocommerce.com/wc-apidocs/hook-docs.html" rel="nofollow noreferrer">Woocommerce Hook Reference page</a></p>
  <p>However, none of them seem to work for me.</p>
  <p>I tried to modify the template files by copying them to my childtheme / woocommerce / order / order-downloads.php, also childtheme / woocommerce / myaccount / downloads.php, and childtheme / woocommerce / myaccount / my-downloads.php. I couldn’t get any of that to work so I removed it from my childtheme and tried the codes above in my childthemes functions.php file.</p>
  <p>I have scoured the internet trying to find a solution but, every one of them don’t seem to work for me. I have a feeling that <strong>Woocommerce Subscriptions Downloads</strong> could be the problem, but it's a must plugin for me. I probably just didn’t do something right or missed something but I can’t seem to find out what.</p>
  <p>Can someone help me figure this out? That would be awesome.</p>
  <p>All I want is the product image next to the downloadable product. I only sell downloadable products and there are hundreds of products. An image would just help the customer find what they want to download so much easier.</p>