APO Wordpress Incorrect Cart Items

Hi Cloudflare Community,

I wonder if any of you have tried using APO with the Easy Digital Download plugin?

I activated APO on my Wordpress/EDD website yesterday and there was a significant boost in performance on Desktop (not so much on mobile for some reason) Anyhow, today I noticed that the Cart / Checkout process on my website is acting up. Most of the time products won’t be added to the cart or the cart won’t update or you’ll find a random product added to the cart. I confirmed that APO is causing the issue by disabling it and everything went back to normal.

I’m using the Easy Digital Download plugin with a few of its addons, I’m on a Litespeed server with the LiteSpeed Cache plugin enabled, I also have AutoOptimize plugin installed.

I tried bypassing the cache for website.com/checkout to no avail.

Any help will be much appreciated

Thank you,
Thaer

Hi Thaer.

We rely on WordPress specific cookies to bypass caching:
“wp-", "wordpress”, “comment_", "woocommerce_”.
Seems like EDD relies on their own cookies to work with cart items, so the cart page get cached.

Unfortunately there is no way to specify to bypass APO caching on specific parts of the site. We may consider adding this functionality in the future through Cloudflare Custom Page Rules.

Let us know if this is something you may consider using for solving cart issue on your site.

2 Likes

Definitely needed as some folks even change the Wordpress default cookies as well as add other cookies so need for a way for users to pass on additional cookies to APO caching CF Worker etc. Easiest way would be to add an option in Wordpress plugin for a field to specify a list of additional cookies for inclusion and/or exclusion in CF caching. Might as well add a field for URL path inclusions and/or exclusions too :slight_smile:

2 Likes

Hi Yevgen,

Thank you for your prompt reply.

The suggested functionality would definitely solve the problem. Hopefully it will be implemented very soon. Because the increase in performance is too much to pass up.

Also, maybe configuring APO for popular Wordpress plugins (Just like APO does with wooCommerce).
or at least allowing APO to be configured for popular plugins will be a great solution too.

Regards,
Thaer

Great suggestion. I second this. I hope CloudFlare pushes out an update very soon.

We deployed a change so all requests with edd_* cookies will bypass caching. Please Purge Cache before enabling APO again. It should solve compatibility issue with EDD plugin.

4 Likes

Great news!! Thank you

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.