title: How to Get the Current category ID in the product page in Woocommerce?
body: <p>i would like to get the current category ID in the product page to show something in <code>templates/single-product/add-to-cart/simple.php</code>in Woocommerce</p>
  
  <pre><code>If the category ID == 1 {//i'll show something}
  
  if the category ID == 2 {//something else}
  </code></pre>
  
  <p>All of this in the "<code>simple.php</code>" </p>
  
  <p>Thanks</p>
  
  <p>Edit : </p>
  
  <pre><code>&lt;?php echo $product-&gt;get_categories( ', ', '&lt;span class="posted_in"&gt;' . _n( 'Category:', 'Categories:', $cat_count, 'woocommerce' ) . ' ', '&lt;/span&gt;' ); ?&gt;
  </code></pre>
  
  <p>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 ?</p>