title: Display a custom button on WooCommerce product pages only for certain categories
body: <p>I have added a custom button to product page that is connected to product meta demo_url, which is just an URL that changes by each product (to open live demo for each product separately in a lightbox). The code is quite simple:</p>
  
  <pre><code>function my_extra_button_on_product_page() {
    global $product;
    $demo_url = get_post_meta( get_the_ID(), 'demo_url', true );
    echo '&lt;a class="fancybox iframe" data-width="1280" data-height="720" href="'.$demo_url.'"&gt;&lt;button style="background: lightblue; padding-left: 19px; padding-right: 19px;"&gt;Przymierz&lt;/button&gt;&lt;/a&gt;';
  }
  </code></pre>
  
  <p>The thing is, there are some other products in the shop that do not use live demo function. They are listed in different categories. I would like this button to be visible ONLY for certain product category (or invisible for two product categories - whatever is easier).</p>
  
  <p>I suppose this should be done via get_cat_ID( $cat_name ), but I am unsure how to write the if function and generally I'm quite inexperienced in coding. Maybe something like this could work?</p>
  
  <pre><code>if get_cat_ID( $cat_name ) = categoryname {
      echo 'button code';
  else
      echo 'no button code';
  endif
  }
  </code></pre>
  
  <p>How can I make it work?</p>
  
  <p>Thanks</p>