1 Commits

Author SHA1 Message Date
Cooper Dalrymple
7d6c38f86c Initial attempt 2026-02-02 09:39:37 -06:00
2 changed files with 34 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
<?php
/**
* @package ogre-suspension
* @author cleverogre
* @version 1.0.0
* @since 1.0.0
*/
namespace Ogre\Suspension\Integration;
use Ogre\Singleton;
use Ogre\Suspension as Plugin;
defined('ABSPATH') || exit;
final class WPRocket {
use Singleton;
protected function __construct() {
add_filter('do_rocket_generate_caching_files', '__return_false');
register_activation_hook(Plugin::get_file(), [$this, 'clean_cache']);
}
public function clean_cache() {
if (!function_exists('rocket_clean_domain')) return false;
// Purge entire WP Rocket cache
rocket_clean_domain();
}
}
WPRocket::instance();

View File

@@ -26,6 +26,7 @@ final class Suspension extends Plugin {
'inc/class-redirect.php', 'inc/class-redirect.php',
'inc/class-admin.php', 'inc/class-admin.php',
'inc/class-template.php', 'inc/class-template.php',
'inc/integrations/class-wp-rocket.php',
]); ]);
} }