Our Hook on the empty_cart clearing our cookie
-
Hey guys.
I noticed this function which I believe is causing problems with our plugin./** Store removed_cart_contents to enable undo deleted items */ $removed_cart_contents = $wc_cart->get_removed_cart_contents(); $wc_cart->empty_cart(); $wc_cart->set_removed_cart_contents($removed_cart_contents);
So, as it seems it empties the cart and populates it again. The issues is we are hooking to the woocommerce_cart_emptied action and when the cart is empty we empty our cookie.
Now, your empty_cart seems to be triggered every time the page is refreshed which is rather strange.
How can we detect when your plugin does it so we can stop our plugin from clearing the cookie?Thanks
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Our Hook on the empty_cart clearing our cookie’ is closed to new replies.