I'm currently showing the products of one WooCommerce product category (events) with the following code:
<?php $args = array( 'post_type' => 'product', 'product_cat' => 'events');
$loop = new WP_Query( $args );
while ( $loop->have_posts() ) : $loop->the_post(); global $product; ?>
Is it possible to get a product category by name instead of slug or ID?
Since I'm using a translation plugin (WPML) slugs have been added per language (for example "events_eng").
Thanks.