Hello, I noticed that the recently viewed products widget is not compatible with page caching plugins like WPRocket, despite what your documentation says.
The problem is that the woodmart_recently_viewed_products
cookie is set only during PHP load, and not through JS. So, when a page is already cached and is fetched from page cache, then the cookie is not getting updated. You have to visit a non-cached product page to see this product in your recently viewed section, but this will work only for the first visitor. All following visitors will load the cached version and the problem will appear again. Essentially this widget actually works fine for very very few users.
I found a similar topic ( https://xtemos.com/forums/topic/recently-viewed-work-only-on-adminpage-when-connected/ ) with the same problem and you posted a JS snippet that maybe solves the issue. But can you include the fix in the default woodmart recently viewed products JS file, so that we don’t have to include the snippet in every installation? Plus, this JS snippet should be loaded only in pages where this widget exists like its JS file, and not in all pages like Custom JS setting.
Thank you
-
This topic was modified 9 months, 1 week ago by dimmisel.