• You MUST read the Babiato Rules before making your first post otherwise you may get permanent warning points or a permanent Ban.

    Our resources on Babiato Forum are CLEAN and SAFE. So you can use them for development and testing purposes. If your are on Windows and have an antivirus that alerts you about a possible infection: Know it's a false positive because all scripts are double checked by our experts. We advise you to add Babiato to trusted sites/sources or disable your antivirus momentarily while downloading a resource. "Enjoy your presence on Babiato"

Cart and Order Restrictions

Salut tout le monde
S'il vous plaît, j'ai besoin de ce plugin. Quelqu'un peut m'aider à l'obtenir ?
Please !
 
I also needed Woocommerce to only allow 1 product in the cart. (Subscription based store) If a product is already in the cart and another 1 is added then it should remove the previously added products.

I used this function in child theme functions.php
This works great. Hope this help for someone.
add_filter('woocommerce_add_cart_item_data', function($cart_data) { wc_empty_cart(); return $cart_data; }, 99);
 
  • Love
Reactions: tothetop
AdBlock Detected

We get it, advertisements are annoying!

However in order to keep our huge array of resources free of charge we need to generate income from ads so to use the site you will need to turn off your adblocker.

If you'd like to have an ad free experience you can become a Babiato Lover by donating as little as $5 per month. Click on the Donate menu tab for more info.

I've Disabled AdBlock