title: Print WooCommerce products list sorted by SKU
body: <p>My client has asked "I would like to be able to print a listing of all products by SKU (sorted alphanumerically) with description, and by description (alpha) with the associated SKU." I think the closest I could get for him is to have the SKU sorted alphanumerically but not both, though I could be wrong. </p>
  
  <p>Looking at this question: <a href="https://stackoverflow.com/questions/21858431/woocommerce-get-a-list-for-all-sku-product">Woocommerce: get a list for all sku product</a>, I wonder if I could build a table instead of a list and pull the description in next to the SKU?</p>
  
  <p>Here's the code I'm thinking of based on the link above (without sorting):</p>
  
  <pre><code>$args = array( 'post_type' =&gt; 'product', 'posts_per_page' =&gt; -1 );
  query_posts( $args );
  if( have_posts() ):
      echo '&lt;table&gt;';
      while ( have_posts() ) : the_post();
      echo '&lt;tr&gt;&lt;td&gt;'. $product-&gt;get_sku() . ' - ' . $product-&gt;get_title() . '&lt;/td&gt;&lt;td&gt;' . $product-&gt;get_description() . '&lt;/td&gt;&lt;/tr&gt;';
  endwhile;
  echo '&lt;/table&gt;';
  endif;
  </code></pre>
  
  <p>I don't think the description is the correct way to call it, but I didn't see one to call in the short description.Also, I'm not sure how I would have it sort by SKU. My PHP knowledge is limited.</p>
  
  <p>Even if that code worked, I'm not sure where I would put it to call this in. Can I make it on an admin page or would it be better to create a regular page and use a different template and put this directly into the PHP of that template file? </p>
  
  <p>Any suggestions would be great!</p>