title: Get woocommerce categories thumbnails for each category on category pages
body: <p>I have a problem. I use a filter with thumbnails. At least this filter does not include get category thumbnail and you have to upload all thumbnails manually into the filter which is not a good solution.</p>
  <p>What I try to do is to get the thumbnail automatically from the category thumbnail. So far I have a code which adds a thumbnail from the current query which is also not a good solution. I need to get the thumbnail for each category separately.</p>
  <p>This code works with current query and display the same image for all categories from the current opened category. Do you have any idea how could I get thumbnail for each category separately?</p>
  <pre><code>if ( is_product_category() ){
      global $wp_query;
  
      // get the query object
      $cat = $wp_query-&gt;get_queried_object();
  
      // get the thumbnail id using the queried category term_id
      $thumbnail_id = get_term_meta( $cat-&gt;term_id, 'thumbnail_id', true ); 
  
      // get the image URL
      $image = wp_get_attachment_url( $thumbnail_id ); 
  
  
                          return '&lt;span class=&quot;prdctfltr_customize_block prdctfltr_customize&quot;&gt;&lt;span class=&quot;prdctfltr_customize_image&quot;&gt;&lt;img src=&quot;' . $image . '&quot; alt=&quot;' . $cat-&gt;name . '&quot;/&gt;&lt;/span&gt;' . ( $cnt !== false ? ' &lt;span class=&quot;prdctfltr_customize_count&quot;&gt;' . absint( $cnt ) . '&lt;/span&gt;' : '' ) . ( $tip !== false ? '&lt;span class=&quot;prdctfltr_tooltip&quot;&gt;&lt;span&gt;' . wp_kses_post( $tip ) . '&lt;/span&gt;&lt;/span&gt;' : '' ) . ( $checked !== '' ? '&lt;input type=&quot;checkbox&quot; value=&quot;' . esc_attr( $term_slug ) . '&quot;' . esc_html( $checked ) . '/&gt;' : '' ) . '&lt;span class=&quot;prdctfltr_customization_search&quot;&gt;' . esc_html( $term_name ) . '&lt;/span&gt;' . wp_kses_post( $sublevel ) . '&lt;/span&gt;';
                      }
  </code></pre>
  <p><a href="https://i.stack.imgur.com/S1m8e.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/S1m8e.png" alt="enter image description here" /></a></p>
  <p>Thank you in advance.</p>
  <p>UPDATE
  <a href="https://jsfiddle.net/8wmv7o6q/" rel="nofollow noreferrer">PHP CODE</a></p>