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
Andrew SpackmanAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Andrew SpackmanAuthor Commented:
Here is a similar issue to what I am experiencing...

https://github.com/woocommerce/woocommerce/issues/11064
Andrew SpackmanAuthor Commented:
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

Andrew SpackmanAuthor Commented:
I believe this could have something to do with WP rocket the caching plugin I am using. would really appreciate some help with this.
Fundamentals of JavaScript

Learn the fundamentals of the popular programming language JavaScript so that you can explore the realm of web development.

lenamtlCommented:
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...
Andrew SpackmanAuthor Commented:
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.
lenamtlCommented:
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
Andrew SpackmanAuthor Commented:
But all my plugins are up to date, surely I shouldn't need to hack any core woo files?
Andrew SpackmanAuthor Commented:
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
lenamtlCommented:
You have an old Jquery version could you tried to update it
Andrew SpackmanAuthor Commented:
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 :/
Andrew SpackmanAuthor Commented:
Caching issue

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.