title: Woocommerce get_term() count and get_terms() count different
body: <p>I'm using php in woocommerce on a post and would like to show/hide products in a category based upon their stock level.  Currently using get_term() and the product count includes "out-of-stock" products.  Using get_terms() and the product count for that same category counts only "in-stock" products.  How do I write my if else condition statement to use the get_terms count of a specific product category?</p>
  
  <p>Here is the code I have so far ("if" is true when products in this category are "out-of-stock".  Would like "if" to be true only when products in this category are "in-stock"):</p>
  
  <pre><code>&lt;?php
  $term = get_term(373, 'product_cat' );
  $category = $term-&gt;name;
  $theCount = $term-&gt;count;
  if ( ( $category = 'Outlet Other' ) &amp;&amp; ( $theCount &gt; 0 ) ){
      echo '[product_category category="outlet-other" per_page="100" orderby="menu_order" order="asc"]';} 
  else {
      echo 'There are currently no products in this category.  Please check back soon!';}
  ?&gt;
  </code></pre>
  
  <p>Here is other code I have on the page for testing purposes that shows the product count for this category using get_terms() equal to "in-stock" quantity:</p>
  
  <pre><code>&lt;?php
  $terms = get_terms( 'product_cat' );
  foreach( $terms as $term ){
      echo 'Product Category: ' . $term-&gt;name . ' - Count: ' . $term-&gt;count . "\r\n";}
  ?&gt;
  </code></pre>