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);
}
}