• Resolved etellwright

    (@etellwright)


    I have WordPress site for our business using Twenty Twenty-Five and I have added a WooCommerce store. Everything is up to date. All was well and we were ready to launch our site when the shopping cart developed problems: if you click ‘Add to Cart’ on a product, the side cart pops up but is empty and the cart icon does not show a number. However if you go to a product page and add an item to cart on the product page and then go to ‘View Basket’ the previously added product is there. If you then press back to continue shopping, the cart icon has no numbers and the side cart is showing empty again.

    I have had a WordPress expert helping me with the site, and he thought this was a caching issue. Adjusting the caching did seem to fix the problem, but it soon reoccurred and now he cannot find a fix.

    System Status Report

    ### WordPress Environment ###
    
    WordPress address (URL): [Redacted]
    Site address (URL): [Redacted]
    WC Version: 9.8.1
    Legacy REST API Package Version: The Legacy REST API plugin is not installed on this site.
    Action Scheduler Version: ✔ 3.9.2
    Log Directory Writable: ✔
    WP Version: 6.8
    WP Multisite: –
    WP Memory Limit: 2 GB
    WP Debug Mode: –
    WP Cron: ✔
    Language: en_GB
    External object cache: ✔
    
    ### Server Environment ###
    
    Server Info: LiteSpeed
    PHP Version: 8.2.27
    PHP Post Max Size: 2 GB
    PHP Time Limit: 360
    PHP Max Input Vars: 5000
    cURL Version: 7.76.1
    OpenSSL/3.2.2
    
    SUHOSIN Installed: –
    MySQL Version: 10.11.10-MariaDB-log
    Max Upload Size: 2 GB
    Default Timezone is UTC: ✔
    fsockopen/cURL: ✔
    SoapClient: ✔
    DOMDocument: ✔
    GZip: ✔
    Multibyte String: ✔
    Remote Post: ✔
    Remote Get: ✔
    
    ### Database ###
    
    [REDACTED]
    
    ### Post Type Counts ###
    
    adt_product_feed: 1
    attachment: 445
    custom_css: 1
    customize_changeset: 17
    fs_cm_ruleset: 4
    fs_package: 2
    oembed_cache: 1
    order_status: 1
    page: 26
    post: 6
    product: 68
    product_variation: 11
    product-feed: 1
    revision: 552
    shop_coupon: 3
    shop_order_placehold: 16
    sp_wcslider: 5
    wfwp_wc_order_status: 1
    woo_product_tab: 18
    wp_font_face: 36
    wp_font_family: 12
    wp_global_styles: 1
    wp_navigation: 2
    wp_template: 11
    wp_template_part: 3
    wpa-stats: 101
    wpforms: 1
    xlwcty_thankyou: 1
    
    ### Security ###
    
    Secure connection (HTTPS): ✔
    Hide errors from visitors: ✔
    
    ### Active Plugins (37) ###
    
    AddToAny Share Buttons: by AddToAny – 1.8.13
    Advanced Excerpt: by WPKube – 4.4.1
    Bookvault: by  – 4.0.0
    CookieYes | GDPR Cookie Consent: by CookieYes – 3.2.9
    Potent Donations for WooCommerce: by WP Zone – 1.1.14
    EAS EU compliance: by EAS project – 1.6.2
    Conditional Shipping Methods: by Octolize – 1.4.6
    Shipping Packages: by Octolize – 1.7.1
    Flexible Shipping PRO: by Octolize – 3.0.3
    Flexible Shipping: by Octolize – 6.0.0
    Geolocation IP Detection: by Yellow Tree (Benjamin Pick) – 5.5.0
    Site Kit by Google: by Google – 1.150.0
    WP Armour - Honeypot Anti Spam: by Dnesscarkey – 2.2.09
    Hostinger Tools: by Hostinger – 3.0.34
    LiteSpeed Cache: by LiteSpeed Technologies – 7.0.1
    Local Links: by Robin Phillips (Author Help) – 4.8
    Fonts Plugin | Use Google Fonts, Adobe Fonts or Upload Fonts: by Fonts Plugin – 3.9.3
    Omnisend for WooCommerce: by Omnisend – 1.16.1
    Order Status Control for WooCommerce: by Bright Plugins – 1.0.4
    Pinterest for WooCommerce: by WooCommerce – 1.4.17
    TikTok: by TikTok – 1.3.1
    TinyPNG - JPEG, PNG & WebP image compression: by TinyPNG – 3.5.1
    Thank You Page for WooCommerce: by Nitin Prakash – 4.2.2
    WooCategory Pro: by ShapedPlugin LLC – 1.6.0
    Country Based Restrictions for WooCommerce: by zorem – 3.7.1
    Product Feed PRO for WooCommerce: by AdTribes.io – 13.4.3
    WooCommerce.com Update Manager: by Automattic – 1.0.3
    WooPayments: by WooCommerce – 9.2.0
    WooCommerce PayPal Payments: by PayPal – 3.0.3
    WooCommerce Product Tabs: by Barn2 Plugins – 2.1.3
    WooCommerce: by Automattic – 9.8.1
    Wordfence Security: by Wordfence – 8.0.5
    Yoast SEO: by Team Yoast – 24.9
    WP Accessibility: by Joe Dolson – 2.1.17
    WP Consent API: by RogierLankhorst – 1.0.8
    WP Mail SMTP: by WP Mail SMTP – 4.4.0
    WPForms Lite: by WPForms – 1.9.4.2
    
    ### Inactive Plugins (3) ###
    
    Easy Product Bundles for WooCommerce: by Product Bundles Team – 6.3.1
    Sale Badges and Product Labels for WooCommerce: by Asana Plugins – 5.5.0
    WP2Social Auto Publish: by xyzscripts.com – 2.4.5
    
    ### Dropin Plugins () ###
    
    object-cache.php: LiteSpeed Cache - Object Cache (Drop-in)
    
    ### Must Use Plugins (2) ###
    
    Hostinger Preview Domain: by Hostinger – 1.3.0
    Hostinger Smart Auto Updates: by Hostinger – 1.0.7
    
    ### Settings ###
    
    Legacy API Enabled: –
    Force SSL: –
    Currency: GBP (£)
    Currency Position: left
    Thousand Separator: ,
    Decimal Separator: .
    Number of Decimals: 2
    Taxonomies: Product Types: bopobb (bopobb)
    donation (donation)
    easy_product_bundle (easy_product_bundle)
    external (external)
    grouped (grouped)
    simple (simple)
    variable (variable)
    
    Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog)
    exclude-from-search (exclude-from-search)
    featured (featured)
    outofstock (outofstock)
    rated-1 (rated-1)
    rated-2 (rated-2)
    rated-3 (rated-3)
    rated-4 (rated-4)
    rated-5 (rated-5)
    
    Connected to WooCommerce.com: ✔
    Enforce Approved Product Download Directories: ✔
    HPOS feature enabled: ✔
    Order datastore: Automattic\WooCommerce\Internal\DataStores\Orders\OrdersTableDataStore
    HPOS data sync enabled: –
    
    ### Logging ###
    
    Enabled: –
    Handler: Automattic\WooCommerce\Internal\Admin\Logging\LogHandlerFileV2
    Retention period: 30 days
    Level threshold: –
    Log directory size: 3 MB
    
    ### WC Pages ###
    
    Shop base: #362 - /shop/
    Basket: #10 - /cart/ -  Contains the woocommerce/classic-shortcode block
    Checkout: #11 - /checkout/ -  Contains the woocommerce/classic-shortcode block
    My account: #12 - /my-account/ -  Contains the [woocommerce_my_account] shortcode
    Terms and conditions: #136 - /terms-and-conditions/
    
    ### Theme ###
    
    Name: Twenty Twenty-Five
    Version: 1.2
    Author URL: https://en-gb.ww.wp.xz.cn
    Child Theme: ❌ – If you are modifying WooCommerce on a parent theme that you did not build
    personally we recommend using a child theme. See: How to create a child theme
    
    Theme type: Block theme
    WooCommerce Support: ❌ Not declared
    
    ### Templates ###
    
    Overrides: /home/u789742187/domains/castleseftonpress.co.uk/public_html/wp-content/plugins/woocommerce/templates/block-notices/error.php
    /home/u789742187/domains/castleseftonpress.co.uk/public_html/wp-content/plugins/woocommerce/templates/block-notices/notice.php
    /home/u789742187/domains/castleseftonpress.co.uk/public_html/wp-content/plugins/woocommerce/templates/block-notices/success.php
    
    
    ### WooPayments ###
    
    Version: 9.2.0
    Connected to WPCOM: Yes
    WPCOM Blog ID: 241825507
    Account ID: acct_1QtuXkFju2DAkTof
    Payment Gateway: Enabled
    Test Mode: Disabled
    Enabled APMs: card
    WooPay: Not eligible
    Apple Pay / Google Pay: Disabled
    Fraud Protection Level: advanced
    Enabled Fraud Filters: AVS Verification,International IP Address,IP Address Mismatch,Order Items Threshold,Purchase Price Threshold
    Multi-currency: Enabled
    Auth and Capture: Disabled
    Documents: Enabled
    Logging: Disabled
    
    ### WooCommerce PayPal Payments ###
    
    Onboarded: ✔
    New UI active: –
    Shop country code: GB
    WooCommerce currency supported: ✔
    Advanced Card Processing available in country: ✔
    Pay Later messaging available in country: ✔
    Webhook status: ✔
    PayPal Vault enabled: –
    ACDC Vault enabled: –
    Logging enabled: –
    Reference Transactions: –
    Used PayPal Checkout plugin: –
    Subscriptions Mode: Disabled
    PayPal Shipping Callback: –
    Apple Pay: –
    Google Pay: –
    Fastlane: –
    
    ### Admin ###
    
    Enabled Features: activity-panels
    analytics
    product-block-editor
    coupons
    core-profiler
    customize-store
    customer-effort-score-tracks
    import-products-task
    experimental-fashion-sample-products
    shipping-smart-defaults
    shipping-setting-tour
    homescreen
    marketing
    mobile-app-banner
    onboarding
    onboarding-tasks
    pattern-toolkit-full-composability
    product-custom-fields
    remote-inbox-notifications
    remote-free-extensions
    payment-gateway-suggestions
    printful
    shipping-label-banner
    subscriptions
    store-alerts
    transient-notices
    woo-mobile-welcome
    wc-pay-promotion
    wc-pay-welcome-page
    launch-your-store
    add-to-cart-with-options-stepper-layout
    
    Disabled Features: product-data-views
    experimental-blocks
    coming-soon-newsletter-template
    minified-js
    product-pre-publish-modal
    settings
    async-product-editor-category-field
    product-editor-template-system
    use-wp-horizon
    blockified-add-to-cart
    
    Daily Cron: ✔ Next scheduled: 2025-04-17 14:19:14 +01:00
    Options: ✔
    Notes: 75
    Onboarding: completed
    
    ### Action Scheduler ###
    
    Canceled: 2
    Oldest: 2025-04-10 07:28:41 +0100
    Newest: 2025-04-11 21:25:21 +0100
    
    Complete: 4,711
    Oldest: 2025-03-16 22:56:01 +0000
    Newest: 2025-04-16 17:44:18 +0100
    
    Failed: 49
    Oldest: 2025-01-30 09:09:28 +0000
    Newest: 2025-04-16 11:28:24 +0100
    
    Pending: 13
    Oldest: 2025-04-16 20:54:27 +0100
    Newest: 2025-04-21 15:26:20 +0100
    
    
    ### Status report information ###
    
    Generated at: 2025-04-16 17:47:55 +01:00

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi @etellwright

    Debugging Steps

    Let’s go step-by-step. Try these and let me know what you find: 1. Temporarily disable all caching

    • Disable all caching (plugins like WP Super Cache, W3 Total Cache, LiteSpeed Cache, etc.).
    • Also, clear server-level caching if your host offers it.
    • Turn off CDN caching (like Cloudflare “Cache Everything”) or set those pages to bypass caching.

    Then test again. If the cart starts behaving normally, it’s 100% a caching issue.
    2. Check if wc-ajax=get_refreshed_fragments is blocked

    This AJAX endpoint refreshes the cart in real-time. If it’s cached or blocked, your side cart won’t update.

    To test:

    • Open Chrome DevTools → Network tab
    • Add an item to the cart
    • Filter requests for ?wc-ajax=get_refreshed_fragments
    • It should return a 200 response and contain updated cart data

    If it’s 404, cached, or missing → that’s the issue. 3. Make sure your caching excludes these URLs:

    Set exclusions in your caching plugin for the following:

    /cart /checkout /my-account /?wc-ajax=*

    Also exclude cookies like:

    • woocommerce_cart_hash
    • woocommerce_items_in_cart
    • wp_woocommerce_session_*

    Caching should respect these cookies to avoid showing stale content. 4. Switch temporarily to a default WooCommerce-friendly theme

    Twenty Twenty-Five is a block theme, and not all plugins/scripts play nicely with the new frontend architecture.

    Try:

    • Switching briefly to Storefront (official WooCommerce theme)
    • Disable all custom CSS/JS snippets
    • Retest the cart behavior

    If it works, the issue is most likely the theme or something in your custom template setup.

    Another solution: Disable ajax add to cart and select: Redirect to cart page after add to cart.

    Thanks
    Ahir Hemant

    Thread Starter etellwright

    (@etellwright)

    Hi Ahir,

    Thanks for your comprehensive reply. I disabled all the caches including CDN. 

    I’m not very experienced with Chrome Dev Tools, but I tried to follow your instructions. I could not find wc-ajax=get_refreshed_fragments but I did find something to do with admin-ajax.php which clearly showed it was set not to cache.

    I added the caching exclusions you mentioned to LiteSpeed and left the CDN off. At first I thought things were fixed. It seemed a lot better until I tried it in different browsers and on a different laptop where it made no difference and the cart was still malfunctioning.

    Also, the Add to Cart buttons are not working on them – they are OK for me. I work in Safari on Mac OS 15.3.2 on an M3 MacBook Air and this problem does not occur there, so I had not realised it existed. On my iPhone, it also does not happen. But in Chrome on the same machine and in Safari on our other M3 MacBook Air, the Add to Cart buttons are completely inert and show no signs of being linked to an action. These are the add to cart buttons on Shop, Products by Category, Search Results etc. The Add to Cart on the Product Page works fine. 

    I wanted to get back to you with this new information before I tried changing theme.

    Thread Starter etellwright

    (@etellwright)

    Stranger and stranger… I have realised that the Add to Cart button is not working on https://www.castleseftonpress.co.uk but is working on https://castleseftonpress.co.uk. The cart is still not working at all on either but it’s malfunctioning in different ways: in my browser it’s very slow but sort-of works, on my iPhone it seems to work but loses things and finds them again, in Chrome and Safari on the other Mac the side cart and icon never update at all.

    Zee

    (@doublezed2)

    Hello etellwright,

    Thank you for contacting WooCommerce support.

    I’ve reviewed all the messages, and I also believe the issue is related to how the server is handling the cache.

    Additionally, I recommend that you have a permanent redirection from https://www.castleseftonpress.co.uk to https://castleseftonpress.co.uk or the other way around if you prefer www. This is good for SEO and will eliminate issues related to cache.

    Since the issues occur randomly without a consistent pattern, I suggest creating a clone of the site, ideally on a different server with only WooCommerce active. This will help isolate the problem and give better insight into what’s causing it.

    Looking forward to your response. 🙂

    Plugin Support Kay U a11n

    (@kingsleyinfo)

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – we’ll be here if and/or when you are ready to continue.

    If you have a few minutes, we’d love if you could leave us a review: https://ww.wp.xz.cn/support/plugin/woocommerce/reviews/

    Thread Starter etellwright

    (@etellwright)

    Hi,

    Thanks. It turned out that there was an issue with the redirect even though it was set up correctly. That is now solved. There is also an issue with the caching and LiteSpeed are looking into it for me.

    Emily

    Zee

    (@doublezed2)

    Hello etellwright,

    Thank you for your reply.

    I am glad to know that you have resolved the issue. I appreciate you for sharing the details here.

    If you feel that WooCommerce has been beneficial to your business, we would be truly grateful if you could take a few moments to leave a review. Your feedback not only supports our continuous improvement but also helps others make informed decisions about using WooCommerce.

    Have a great day!

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Cart not working’ is closed to new replies.