I have one restricted product, here how to do selected single product should be purchased alone? No other products are eligible to add add-to-cart if this product available in the add-to-cart, same if other products available in add-to-cart this product not eligible to add add-to-cart.
Workout-> https://gist.github.com/ZusZus/d68943de1e0b0def488bddcdf4ada4c9 not working.
beforeAddProduct()
plugin method