title: Check to see if WooCommerce Category Image exist
body: <p>Is there a way to check and see if a category thumbnail exist in WooCommerce? Something similar to <code>has_post_thumbnail()</code>? I'm trying to create conditional that will display a category image if available and if not it'll display the WooCommerce placeholder.</p>
  
  <p>CODE UPDATED with answer below for anyone else who needs it:</p>
  
  <pre><code>&lt;?php
              $args = array(
                  'number'     =&gt; $number,
                  'orderby'    =&gt; $orderby,
                  'order'      =&gt; $order,
                  'hide_empty' =&gt; $hide_empty,
                  'include'    =&gt; $ids,
                  'parent'    =&gt; 0
              );
              $product_categories = get_terms( 'product_cat', $args );
              foreach( $product_categories as $cat ) {
                  $category_thumbnail = get_woocommerce_term_meta($cat-&gt;term_id, 'thumbnail_id', true);
                  $image = wp_get_attachment_url($category_thumbnail);
  
                  if ($image) {
                      $image_decider = $image;
                  } else {
  
                      $image_decider = woocommerce_placeholder_img_src();
                  }
  
                  echo '
                  &lt;div class="col-md-4"&gt;
                      &lt;a href="'. get_site_url().'/product-category/'. $cat-&gt;slug .'"&gt;
                          '. $cat-&gt;name . '&lt;img src="'.$image_decider.'" width="350"   height="350" alt="'. $cat-&gt;name . '-category-image"&gt;&lt;/a&gt;
                  &lt;/div&gt;
                  ';
              }
          ?&gt;
  </code></pre>