<?php
/**
 * @package GocarsOnline
 */

class GocarsOnlineDeactivate {
    
    public static function deactivate() {
        // Unschedule the cron event
        $timestamp = wp_next_scheduled('gocars_update_cron_event');
        if ($timestamp) {
            wp_unschedule_event($timestamp, 'gocars_update_cron_event');
        }

        // Flush rewrite rules
        flush_rewrite_rules();

        delete_transient('gocars_allowed_domains_cache');

    }

}
