$subscriber): void { $tasks = $this->tasksRepository->findByTypeAndSubscriber(AbandonedCartWorker::TASK_TYPE, $subscriber); if (!$tasks) { return; } $this->cancel($subscriber); foreach ($tasks as $task) { $meta = $task->getMeta(); $automation = isset($meta['automation_id']) ? $this->automationStorage->getAutomation((int)$meta['automation_id']) : null; if (!$automation) { continue; } $this->scheduleForSingleAutomation($subscriber, $meta['product_ids'] ?? [], $automation); } } public function cancel(SubscriberEntity $subscriber): void { $existingTasks = $this->tasksRepository->findByTypeAndSubscriber(AbandonedCartWorker::TASK_TYPE, $subscriber); if (!$existingTasks) { return; } foreach ($existingTasks as $task) { if ($task->getStatus() !== ScheduledTaskEntity::STATUS_SCHEDULED) { continue; } foreach ($task->getSubscribers() as $taskSubscriber) { $this->taskSubscribersRepository->remove($taskSubscriber); } $this->tasksRepository->remove($task); } $this->tasksRepository->flush(); } }
Fatal error: Uncaught Error: Class "MailPoet\Automation\Integrations\WooCommerce\Triggers\AbandonedCart\AbandonedCartHandler" not found in /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php:2348 Stack trace: #0 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(2358): MailPoetGenerated\FreeCachedContainer->getAbandonedCartHandlerService() #1 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(2468): MailPoetGenerated\FreeCachedContainer->getAbandonedCartTriggerService() #2 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(2640): MailPoetGenerated\FreeCachedContainer->getWooCommerceIntegrationService() #3 /htdocs/wp-content/plugins/mailpoet/vendor-prefixed/symfony/dependency-injection/Container.php(122): MailPoetGenerated\FreeCachedContainer->getInitializerService() #4 /htdocs/wp-content/plugins/mailpoet/vendor-prefixed/symfony/dependency-injection/Container.php(110): MailPoetVendor\Symfony\Component\DependencyInjection\Container->make('MailPoet\\Config...', 1) #5 /htdocs/wp-content/plugins/mailpoet/lib/DI/ContainerWrapper.php(39): MailPoetVendor\Symfony\Component\DependencyInjection\Container->get('MailPoet\\Config...') #6 /htdocs/wp-content/plugins/mailpoet/mailpoet_initializer.php(89): MailPoet\DI\ContainerWrapper->get('MailPoet\\Config...') #7 /htdocs/wp-content/plugins/mailpoet/mailpoet.php(194): require_once('/htdocs/wp-cont...') #8 /htdocs/wp-settings.php(526): include_once('/htdocs/wp-cont...') #9 /htdocs/wp-config.php(85): require_once('/htdocs/wp-sett...') #10 /htdocs/wp-load.php(50): require_once('/htdocs/wp-conf...') #11 /htdocs/wp-blog-header.php(13): require_once('/htdocs/wp-load...') #12 /htdocs/index.php(17): require('/htdocs/wp-blog...') #13 {main} thrown in /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php on line 2348