We have a custom compatibility with Age Verify plugin here: https://github.com/wp-media/wp-rocket/blob/master/inc/3rd-party/plugins/age-verify.php
During a test, David and I noticed that this is no longer needed because the plugin by itself adds DONOTCACHEPAGE until age is verified - https://plugins.trac.wordpress.org/browser/age-verify/trunk/includes/class-age-verify.php#L233
Video - https://youtu.be/PaOm9I3wXKM
Steps:
age-verified as a mandatory cooking in WP Rocket's config file@Tabrisrp I tried grooming this one, however I think we still need to keep the filter to deactivate mod_rewrite rules.
My concern in here is if there are already cache files and mod_rewrite is enabled and our rules are in htaccess, then the cached files will be served even if DONOTCACHEPAGE is set to true.
What do you think? I am missing something in here?
We can purge the whole cache on the plugin update including the change to prevent that possible issue. I believe that would be enough?
@crystinutzaa Good point. Hmm.
I am not sure I follow what @Tabrisrp said. Even if we clear the cache once and the rewrite rules exist, a different visitor will be served the cache version, right?
Makes me wonder, should we keep supporting a plugin that has just 3000 users and hasn't been updated in 4 years? The plugin still works, so maybe we should? @GeekPress what are your thoughts on that?
@Tabrisrp as @arunbasillal said, even if we clean the cache , the rewrite rules exists in htaccess, so a different visitor will get the served cached version.
I think if we will keep the htaccess disabled + cleaning the cache of WP Rocket will do the trick. What do you think?
Indeed. And move it to the new architecture at the same time
Reproduce the issue ✅
Identified the issue on my localhost.
Identify the root cause ✅
During a test, David and Arun noticed that this is no longer needed because the plugin by itself adds DONOTCACHEPAGE until age is verified - https://plugins.trac.wordpress.org/browser/age-verify/trunk/includes/class-age-verify.php#L233
Scope a solution ✅
The solution is to move the file to the new structure into /inc/ThirdParty/Plugins/AgeVerify.php
The filter for disabling htaccess must be kept:
add_filter( 'rocket_htaccess_mod_rewrite', '__return_false', 18 );
Also on plugin activation, Rocket Cache must be cleaned using rocket_clean_domain(); and also flushing the htaccess rules flush_rocket_htaccess();
At plugin deactivation we need to flush_rocket_htaccess();
Effort ✅
Effort [S] , I think Unit & Integration tests will need almost all the effort
Makes me wonder, should we keep supporting a plugin that has just 3000 users and hasn't been updated in 4 years? The plugin still works, so maybe we should? @GeekPress what are your thoughts on that?
@arunbasillal Indeed, it's into our interest to maintain the compatibility with an outdated and abandoned plugin. It's also not safe for users to keep on their websites a plugin in this situation.
If an actual user is using it, we will suggest to use another one like: https://wordpress.org/plugins/age-gate/
@hellofromtonya @webtrainingwheels Can we totally remove the compatibility with this plugin and put it into our incompatibility plugins list?
I agree.
For each 3rd party we are compatible with, that's extra code inside of Rocket that we must maintain (test, upgrade, validate, etc.). When a 3rd party is badly out-of-date and potentially abandoned, it's a good strategy to consider removing this extra code.
For this specific case, I agree that we should remove the code and recommend a different approach/plugin for our customers who may be using the old one.
Thanks @hellofromtonya for your feedback.
As we are all agree, let's removed the compatibility with this outdated plugin.
@crystinutzaa I guess the effort / scope a solution needs to be redo per our final decision to totally remove the compatibility
inc/3rd-party/plugins/age-verify.phprequire for this file in inc/3rd-party/3rd-party.phpEffort [XS]
Per @arunbasillal's request, I'm adding here my experience with the Age Gate plugin.
It is compatible with WP Rocket, as long as the following setting is enabled:

Most helpful comment
@arunbasillal Indeed, it's into our interest to maintain the compatibility with an outdated and abandoned plugin. It's also not safe for users to keep on their websites a plugin in this situation.
If an actual user is using it, we will suggest to use another one like: https://wordpress.org/plugins/age-gate/
@hellofromtonya @webtrainingwheels Can we totally remove the compatibility with this plugin and put it into our incompatibility plugins list?