title: How to display a list of all published products variations IDs on Woocommerce
body: <p>My goal at the end is adding all my variations to the cart fast using only the ID list of the variations, but whatever I try I can't get to display a list of this variations on the cart page...</p>
  <pre><code>add_action( 'woocommerce_before_cart', 'custom_echo_product_ids' );
  
  function custom_echo_product_ids() {
  
     $all_ids = get_posts( array(
          'post_type' =&gt; 'product',
          'numberposts' =&gt; -1,
          'post_status' =&gt; 'publish',
          'fields' =&gt; 'ids',
     ) );
  
     foreach ( $all_ids as $id ) {
          echo $id-&gt;get_children() . , . ;
     }
  }
  </code></pre>