title: WooCommerce adding product categories as class in product loop
body: <p>i'm working on a small Woocommerce shop, and i would like to have a sorting function. 
  The sorting works like a charm, but it is sorting based on the products class.
  So i would like to post the product category as class on the list item in my product loop. 
  My loop looks like this:</p>
  
  <pre><code>&lt;?php
      $args = array(
        'post_type' =&gt; 'product',
        'posts_per_page' =&gt; 999
        );
      $loop = new WP_Query( $args );
      if ( $loop-&gt;have_posts() ) {
          while ( $loop-&gt;have_posts() ) : $loop-&gt;the_post();
              woocommerce_get_template_part( 'content', 'product' );
          endwhile;
      } 
      else {
        echo __( 'No products found' );
      }
      wp_reset_postdata();
  ?&gt;
  </code></pre>
  
  <p>It outputs list items for each item like this:</p>
  
  <pre><code>&lt;li class="post-15 product type-product status-publish hentry first instock"&gt;
      &lt;a href="http://shop.bbpixelz.dk/product/i-phone-ai-template/"&gt;
          &lt;img width="150" height="150" src="http://shop.bbpixelz.dk/wp-content/uploads/2014/01/iphone-ai-template-150x150.png" class="attachment-shop_catalog wp-post-image" alt="iphone-ai-template"&gt;
          &lt;h3&gt;I-Phone Vector Template&lt;/h3&gt;
      &lt;span class="price"&gt;&lt;span class="amount"&gt;$2&lt;/span&gt;&lt;/span&gt;
      &lt;/a&gt;
      &lt;a href="/?add-to-cart=15" rel="nofollow" data-product_id="15" data-product_sku="ai-iphone" class="add_to_cart_button button product_type_simple"&gt;Add to cart&lt;/a&gt;
  &lt;/li&gt;
  </code></pre>
  
  <p>I want to add the product category as a class to the li. How is this done?</p>