I rarely want to clear the cache after toggling a plugin. But I always want to hide this message.
Are you tired of seeing the WP Rocket WordPress admin notice “One or more plugins have been enabled or disabled, clear the cache if they affect the front end of your site.” message?
Add this PHP code to your site
// Remove the hook that displays the "clear cache" message.
add_action( 'admin_notices', function() {
remove_action( 'admin_notices', 'rocket_warning_plugin_modification' );
}, 1 );
Not sure how to add the code? Use the great Code Snippets plugin.