title: How do I retrieve a JSON of all WooCommerce data on any Wordpress page?
body: <p>I want to set up a WooCommerce shop for a WordPress site (which I've never done before by the way).</p>
  
  <p>However, I do not want to use any type of WooCommerce generated pages.</p>
  
  <p>What I want is to add/remove products (along with all other relevant product data), create categories, subcategories etc.. using the WooCommerce "control panel" from inside the Wordpress Dashboard and every time I do that, I want a WooCommerce object (containing all that data) to be updated/generated and made available across all (or some specific) pages.</p>
  
  <p>The reason for that is because I want to build everything myself (product pages, cart page, checkout page, category pages, subcategory pages).</p>
  
  <p>In order to populate these pages with the relevant data, however, I'll need to have access to the whole of WooCommerce data from any of those pages.</p>
  
  <p>Some examples will explain better what I'm trying to achieve. (note : I'll be using Javascript and generating everything on the client)</p>
  
  <p><strong>Case #1</strong>
  Let's say I am in the "Shop" page, and I want to populate a column with all available product categories. I need to be able to do something like that :</p>
  
  <pre><code>var wooCommerceShopData = getAllWooCommerceShopData(); // an Ajax request that will fetch me all that data
  
  var arrayOfAllAvailableCategories = wooCommerceShopData.categories;
  </code></pre>
  
  <p><strong>Case #2</strong></p>
  
  <p>Now suppose I am in the "sportswear" category. I need to be able to do something like that :</p>
  
  <pre><code>var wooCommerceShopData = getAllWooCommerceShopData();
  
  var productsObjectForCurrentCategory = wooCommerceShopData.categories["sportswear"].products;
  </code></pre>
  
  <p><strong>Case #3</strong></p>
  
  <p>If I am on a "sportwear"-category product page, I need to be able to do something like that :</p>
  
  <pre><code>var wooCommerceShopData = getAllWooCommerceShopData();
  
  var currentProductData = wooCommerceShopData.categories["sportswear"].products["BLK123XMENSHORTS"];
  
  var currentProductPrice = currentProductData.price;
  
  // etc......
  </code></pre>
  
  <p>Is this possible and is there an WooCommerce/Wordpress API for that ?</p>