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 #269902

    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 🙂

    Please Login to continue

    If you do not have an account you can register here.