/** * Test API connectivity. * * @since 1.0.9 If fails, try to fallback to HTTP. * * @param null|string $unique_anonymous_id * * @return bool True if successful connectivity to the API. */ function test($unique_anonymous_id = null) { $this->_logger->entrance(); $test = is_null($unique_anonymous_id) ? $this->_api->Test() : $this->_api->Test($this->_call('ping.json?uid=' . $unique_anonymous_id)); if (false === $test && $this->_api->IsHttps()) { // Fallback to HTTP, since HTTPS fails. $this->_api->SetHttp(); self::$_options->set_option('api_force_http', true, true); $test = $this->_api->Test(); } return $test; }
/** * Test API connectivity. * * @since 1.0.9 If fails, try to fallback to HTTP. * * @return bool True if successful connectivity to the API. */ function test() { $this->_logger->entrance(); $test = $this->_api->Test(); if (false === $test && $this->_api->IsHttps()) { // Fallback to HTTP, since HTTPS fails. $this->_api->SetHttp(); self::$_options->set_option('api_force_http', true, true); $test = $this->_api->Test(); } return $test; }
/** * Check if valid ping request result. * * @author Vova Feldman (@svovaf) * @since 1.1.1 * * @param mixed $pong * * @return bool */ function is_valid_ping($pong) { return $this->_api->Test($pong); }
/** * Check if valid ping request result. * * @author Vova Feldman (@svovaf) * @since 1.1.1 * * @param mixed $pong * * @return bool */ function is_valid_ping($pong) { return Freemius_Api::Test($pong); }