public static function hasPurchasedLicense() { if (self::$hasPurchasedLicense !== null) { return self::$hasPurchasedLicense; } if (!(ModuleManager::isModuleInstalled('bitrix24') && Loader::includeModule('bitrix24')) && method_exists('CBitrix24', 'IsLicensePaid')) { return self::$hasPurchasedLicense = false; } return self::$hasPurchasedLicense = \CBitrix24::IsLicensePaid(); }