X mini cart in home page doesn't update

Hi, I have a problem with the X minicart.

When I add a product to the cart it is updated correctly.

But if I then go back to the home page of the site it is not updated and shows 0.
If i refresh the page, the minicart updates correctly. This only happens on the homepage of the site!
The site in question is https://www.make-shape.com/ and the Version of X is: 10.2.9 .
Thank you for whatever you can tell me.

Andrea Rufo

Hello Andrea,

Thanks for writing to us.

It might be the issue of plugin conflict of custom code issue or cache issue. I also noticed that there is some console error on the site. I would suggest you troubleshoot a few of the common issues before we investigate your settings.

If none of those work, it would be best if you could copy your live website to your staging area. and send your details in a secure note so that we can investigate your setting without breaking your live site. Please provide the following details

  • WordPress Login URL
  • Admin-level username and password

You can find the Secure Note button at the bottom of your posts

Thanks

You can work directly on the site which is online.

Thank you for whatever you can do.
Andrea Rufo

Hello,

That login URL did not work, but I think I have an idea on the issue. Adding the following in a child theme might help. If not I would check if there is a caching issue on the homepage. Hope this helps!

add_action("wp_enqueue_scripts", function() {
  wp_enqueue_script( 'wc-cart-fragments' );
});

Hi, sorry for the wrong link. However I tried putting the code in the child theme and it works! Problem solved. Thanks so much for your assistance.

1 Like

Awesome. We will set this up so you won’t need that in your child theme in a point release. Woo 7.8 changed some things so we need to enqueue that script manually now. Have a great weekend!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.