NOTIFICATION, 'currency' => $currency, 'revenue_status' => $revenueStatus, ], [ 'notification_history_type' => ParameterType::STRING, 'notification_type' => ParameterType::STRING, 'currency' => ParameterType::STRING, 'revenue_status' => Connection::PARAM_STR_ARRAY, ])->fetchAllAssociative(); $data = array_map(function($row) { $row['revenue'] = round(floatval($row['revenue']), 2); $row['orders_count'] = intval($row['orders_count']); return $row; }, $data); return $data; } /** @param int[] $ids */ public function removeNewsletterDataByNewsletterIds(array $ids): void { $this->entityManager->createQueryBuilder() ->update(StatisticsWooCommercePurchaseEntity::class, 'swp') ->set('swp.newsletter', ':newsletter') ->where('swp.newsletter IN (:ids)') ->setParameter('newsletter', null) ->setParameter('ids', $ids) ->getQuery() ->execute(); // update was done via DQL, make sure the entities are also refreshed in the entity manager $this->refreshAll(function (StatisticsWooCommercePurchaseEntity $entity) use ($ids) { $newsletter = $entity->getNewsletter(); return $newsletter && in_array($newsletter->getId(), $ids, true); }); } }
Fatal error: Uncaught Error: Class "MailPoet\Statistics\StatisticsWooCommercePurchasesRepository" not found in /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php:5008 Stack trace: #0 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(5852): MailPoetGenerated\FreeCachedContainer->getStatisticsWooCommercePurchasesRepositoryService() #1 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(2622): MailPoetGenerated\FreeCachedContainer->getWooCommercePurchasesService() #2 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(2612): MailPoetGenerated\FreeCachedContainer->getHooksWooCommerceService() #3 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(2640): MailPoetGenerated\FreeCachedContainer->getHooks2Service() #4 /htdocs/wp-content/plugins/mailpoet/vendor-prefixed/symfony/dependency-injection/Container.php(122): MailPoetGenerated\FreeCachedContainer->getInitializerService() #5 /htdocs/wp-content/plugins/mailpoet/vendor-prefixed/symfony/dependency-injection/Container.php(110): MailPoetVendor\Symfony\Component\DependencyInjection\Container->make('MailPoet\\Config...', 1) #6 /htdocs/wp-content/plugins/mailpoet/lib/DI/ContainerWrapper.php(39): MailPoetVendor\Symfony\Component\DependencyInjection\Container->get('MailPoet\\Config...') #7 /htdocs/wp-content/plugins/mailpoet/mailpoet_initializer.php(89): MailPoet\DI\ContainerWrapper->get('MailPoet\\Config...') #8 /htdocs/wp-content/plugins/mailpoet/mailpoet.php(194): require_once('/htdocs/wp-cont...') #9 /htdocs/wp-settings.php(526): include_once('/htdocs/wp-cont...') #10 /htdocs/wp-config.php(85): require_once('/htdocs/wp-sett...') #11 /htdocs/wp-load.php(50): require_once('/htdocs/wp-conf...') #12 /htdocs/wp-blog-header.php(13): require_once('/htdocs/wp-load...') #13 /htdocs/index.php(17): require('/htdocs/wp-blog...') #14 {main} thrown in /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php on line 5008