$args = array(
'posts_per_page' => -1,
'tax_query' => array(
'relation' => 'AND',
array(
'taxonomy' => 'product_cat',
'field' => 'term_id', //it can be name, slug or term_id
'terms' => 15
)
),
'post_type' => 'product',
'orderby' => 'title,'
);
$products = new WP_Query( $args );
while ( $products->have_posts() ) {
$products->the_post();
?>
<li>
<a href="<?php the_permalink(); ?>">
<?php the_title(); ?>
</a>
</li>
<?php
}
