title: Woocommerce get all products in array
body: <p>Im having problems with retrieving product infos trough object functions in Woocommerce.</p>
  
  <p>This is how I do:</p>
  
  <pre><code>public function table_data()
  {
      $args     = array( 'post_type' =&gt; 'product', 'posts_per_page' =&gt; -1 );
      $products = get_posts( $args );
  
      $pfactory = new WC_Product_Factory();
      foreach($products as $product)
      {
          $_product = $pfactory-&gt;get_product($product);
      }
  }
  </code></pre>
  
  <p>This returns product informations from wp_posts only, it won't give me the information stored in wp_postmeta.</p>
  
  <p>I need the full information from all products (such as price, sku, stock etc.) in one array, but I seem to be missing something and Im unsure if it has with the hierarchy of the functions in my code. However I thought this was possible to do without SQL-queries.</p>
  
  <p>Basicly, what im trying to do is a complete duplicate of product list in admin for listing products with information in the panel.</p>
  
  <p>Thanks for all the help I can get.</p>