Auto add or remove a freebie product from cart in WooCommerce

Posted by Editorial Staff | Updated on

If you want to auto add or remove a freebie product from cart in your WooCommerce based online store. The following code will add a freebie product on first add to cart just once. If all other cart items are removed, the freebie item will be removed too:


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