i would like to get the current category ID in the product page to show something in templates/single-product/add-to-cart/simple.php
in Woocommerce
If the category ID == 1 {//i'll show something}
if the category ID == 2 {//something else}
All of this in the "simple.php
"
Thanks
Edit :
<?php echo $product->get_categories( ', ', '<span class="posted_in">' . _n( 'Category:', 'Categories:', $cat_count, 'woocommerce' ) . ' ', '</span>' ); ?>
this code give the product name of the current product, if i can't get the ID, how could i get the string of the category name else ?