turn $this->wp->numberFormatI18n( $this->subscribersRepository->countBy(['status' => SubscriberEntity::STATUS_SUBSCRIBED, 'deletedAt' => null]) ); } else { return $this->wp->numberFormatI18n( $this->segmentSubscribersRepository->getSubscribersCountBySegmentIds($segmentIds, SubscriberEntity::STATUS_SUBSCRIBED) ); } } public function getArchive($params) { $segmentIds = []; if (!empty($params['segments'])) { $segmentIds = array_map(function($segmentId) { return (int)trim($segmentId); }, explode(',', $params['segments'])); } $html = ''; $newsletters = $this->newslettersRepository->getArchives($segmentIds); $subscriber = $this->subscribersRepository->getCurrentWPUser(); if (empty($newsletters)) { return $this->wp->applyFilters( 'mailpoet_archive_no_newsletters', __('Oops! There are no newsletters to display.', 'mailpoet') ); } else { $title = $this->wp->applyFilters('mailpoet_archive_title', ''); if (!empty($title)) { $html .= '

' . $title . '

'; } $html .= ''; } return $html; } public function renderArchiveDate(NewsletterEntity $newsletter) { $timestamp = null; $processedAt = $newsletter->getProcessedAt(); if (!is_null($processedAt)) { $timestamp = $processedAt->getTimestamp(); } return $this->wp->dateI18n( $this->wp->getOption('date_format'), $timestamp ); } public function renderArchiveSubject(NewsletterEntity $newsletter, ?SubscriberEntity $subscriber, ?SendingQueueEntity $queue) { if (is_null($subscriber)) { $subscriber = new SubscriberEntity(); } $previewUrl = $this->newsletterUrl->getViewInBrowserUrl($newsletter, $subscriber, $queue); /** * An ugly workaround to make sure state is not shared via NewsletterShortcodes service * This should be replaced with injected service when state is removed from this service * (i.e. after https://mailpoet.atlassian.net/browse/MAILPOET-4087 is done and merged to master) */ $shortcodeProcessor = new NewsletterShortcodes( $this->dateCategory, $this->linkCategory, $this->newsletterCategory, $this->subscriberCategory, $this->siteCategory, $this->wp ); $shortcodeProcessor->setNewsletter($newsletter); $shortcodeProcessor->setSubscriber($subscriber); $shortcodeProcessor->setQueue($queue); return '' . esc_attr((string)$shortcodeProcessor->replace($queue ? $queue->getNewsletterRenderedSubject() : '')) . ''; } }
Fatal error: Uncaught Error: Class "MailPoet\Config\Shortcodes" not found in /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php:2276 Stack trace: #0 /htdocs/wp-content/plugins/mailpoet/vendor-prefixed/symfony/dependency-injection/Container.php(122): MailPoetGenerated\FreeCachedContainer->getInitializerService() #1 /htdocs/wp-content/plugins/mailpoet/vendor-prefixed/symfony/dependency-injection/Container.php(110): MailPoetVendor\Symfony\Component\DependencyInjection\Container->make('MailPoet\\Config...', 1) #2 /htdocs/wp-content/plugins/mailpoet/lib/DI/ContainerWrapper.php(39): MailPoetVendor\Symfony\Component\DependencyInjection\Container->get('MailPoet\\Config...') #3 /htdocs/wp-content/plugins/mailpoet/mailpoet_initializer.php(89): MailPoet\DI\ContainerWrapper->get('MailPoet\\Config...') #4 /htdocs/wp-content/plugins/mailpoet/mailpoet.php(206): require_once('/htdocs/wp-cont...') #5 /htdocs/wp-settings.php(462): include_once('/htdocs/wp-cont...') #6 /htdocs/wp-config.php(96): require_once('/htdocs/wp-sett...') #7 /htdocs/wp-load.php(50): require_once('/htdocs/wp-conf...') #8 /htdocs/wp-blog-header.php(13): require_once('/htdocs/wp-load...') #9 /htdocs/index.php(17): require('/htdocs/wp-blog...') #10 {main} thrown in /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php on line 2276