Notice: These forums are now retired and closed. For active support, please Submit a Ticket or visit our official WordPress.org community pages.
Kadence Theme | Kadence Blocks | Starter Templates | WooCommerce Email Designer | Ascend | Virtue | Pinnacle

Can we dequeue Ajax Cart Fragments from Everywhere with Kadence Theme?

Home / Forums / Kadence Theme / Can we dequeue Ajax Cart Fragments from Everywhere with Kadence Theme?

This topic is: Resolved
[Resolved]
Posted in: Kadence Theme
January 12, 2022 at 7:10 pm

As I’ve come to understand, the Ajax Cart Fragments script calls the /?wc-ajax=get_refreshed_fragments on each pageload.
And if I understand this correctly, all this script does is to update the cart and cartitems in it by ajax. (E.g. showing the sidecart, without reloading the page)

I’ve tried to dequeue the script by using bbloomers script from here with success:

With this snippet active, the waterfall in GTMetrix doesn’t halt for around a second when calling /?wc-ajax=get_refreshed_fragments, like it normally does when the /?wc-ajax=get_refreshed_fragments is running.

All good so far.

But then I tested my “side cart” on the product and category pages – and IT WORKS just as normal. I click add to cart -> Sidecart opens, and product is added. No problems..

Is Kadence Theme doing this for us theme-wise, without the “/?wc-ajax=get_refreshed_fragments” and then we actually can disable this bloated call for ajax on every page?

Am I correct, please enlighten me 🙂

  • The forum ‘Kadence Theme’ is closed to new topics and replies.