title: Woocommerce - added_to_cart trigger
body: <p>I am trying to use the WooCommerce added_to_cart trigger to trigger a popup when adding specific products to cart. So far, I have succeeded with the following:</p>
  
  <pre><code>jQuery('body').on('added_to_cart',function() {
          alert("testing!");
      });
  </code></pre>
  
  <p>This shows an alert box when any product is added to cart. However, i would like the alert to only show up for specific categories. But how can I check which category the product added to cart belongs to?</p>
  
  <p>The source for adding to cart is here:
  <a href="https://github.com/woothemes/woocommerce/blob/master/assets/js/frontend/add-to-cart.js" rel="noreferrer">https://github.com/woothemes/woocommerce/blob/master/assets/js/frontend/add-to-cart.js</a></p>
  
  <p>And the trigger in question in this:</p>
  
  <pre><code>$( document.body ).trigger( 'added_to_cart', [ fragments, cart_hash, $thisbutton ] );
  </code></pre>