title: Show WooCommerce Variable Product Options
body: <p>I am trying to create a query that displays products and some information about them.</p>
  
  <p>I am stuck on showing their variable product options (they will all be variable products). After this I have to create an add to cart button that will add to cart, produce a success or error message, and let the user continue shopping. Once there is something in the user's cart I would like to then display a checkout button that will take them to the checkout page.</p>
  
  <p>Here is what I've got so far</p>
  
  <pre><code>&lt;?php
      $args = array(
          'post_type' =&gt; 'product',
          'posts_per_page' =&gt; 12,
          // Indicate the product category - in this case "training"
          'product_cat' =&gt; 'training'
      );
      $loop = new WP_Query( $args );
      if ( $loop-&gt;have_posts() ) {
          while ( $loop-&gt;have_posts() ) : $loop-&gt;the_post();
  
              // Show the product Featured Image and gallery images
              woocommerce_show_product_images();
  
              // Show the product Title
              echo the_title();
  
              // Show the product Custom Fields
              echo get_post_meta($post-&gt;ID, 'Description', true);
              echo get_post_meta($post-&gt;ID, 'Specifications', true);
              echo get_post_meta($post-&gt;ID, 'Video', true);
  
              // Show the Product Price
              echo $product-&gt;get_price_html();
  
              // Show the Variable Product options, for example: Color, Size etc 
              // stuck here!
  
              // Show the Add to cart button  
              // stuck here!
  
              // Show the Checkout button if there is an item in the users cart
              // stuck here!
  
          endwhile;
      } 
      wp_reset_postdata();
  ?&gt;
  </code></pre>
  
  <p>Does anyone know the functions I should be using to display this information?
  I'm having a hard time finding anything about it in the documentation / on google.</p>
  
  <p>Thank you all!!!</p>