Always use tax_query to get posts/products from a particular category or any other taxonomy. You can also get the products using ID/slug of particular taxonomy...
$the_query = new WP_Query( array(
'post_type' => 'product',
'tax_query' => array(
array (
'taxonomy' => 'product_cat',
'field' => 'slug',
'terms' => 'accessories',
)
),
) );
while ( $the_query->have_posts() ) :
$the_query->the_post();
the_title(); echo "<br>";
endwhile;
wp_reset_postdata();