Im trying to display the slug instead of the name of on a product single meta. This is the code which is displaying the current category name with a link to the category. Id like to do the same but use the slug as instead :
<?php
global $post, $product;
$cat_count = sizeof( get_the_terms( $post->ID, 'product_cat' ) );
?>
<div class="product_meta">
<?php echo $product->get_categories( ', ', '<span class="posted_in">' . _n( 'Location:', 'Locations:', $cat_counts, 'woocommerce' ) . ' ', '</span>' ); ?>
<?php do_action( 'woocommerce_product_meta_end' ); ?>
</div>
Thank you