title: wc_get_product always returns false
body: <p>No matter what I do, I can't see to get wc_get_product function to return a product.</p>
  
  <p>I have this code at present located at the bottom of my functions.php file:</p>
  
  <pre><code>function get_all_products() {
    $args = array(
         'post_type' =&gt; 'product',
               'posts_per_page' =&gt; -1,
       );
    return get_posts($args);
  }
  
  echo '&lt;pre&gt;';
  $products = get_all_products();
  $first_product = $products[0];
  $_product = wc_get_product( $first_product-&gt;ID );
  var_dump( $_product );
  exit();
  </code></pre>
  
  <p>But it always returns</p>
  
  <pre><code> bool(false)
  </code></pre>
  
  <p>Even if hardcode the value:</p>
  
  <pre><code> $_product = wc_get_product( 9365 );
  </code></pre>
  
  <p>Still returns false.</p>
  
  <p>What am I missing?</p>