WooCommerce custom jQuery event after added to cart

Posted by Prem Tiwari | Updated on

WooCommerce custom jQuery event after added to cart. You need first to use jQuery instead of the alias $ and you should need to specify the “ready” state to allow the DOM to be completely loaded before. I have tested the code below and it works triggering the “added_to_cart” JS event in the browser console, once a product is added to cart:


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers