title: Woocommerce Display Category Image - get_woocommerce_term_meta deprecated
body: <p>I'm in need of some help.</p>
  
  <p>I want to display the category image on the current category page, and I have googled this, and each answer I find uses the same code.</p>
  
  <p>They all use <code>get_woocommerce_term_meta</code> to retrieve the ID of the thumbnail used so that you can then use <code>wp_get_attachment_url</code> to get the image address.</p>
  
  <p>All sounds great, but whenever I try this code it returns nothing, and I think that it is because <code>get_woocommerce_term_meta</code> is deprecated.</p>
  
  <p>Does anyone know of a way round this, so I can get the image address when I have the category ID?</p>
  
  <p>This is the code that I have in place:</p>
  
  <pre><code>global $wp_query;
  $cat = $wp_query-&gt;get_queried_object();
  $thumbnail_id = get_woocommerce_term_meta($cat-&gt;term_id, 'thumbnail_id', true);
  echo $cat-&gt;term_id."&lt;br /&gt;";
  echo $thumbnail_id;
  $image_src = wp_get_attachment_url($thumbnail_id);
  </code></pre>
  
  <p><code>$cat-&gt;term_id</code> returns the correct ID of the category, but <code>$thumbnail_id</code> returns 0.</p>
  
  <p>The code is in header.php.</p>