Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

woo loop simple

// WP_Query arguments
$args = array (
	'post_type'              => 'product',
);

// The Query
$product_query = new WP_Query( $args );

// The Loop
if ( $product_query->have_posts() ) {
	while ( $product_query->have_posts() ) {
		$product_query->the_post();
		// do something
	}
} else {
	// no posts found
}

// Restore original Post Data
wp_reset_postdata();