Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Tiny plugin to enable State cache to Wp Rocket + GeotargetingWP
* Plugin Name: Wp Rocket + GeotargetingWP States
* Plugin URI:
* Description: Enable states cache for WPRocket.
* Author: timersys
* Author URI:
* By default WpRocket plugin will create different cache pages at a country level
* To add more levels (states or cities) you need to add the following filter
add_filter('rocket_geotargetingwp_enabled_cookies', function($enable){
$enable[] = 'state';
//$enable[] = 'city';
return $enable;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment