Home › Forums › WoodMart support forum › WC ajax‑poc massively slowing page load
WC ajax‑poc massively slowing page load
- This topic has 1 reply, 2 voices, and was last updated 1 week, 4 days ago by
Artem Temos.
-
AuthorPosts
-
July 11, 2025 at 10:42 pm #673529
[email protected]ParticipantHello XTemos team and community,
I’m running WoodMart (v9.9.5) with WP Rocket on a WooCommerce site, and I’ve identified two AJAX fetches that are blocking my Largest Contentful Paint by nearly 10 seconds combined. They fire on every page load—even on the homepage—before any of my images or other resources, severely degrading performance.
What I’m seeing in Chrome DevTools Network
Name Time Initiator Description
ajax‑poc‑data‑client‑id ~6.00 s button.js?ver=… Fetches a client/session ID for analytics
ajax‑poc‑simulate‑cart ~3.52 s button.js?ver=… Simulates current cart state for mini‑cartThese both originate from button.js (v1752255179‑2), which appears to be part of WoodMart’s “Add to Cart” functionality or a bundled PPC script.
What I’ve tried so far
WP Rocket “Disable WooCommerce Cart Fragments” toggle (✅ cart‑fragments are now gone on non‑cart pages).Custom PHP snippet to dequeue wc-cart-fragments on all but Cart/Checkout.
JS snippet to refresh only the mini‑cart badge/UI on add‑to‑cart events.
Everything works—my cart UI, compare buttons, off‑canvas cart, header icon all update correctly—but these two AJAX calls remain and continue to block page rendering.
My questions
What exactly loads button.js on non‑cart pages? Is this part of WoodMart core, or perhaps one of the bundled “PayPal Buttons” / PPC modules?How can I disable or defer these two AJAX endpoints (ajax‑poc‑data‑client‑id & ajax‑poc‑simulate‑cart) on all pages except Cart/Checkout, without breaking the mini‑cart or dynamic pricing features?
Is there a recommended WoodMart filter or hook that controls these endpoints or the loading of button.js so I can scope it appropriately?
Any pointers, code snippets, or best practices would be hugely appreciated. Thank you in advance!
July 14, 2025 at 11:28 am #673761
Artem TemosKeymasterHello,
Thank you for reaching out with your concerns and providing detailed information about the issue. It’s essential to optimize the performance of your site, and I understand the AJAX fetches are causing you difficulties.
Firstly, to clarify, there is no file called
button.js
in our WoodMart theme’s default installation. It seems this file may be coming from a third-party plugin or custom script. Could you please provide the exact path to this file for further investigation?To address the issue with the AJAX calls, you may want to identify all the scripts enqueued on your site to see where
button.js
is being included. Using tools such as the Chrome DevTools or similar WordPress plugins that list enqueued scripts could be beneficial in this situation.Let us know if you have further questions or need additional assistance.
Regards
-
AuthorPosts
- You must be logged in to create new topics. Login / Register