title: Get woocommerce subcategory products
body: <p>I am trying to get the woocommerce subcategories with products to show under the main categories. </p>
  
  <pre><code>&lt;ul class="wsubcategs"&gt;
  &lt;?php
  $wsubargs = array(
  'hierarchical' =&gt; 1,
  'show_option_none' =&gt; '',
  'hide_empty' =&gt; 0,
  'parent' =&gt; $category-&gt;term_id,
  'taxonomy' =&gt; 'product_cat'
  );
  $wsubcats = get_categories($wsubargs);
  foreach ($wsubcats as $wsc):
  ?&gt;
  &lt;li&gt;&lt;a href="&lt;?php echo get_term_link( $wsc-&gt;slug, $wsc-&gt;taxonomy );?&gt;"&gt;&lt;?php echo $wsc-&gt;name;?&gt;&lt;/a&gt;
  
  &lt;/li&gt;
  &lt;?php
  endforeach;
  ?&gt;
  
  &lt;/ul&gt;
  </code></pre>
  
  <p>So far this has gotten me the corrent subcategories under the correct main categories, but no products are being shown under them. 
  Any advice would be appreciated.</p>
  
  <p>O.</p>