• Resolved wpisco

    (@wpisco)


    The cart does not update the number when I use a cache plugin and appears as empty.

    1 I add a product and the cart appears updated.

    1. I go to the home page and the cart shows 0, when I click on it I am redirected to /shop.
    2. then it shows the cart with 1 product I have tried with wp rocket and LiteSpeed Cache and I have the same problem….

    When I deactivate the cache plugins it works correctly.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support dwpriv

    (@dwpriv)

    @wpisco

    Apologies for the late response!

    This issue is likely related to the particular plugin dequeuing the cart fragments script that our plugin relies on to update the cart details live. With the cache plugin active, you can try adding this snippet to your site:

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


    If you haven’t worked with code snippets (actions/filters) or functions.php before, read this guide: How to use filters

    Plugin Support dwpriv

    (@dwpriv)

    since we haven’t heard from you in a while, I will mark this as resolved. feel free to open the topic again if this is not resolved for you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘No update cart with cache plugins’ is closed to new replies.