get products in wordpress code example
Example: get products in wordpress
$args = array(
'post_type' => 'product',
'posts_per_page' => -1 );
$products = get_posts( $args );
$args = array(
'post_type' => 'product',
'posts_per_page' => -1 );
$products = get_posts( $args );