Making WP Rocket work with WooCommerce recently viewed products widget

The  WooCommerce Recently Viewed Products widget displays a list of the products a visitor/customer previously viewed on your shop.

With the default WP Rocket settings, the list will be cached during the first visit, and the same will be shown to all visitors, rendering the widget useless and even returning wrong results.

Just install and activate this helper plugin and you'll be able to use the widget with caching without any issue:

📥  Download (.zip): WP Rocket | YITH WooCommerce Recently Viewed Products Integration
Developers: You can find the code for this plugin on GitHub.

Heads up! Remember to disable User cache in WP Rocket when using the Recently Viewed Products plugin. For logged in users, the dynamic cookie used by the plugin is appended with the user id of the current user. For example, if the user id is 10, the cookie name will be: yith_wrvp_list_10
Since this new cookie isn't mentioned in the exclude list for WP Rocket, the recent product list will still be cached.