public function hasValidApiKey(): bool { $mssState = $this->settings->get(self::MSS_KEY_STATE); $premiumState = $this->settings->get(self::PREMIUM_KEY_STATE); return $this->hasValidMssKey() || $this->hasValidPremiumKey() || $mssState === Bridge::KEY_VALID_UNDERPRIVILEGED || $premiumState === Bridge::KEY_VALID_UNDERPRIVILEGED; } public function getSubscribersLimit() { if (!$this->hasValidApiKey()) { return $this->getFreeSubscribersLimit(); } $mssState = $this->settings->get(self::MSS_KEY_STATE); if (($this->hasValidMssKey() || $mssState === Bridge::KEY_VALID_UNDERPRIVILEGED) && $this->hasMssSubscribersLimit()) { return $this->getMssSubscribersLimit(); } $premiumState = $this->settings->get(self::PREMIUM_KEY_STATE); if (($this->hasValidPremiumKey() || $premiumState === Bridge::KEY_VALID_UNDERPRIVILEGED) && $this->hasPremiumSubscribersLimit()) { return $this->getPremiumSubscribersLimit(); } return false; } public function getEmailVolumeLimit(): int { return (int)$this->settings->get(self::MSS_EMAIL_VOLUME_LIMIT_SETTING_KEY); } public function getEmailsSent(): int { return (int)$this->settings->get(self::MSS_EMAILS_SENT_SETTING_KEY); } public function hasValidMssKey() { $state = $this->settings->get(self::MSS_KEY_STATE); return $state === Bridge::KEY_VALID || $state === Bridge::KEY_EXPIRING; } private function hasMssSubscribersLimit() { return !empty($this->settings->get(self::MSS_SUBSCRIBERS_LIMIT_SETTING_KEY)); } private function getMssSubscribersLimit() { return (int)$this->settings->get(self::MSS_SUBSCRIBERS_LIMIT_SETTING_KEY); } public function hasMssPremiumSupport() { return $this->hasValidMssKey() && $this->settings->get(self::MSS_SUPPORT_SETTING_KEY) === 'premium'; } public function hasValidPremiumKey() { $state = $this->settings->get(self::PREMIUM_KEY_STATE); return $state === Bridge::KEY_VALID || $state === Bridge::KEY_EXPIRING; } private function hasPremiumSubscribersLimit() { return !empty($this->settings->get(self::PREMIUM_SUBSCRIBERS_LIMIT_SETTING_KEY)); } private function getPremiumSubscribersLimit() { return (int)$this->settings->get(self::PREMIUM_SUBSCRIBERS_LIMIT_SETTING_KEY); } public function hasPremiumSupport() { return $this->hasValidPremiumKey() && $this->settings->get(self::PREMIUM_SUPPORT_SETTING_KEY) === 'premium'; } private function getFreeSubscribersLimit() { $installationTime = strtotime((string)$this->settings->get('installed_at')); $oldUser = $installationTime < strtotime(self::NEW_LIMIT_DATE); return $oldUser ? self::SUBSCRIBERS_OLD_LIMIT : self::SUBSCRIBERS_NEW_LIMIT; } }
Fatal error: Uncaught Error: Class "MailPoet\Util\License\Features\Subscribers" not found in /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php:5512 Stack trace: #0 /htdocs/wp-content/plugins/mailpoet/vendor-prefixed/symfony/dependency-injection/Container.php(122): MailPoetGenerated\FreeCachedContainer->getSubscribers4Service() #1 /htdocs/wp-content/plugins/mailpoet/vendor-prefixed/symfony/dependency-injection/Container.php(110): MailPoetVendor\Symfony\Component\DependencyInjection\Container->make('MailPoet\\Util\\L...', 1) #2 /htdocs/wp-content/plugins/mailpoet/lib/DI/ContainerWrapper.php(39): MailPoetVendor\Symfony\Component\DependencyInjection\Container->get('MailPoet\\Util\\L...') #3 /htdocs/wp-content/plugins/mailpoet/lib/Config/ServicesChecker.php(27): MailPoet\DI\ContainerWrapper->get('MailPoet\\Util\\L...') #4 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(5502): MailPoet\Config\ServicesChecker->__construct() #5 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(4031): MailPoetGenerated\FreeCachedContainer->getCapabilitiesManagerService() #6 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(5088): MailPoetGenerated\FreeCachedContainer->getRenderer6Service() #7 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(5098): MailPoetGenerated\FreeCachedContainer->getConfirmationEmailCustomizerService() #8 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(5198): MailPoetGenerated\FreeCachedContainer->getConfirmationEmailMailerService() #9 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(5368): MailPoetGenerated\FreeCachedContainer->getSubscriberActionsService() #10 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(2612): MailPoetGenerated\FreeCachedContainer->getCommentService() #11 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(2640): MailPoetGenerated\FreeCachedContainer->getHooks2Service() #12 /htdocs/wp-content/plugins/mailpoet/vendor-prefixed/symfony/dependency-injection/Container.php(122): MailPoetGenerated\FreeCachedContainer->getInitializerService() #13 /htdocs/wp-content/plugins/mailpoet/vendor-prefixed/symfony/dependency-injection/Container.php(110): MailPoetVendor\Symfony\Component\DependencyInjection\Container->make('MailPoet\\Config...', 1) #14 /htdocs/wp-content/plugins/mailpoet/lib/DI/ContainerWrapper.php(39): MailPoetVendor\Symfony\Component\DependencyInjection\Container->get('MailPoet\\Config...') #15 /htdocs/wp-content/plugins/mailpoet/mailpoet_initializer.php(89): MailPoet\DI\ContainerWrapper->get('MailPoet\\Config...') #16 /htdocs/wp-content/plugins/mailpoet/mailpoet.php(194): require_once('/htdocs/wp-cont...') #17 /htdocs/wp-settings.php(526): include_once('/htdocs/wp-cont...') #18 /htdocs/wp-config.php(85): require_once('/htdocs/wp-sett...') #19 /htdocs/wp-load.php(50): require_once('/htdocs/wp-conf...') #20 /htdocs/wp-blog-header.php(13): require_once('/htdocs/wp-load...') #21 /htdocs/index.php(17): require('/htdocs/wp-blog...') #22 {main} thrown in /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php on line 5512