BUG FIX: Fixed a false warning when you had the product in your cart page and viewed the cart page.
I think it may be better to figure out this in the pmprowoo_cart_has_membership() has more than one membership level in the cart when on the cart or checkout page and doesn't allow multiple checkouts in the group settings.
The logic here would assume if we make it to the checkout or cart page that things are okay because it seems that the logic checks this more than once while on the cart page causing the false positive. I do think we need a special check for when viewing the cart or checkout page and making sure all the products are still purchasable.
This is a proof of concept for now and may not fully function correctly in some cases but it is a good starting point.
I think it may be better to figure out this in the
pmprowoo_cart_has_membership()
has more than one membership level in the cart when on the cart or checkout page and doesn't allow multiple checkouts in the group settings.The logic here would assume if we make it to the checkout or cart page that things are okay because it seems that the logic checks this more than once while on the cart page causing the false positive. I do think we need a special check for when viewing the cart or checkout page and making sure all the products are still purchasable.
This is a proof of concept for now and may not fully function correctly in some cases but it is a good starting point.
All Submissions: