iableName.MemberNotCamelCaps 'term_relationships', 'product.product_id = term_relationships.object_id' ); } private function applyTermTaxonomyJoin(QueryBuilder $queryBuilder, string $parameterSuffix): QueryBuilder { global $wpdb; return $queryBuilder->innerJoin( 'term_relationships', $wpdb->term_taxonomy, // phpcs:ignore Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps 'term_taxonomy', "term_taxonomy.term_taxonomy_id=term_relationships.term_taxonomy_id AND term_taxonomy.term_id IN (:category_$parameterSuffix)" ); } private function createQueryBuilder(string $table): QueryBuilder { return $this->entityManager->getConnection() ->createQueryBuilder() ->from($table); } private function getCategoriesWithChildren(array $categoriesId): array { $allIds = []; foreach ($categoriesId as $categoryId) { $allIds = array_merge($allIds, $this->getAllCategoryIds($categoryId)); } return array_unique($allIds); } private function getAllCategoryIds(int $categoryId): array { $subcategories = $this->wp->getTerms('product_cat', ['child_of' => $categoryId]); if (!is_array($subcategories) || empty($subcategories)) return [$categoryId]; $ids = array_map(function($category) { return $category->term_id; // phpcs:ignore Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps }, $subcategories); $ids[] = $categoryId; return $ids; } }
Fatal error: Uncaught Error: Class "MailPoet\Segments\DynamicSegments\Filters\WooCommerceCategory" not found in /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php:3874 Stack trace: #0 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(3704): MailPoetGenerated\FreeCachedContainer->getWooCommerceCategoryService() #1 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(3714): MailPoetGenerated\FreeCachedContainer->getFilterFactoryService() #2 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(4064): MailPoetGenerated\FreeCachedContainer->getFilterHandler2Service() #3 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(4104): MailPoetGenerated\FreeCachedContainer->getSegmentSubscribersRepositoryService() #4 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(4544): MailPoetGenerated\FreeCachedContainer->getSubscribersFinderService() #5 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(2248): MailPoetGenerated\FreeCachedContainer->getSubscriberSubscribeControllerService() #6 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(2276): 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(206): require_once('/htdocs/wp-cont...') #12 /htdocs/wp-settings.php(462): include_once('/htdocs/wp-cont...') #13 /htdocs/wp-config.php(96): 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 3874