false) so an offline site never // hangs on deactivation; the server's own expiry is the backstop. This is // deliberately NOT done in uninstall.php, which may run offline. if ( class_exists( 'Kasp_Settings' ) && Kasp_Settings::is_connected() && Kasp_Api_Client::is_secure_base( kasp_api_url() ) ) { $token = Kasp_Settings::get_token(); if ( '' !== $token ) { wp_remote_request( kasp_api_url() . '/api/integrations/wordpress/token', array( 'method' => 'DELETE', 'timeout' => 5, 'blocking' => false, 'headers' => array( 'Accept' => 'application/json', 'Authorization' => 'Bearer ' . $token, ), 'user-agent' => 'kasp-wordpress/' . KASP_VERSION . '; ' . home_url( '/' ), ) ); } } delete_transient( Kasp_Connect::state_transient_key() ); delete_transient( Kasp_Sync::MAP_RECONCILE_TRANSIENT ); } register_deactivation_hook( __FILE__, 'kasp_deactivate' );