} public function initCapabilities(): void { $this->tier = $this->getTier(); $isPremiumKeyValid = $this->servicesChecker->isPremiumKeyValid(false); $this->isKeyValid = $isPremiumKeyValid || $this->servicesChecker->isMailPoetAPIKeyValid(false); $automationSteps = $this->getAutomationStepsLimit(); $segmentFilters = $this->getSegmentFiltersLimit(); $this->capabilities = [ 'mailpoetLogoInEmails' => new Capability('mailpoetLogoInEmails', Capability::TYPE_BOOLEAN, $this->isMailpoetLogoInEmailsRequired()), 'detailedAnalytics' => new Capability('detailedAnalytics', Capability::TYPE_BOOLEAN, !$this->isDetailedAnalyticsEnabled()), 'automationSteps' => new Capability('automationSteps', Capability::TYPE_NUMBER, $automationSteps > 0, $automationSteps), 'segmentFilters' => new Capability('segmentFilters', Capability::TYPE_NUMBER, $segmentFilters > 0, $segmentFilters), ]; } /** @return array */ public function getCapabilities(): array { if ($this->capabilities === null) { $this->initCapabilities(); } return $this->capabilities ?? []; } public function getCapability(string $name): ?Capability { return $this->getCapabilities()[$name] ?? null; } /** * Returns true if there is no valid premium key or the product tier can be upgraded */ public function showUpgradePage(): bool { $tier = $this->getTier(); if (!$this->subscribersFeature->hasValidPremiumKey() || (isset($tier) && $tier < self::MIN_TIER_NO_UPGRADE_PAGE)) { return true; } return false; } /** * Returns true if there is a valid key for a tier that can be upgraded * @todo remove after the a/b test is finished and keep only one page */ public function showNewUpgradePage(): bool { $tier = $this->getTier(); $isKeyValid = $this->subscribersFeature->hasValidPremiumKey() || $this->servicesChecker->isMailPoetAPIKeyValid(false); if ($isKeyValid && isset($tier) && $tier < self::MIN_TIER_NO_UPGRADE_PAGE) { return true; } return false; } }
Fatal error: Uncaught Error: Class "MailPoet\Util\License\Features\CapabilitiesManager" not found in /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php:5502 Stack trace: #0 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(4031): MailPoetGenerated\FreeCachedContainer->getCapabilitiesManagerService() #1 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(5088): MailPoetGenerated\FreeCachedContainer->getRenderer6Service() #2 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(5098): MailPoetGenerated\FreeCachedContainer->getConfirmationEmailCustomizerService() #3 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(5198): MailPoetGenerated\FreeCachedContainer->getConfirmationEmailMailerService() #4 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(5368): MailPoetGenerated\FreeCachedContainer->getSubscriberActionsService() #5 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(2612): MailPoetGenerated\FreeCachedContainer->getCommentService() #6 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(2640): MailPoetGenerated\FreeCachedContainer->getHooks2Service() #7 /htdocs/wp-content/plugins/mailpoet/vendor-prefixed/symfony/dependency-injection/Container.php(122): MailPoetGenerated\FreeCachedContainer->getInitializerService() #8 /htdocs/wp-content/plugins/mailpoet/vendor-prefixed/symfony/dependency-injection/Container.php(110): MailPoetVendor\Symfony\Component\DependencyInjection\Container->make('MailPoet\\Config...', 1) #9 /htdocs/wp-content/plugins/mailpoet/lib/DI/ContainerWrapper.php(39): MailPoetVendor\Symfony\Component\DependencyInjection\Container->get('MailPoet\\Config...') #10 /htdocs/wp-content/plugins/mailpoet/mailpoet_initializer.php(89): MailPoet\DI\ContainerWrapper->get('MailPoet\\Config...') #11 /htdocs/wp-content/plugins/mailpoet/mailpoet.php(194): require_once('/htdocs/wp-cont...') #12 /htdocs/wp-settings.php(526): include_once('/htdocs/wp-cont...') #13 /htdocs/wp-config.php(85): require_once('/htdocs/wp-sett...') #14 /htdocs/wp-load.php(50): require_once('/htdocs/wp-conf...') #15 /htdocs/wp-blog-header.php(13): require_once('/htdocs/wp-load...') #16 /htdocs/index.php(17): require('/htdocs/wp-blog...') #17 {main} thrown in /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php on line 5502