title: Is there a way to hook into WooCommerce BEFORE item is added to cart
body: <p>Does anyone know of a filter or hook that can be applied to insert a function before an item is inserted into a cart using WooCommerce?  I have a similar issue as this post:</p>
  
  <p><a href="https://stackoverflow.com/questions/14428248/wordpress-woocommerce-action-hook-before-adding-to-cart">Wordpress. Woocommerce. Action hook BEFORE adding to cart</a></p>
  
  <p>But that OP's comments don't seem to work or are so vague I can't get them to work and I can find no documentation regarding woocommerce_before_add_to_cart.</p>
  
  <p>What I'm trying to do is just display an error, I'll add logic once I can hook into the right action:</p>
  
  <pre><code>function checkProd(){
  global $woocommerce;
  $woocommerce-&gt;add_error( __('ERROR', 'woocommerce') );
  return;
  }
  add_action( 'woocommerce_variable_add_to_cart', 'checkProd');
  </code></pre>