public function uninstall() { $wpfc = new WpFastestCache(); $wpfc->deactivate(); // wp_clear_scheduled_hook("wp_fastest_cache"); // wp_clear_scheduled_hook("wp_fastest_cache_regular"); delete_option("WpFastestCache"); delete_option("WpFcDeleteCacheLogs"); delete_option("WpFastestCacheCDN"); delete_option("WpFastestCacheExclude"); delete_option("WpFastestCachePreLoad"); delete_option("WpFastestCacheCSS"); delete_option("WpFastestCacheCSSSIZE"); delete_option("WpFastestCacheJS"); delete_option("WpFastestCacheJSSIZE"); foreach ((array) _get_cron_array() as $cron_key => $cron_value) { foreach ((array) $cron_value as $hook => $events) { if (preg_match("/^wp\\_fastest\\_cache/", $hook)) { $args = array(); foreach ((array) $events as $event_key => $event) { if (isset($event["args"]) && isset($event["args"][0])) { $args = array(json_encode(json_decode($event["args"][0]))); } } wp_clear_scheduled_hook($hook, $args); } } } }