Wishlist Ajax not working when WP Rocket is active

This topic has 4 replies, 2 voices, and was last updated 4 months ago ago by MAHDAR

  • Avatar: mahdar
    MAHDAR
    Participant
    August 13, 2025 at 01:19

    Hello,

    On our site, when WP Rocket is active, the “Add to Wishlist” button in the XStore theme only works after a full page reload — the Ajax functionality does not trigger.

    We have already added the cookies xstore_wishlist_ids and xstore_wishlist_ids_0 to Never Cache Cookies, but the issue still persists. When loading the product page with the ?nowprocket=1 parameter (which disables WP Rocket), the Ajax wishlist works perfectly.

    It seems the problem might be related to WP Rocket’s JavaScript optimizations (Delay/Defer/Minify JS). Could you please confirm the exact script file paths or handles related to the Wishlist feature (e.g., xstore-wishlist.js or relevant files inside the et-core-plugin) so we can exclude them from WP Rocket’s JavaScript optimization settings?

    Thank you for your assistance.

    Please, contact administrator
    for this information.
    3 Answers
    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    August 13, 2025 at 09:05

    Hello @MAHDAR,

    We hope this message finds you well.

    To help identify the cause of the issue, we kindly suggest disabling the relevant options in the WP Rocket plugin—such as delay, defer, minify, etc.—to determine which specific setting may be responsible.

    If you would like to exclude the script file from optimization, please add the following URL to the exclusion list:

    https://yourwebsite.com/wp-content/plugins/et-core-plugin/packages/xstore-wishlist/assets/js/script.min.js

    Additionally, if the issue persists after trying the above steps, you may consider adding the following code snippet to your child theme’s functions.php file:

    add_filter('xstore_wishlist_mini_content_ajax', '__return_true');

    Please let us know if you need any further assistance.

    Best regards,
    Jack Richardson
    The 8Theme Team

    Please contact administrator
    for this information.
    Avatar: mahdar
    MAHDAR
    Participant
    August 14, 2025 at 12:03

    Thank you for your guidance.

    I tried it, but it didn’t work.

    I’ve given you admin access in case you can check.

    Thanks.

    Please contact administrator
    for this information.
    Files is visible for topic creator and
    support staff only.
    Avatar: mahdar
    MAHDAR
    Participant
    August 15, 2025 at 00:52

    Thanks for the support! My topic “Wishlist Ajax not working when WP Rocket is active” has been successfully resolved.

  • Viewing 4 results - 1 through 4 (of 4 total)

The issue related to '‘Wishlist Ajax not working when WP Rocket is active’' has been successfully resolved, and the topic is now closed for further responses

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.