Check if the user has an activate, non-expired license on current plugin's install.

@since 1.0.9

@return bool
437732
function is_paying() {
            $this->_logger->entrance();

            if ( ! $this->is_registered() ) {
                return false;
            }

            if ( ! $this->has_paid_plan() ) {
                return false;
            }

            return (
                ! $this->is_trial() &&
                'free' !== $this->get_plan_name() &&
                $this->has_active_valid_license()
            );
        }
1244539
public function isEnabledPrivateSales()
    {
        if ($this->_blEnabledPrivateSales === null) {
            $this->_blEnabledPrivateSales = (bool) \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('blPsLoginEnabled');
            if ($this->_blEnabledPrivateSales && ($canPreview = \OxidEsales\Eshop\Core\Registry::getUtils()->canPreview()) !== null) {
                $this->_blEnabledPrivateSales = !$canPreview;
            }
        }

        return $this->_blEnabledPrivateSales;
    }
698298
public function isCredentialsNonExpired()
    {
        if (true === $this->credentialsExpired) {
            return false;
        }

        if (null !== $this->credentialsExpireAt && $this->credentialsExpireAt->getTimestamp() < time()) {
            return false;
        }

        return true;
    }
373202
public function isAuthenticated()
    {
        if (!$this->session->has('usr_id')) {
            return false;
        }

        if ($this->session->has('session_id')) {
            if (null !== $this->app['repo.sessions']->find($this->session->get('session_id'))) {
                return true;
            }
        }

        $this->session->invalidate();
        $this->reinitUser();

        return false;
    }
973180
public function verify()
    {
        // Check if time is expired
        $time = $this->request->getQuery('timestamp');
        if ($this->expireTime && time() - $time > $this->expireTime) {
            return false;
        }

        // Remove signature parameters
        $query = $this->request->getParameterReference('get');
        $token = $this->request->getQuery('signature');
        unset($query['signature']);

        $timestamp = $query['timestamp'];

        $query = $this->filterKeys($query, $this->params);

        $query['timestamp'] = $timestamp;

        return $this->generateToken($query) == $token;
    }
598211
protected function isAllowed()
    {
        /** @var  \Arcanesoft\Contracts\Auth\Models\User  $user */
        if (is_null($user = auth()->user()))
            return false;

        return $user->isAdmin() || $user->isModerator();
    }
855221
private static function is_active_valid_license( $license ) {
            return (
                is_object( $license ) &&
                FS_Plugin_License::is_valid_id( $license->id ) &&
                $license->is_active() &&
                $license->is_valid()
            );
        }
788230
public function getRemote_version()
	{
		$params = array(
			'body' => array(
				'action' => 'version',
				'license_user' => $this->license_user,
				'license_key' => $this->license_key,
			),
		);
		$request = wp_remote_post ($this->update_path, $params );
		if ( !is_wp_error( $request ) || wp_remote_retrieve_response_code( $request ) === 200 ) {
			return unserialize( $request['body'] );
		}
		return false;
	}
960160
public function isExpired()
    {
        if (null === $this->expiresAt) {
            return false;
        }

        $now = new \DateTime();

        return $this->expiresAt < $now;
    }
935834
protected function isAcceptable()
    {
        $manifest = $this->getManifest();

        $res = $this->checkPackageType();

        //check php version
        if (isset($manifest['php'])) {
            $res &= $this->checkVersions($manifest['php'], System::getPhpVersion(), 'Your PHP version does not support this installation package.');
        }

        //check acceptableVersions
        if (isset($manifest['acceptableVersions'])) {
            $res &= $this->checkVersions($manifest['acceptableVersions'], $this->getConfig()->get('version'), 'Your EspoCRM version doesn\'t match for this installation package.');
        }

        //check dependencies
        if (!empty($manifest['dependencies'])) {
            $res &= $this->checkDependencies($manifest['dependencies']);
        }

        return (bool) $res;
    }
202177
public function canUpdate()
    {
        return $this->canModify() && (
            $this->canInstall() || (
                ! empty( $this->installedVersion ) && (
                    ( ( $this->availableVersion == 'dev-master' ||
                        $this->installedVersion == 'dev-master' ) &&
                      $this->installedReference != $this->availableReference ) ||
                    version_compare(
                        $this->availableVersion,
                        $this->installedVersion,
                        '>'
                    )
                )
            )
        );
    }
588374
private function get_license_ids_associated_with_installs() {
            if ( ! $this->_is_network_active ) {
                if ( ! is_object( $this->_site ) ||
                     ! FS_Plugin_License::is_valid_id( $this->_site->license_id )
                ) {
                    return array();
                }

                return array( $this->_site->license_id );
            }

            $license_ids = array();
            $sites       = self::get_sites();
            foreach ( $sites as $site ) {
                $blog_id = self::get_site_blog_id( $site );
                $install = $this->get_install_by_blog_id( $blog_id );

                if ( ! is_object( $install ) ||
                     ! FS_Plugin_License::is_valid_id( $install->license_id )
                ) {
                    continue;
                }

                $license_ids[ $install->license_id ] = true;
            }

            return array_keys( $license_ids );
        }
875819
public function isExpired()
    {
        if (is_object($this->ExpireAtDate)) {
            $this->ExpireAtDate = $this->ExpireAtDate->Value;
        }

        $expired = false;

        if (!empty($this->ExpireAtDate)) {
            if (SS_Datetime::now()->Value >= $this->ExpireAtDate) {
                $expired = true;
            }
        }

        return $expired;
    }
537124
public static function checkBrowserIceCat()
    {
        if (stripos(self::$userAgentString, 'Mozilla') !== false &&
            preg_match('/IceCat\/([^ ]*)/i', self::$userAgentString, $matches)
        ) {
            if (isset($matches[1])) {
                self::$browser->setVersion($matches[1]);
            }
            self::$browser->setName(Browser::ICECAT);

            return true;
        }

        return false;
    }
645889
public function isAccessTokenExpired()
  {
    if (!$this->token || !isset($this->token['created'])) {
      return true;
    }

    // If the token is set to expire in the next 30 seconds.
    $expired = ($this->token['created']
        + ($this->token['expires_in'] - 30)) < time();

    return $expired;
  }
134238
public static function is_plugin() {
		$is_plugin = false;
		if ( ! function_exists( 'get_plugins' ) ) {
			require_once ABSPATH . 'wp-admin/includes/plugin.php'; // phpcs:ignore WPThemeReview.CoreFunctionality.FileInclude
		}

		// Get all plugins.
		$plugins = get_plugins();
		$_plugin = '';
		foreach ( $plugins as $plugin => $args ) {
			if ( ! $is_plugin && isset( $args['Name'] ) && ( 'Kirki' === $args['Name'] || 'Kirki Toolkit' === $args['Name'] ) ) {
				$is_plugin = true;
				$_plugin   = $plugin;
			}
		}

		// No need to proceed any further if Kirki wasn't found in the list of plugins.
		if ( ! $is_plugin ) {
			return false;
		}

		// Make sure the is_plugins_loaded function is loaded.
		include_once ABSPATH . 'wp-admin/includes/plugin.php'; // phpcs:ignore WPThemeReview.CoreFunctionality.FileInclude

		// Extra logic in case the plugin is installed but not activated.
		if ( $_plugin && is_plugin_inactive( $_plugin ) ) {
			return false;
		}
		return $is_plugin;
	}
583259
public function isExpired()
    {
        $this->validatePrepared();

        if (!$this->sessionBag->has(self::CSRF_TKN_TIME)) {
            return true;
        } else {
            $age = time() - $this->sessionBag->get(self::CSRF_TKN_TIME);
            return $age >= $this->ttl;
        }
    }