self::TIMEOUT, 'redirection' => 0, 'limit_response_size' => self::MAX_RESPONSE_BYTES, 'headers' => array( 'Content-Type' => 'application/json', 'Accept' => 'application/json', ), 'body' => wp_json_encode( array( 'site_key' => AgentMySite_Options::get_site_key() ) ), ) ); } /** * Remove any scheduled ping and the debounce marker (disconnect, uninstall). */ public static function clear_scheduled(): void { wp_clear_scheduled_hook( self::CRON_HOOK ); delete_transient( self::DEBOUNCE_TRANSIENT ); } /** * Whether pings make sense: connected, with a registered catalog. */ private static function is_active(): bool { return AgentMySite_Options::is_connected() && AgentMySite_Options::is_catalog_active(); } }