title: wc_get_template_part wocommerce does not display the content in rest api
body: <p>hello guys when i try to loop products it's just display the div but not product info</p>
  <p><a href="https://i.stack.imgur.com/Xg5CE.png" rel="nofollow noreferrer">the image of the result</a></p>
  <p>or
  <a href="https://i.stack.imgur.com/iws5f.png" rel="nofollow noreferrer">the image of the result from console</a></p>
  <p>as you see it's just display the divs but not the content</p>
  <p>this is the code:</p>
  <pre><code>function stsearch_products($data) {
    $args = array(
        'post_type'     =&gt; 'product', 
        'product', 'posts_per_page' =&gt; -1,
        'order'         =&gt; 'ASC' // ASC
    );
    $args['s'] = $data['search-title'];
    
  
    $loop = new WP_Query( $args );
    ob_start();
    if ( $loop-&gt;have_posts() ) :
  
        do_action( 'woocommerce_before_shop_loop' );
  
        woocommerce_product_loop_start(); 
  
  
            while ( $loop-&gt;have_posts() ) :
  
                $loop-&gt;the_post();
  
                wc_get_template_part( 'content', 'product' );
  
            endwhile;
    
        woocommerce_product_loop_end(); 
  
  
        do_action( 'woocommerce_after_shop_loop' ); 
  
  
    else :
  
        do_action( 'woocommerce_no_products_found' );
  
    endif; 
  
   
    wp_reset_postdata(); 
    return ob_get_clean();
  
  }
  </code></pre>