Link to home
Start Free TrialLog in
Avatar of Andrew Spackman
Andrew Spackman

asked on

WooCommerce mini cart does not update after a product is removed

Hi there,

I have an issue with my woocommerce mini cart.

The issue I have is that there are a few items that seem to be stuck in the cart no matter if you are logged in or not. If you try and remove them, a few seconds later they appear again.

I thought It might have been outdated plugins and template files, so I have backed up my site and updated everything along with all the template files, still the same issue.

My website is www.ingeniousgifts.co.uk and you can access the slide out mini cart from the top right of the screen.

I have attached a screen record so you can see what happens.

I would really appreciate if someone could help me find out why this is happening and how to fix it?
Home---Ingenious-Gifts.webm
Avatar of Andrew Spackman
Andrew Spackman

ASKER

Here is a similar issue to what I am experiencing...

https://github.com/woocommerce/woocommerce/issues/11064
and this is my mini-cart code

<div class="mini-cart-content">
            <div class="widget_shopping_cart_content">
				<?php woocommerce_mini_cart();?>
	    </div>
</div><!--mini-cart-content-->

Open in new window

I believe this could have something to do with WP rocket the caching plugin I am using. would really appreciate some help with this.
Avatar of lenamtl
Hi,

could you check if any JS error occurred using Chrome right click / inspect on the page you have the problem then delete and check again. in the console...
Hi Lenamtl,

I have checked and I am not receiving any errors in the console. Also, if you add an item to the cart it works fine, just seems to be when the cart is empty, or not in this case.
Try to update to the latest version of mini cart, this may be an old bug that is now fixed...

the bug from github is from 2016 and there was a temporary fix for it
https://github.com/woocommerce/woocommerce/commit/99f6540fe9b55cfda33d8991f9b14f5127c7b304

So I beleive this should be fixed by now
But all my plugins are up to date, surely I shouldn't need to hack any core woo files?
I can't seem to work this one out, could it be WP rocket? I really need to get this fixed as it's adding items in guest baskets
You have an old Jquery version could you tried to update it
Im not sure what happened, if it was a caching issue or the jquery version Lenamtl recommended above but this appears to be ok now :/
ASKER CERTIFIED SOLUTION
Avatar of Andrew Spackman
Andrew Spackman

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial