lias): QueryBuilder { global $wpdb; return $queryBuilder->innerJoin( $orderStatsAlias, $wpdb->prefix . 'wc_order_product_lookup', 'product', "$orderStatsAlias.order_id = product.order_id" ); } private function applyTermRelationshipsJoin(QueryBuilder $queryBuilder): QueryBuilder { global $wpdb; return $queryBuilder->join( 'product', $wpdb->term_relationships, // phpcs:ignore Squiz.NamingConventions.ValidVariableName.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(['taxonomy' => 'product_cat', 'child_of' => $categoryId, 'hide_empty' => false]); 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; } public function getLookupData(DynamicSegmentFilterData $filterData): array { $lookupData = [ 'categories' => [], ]; $categoryIds = $filterData->getArrayParam('category_ids'); $terms = $this->wp->getTerms('product_cat', ['include' => $categoryIds, 'hide_empty' => false]); /** @var WP_Term[] $terms */ foreach ($terms as $term) { $lookupData['categories'][$term->term_id] = $term->name; // phpcs:ignore Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps } return $lookupData; } }
Fatal error: Uncaught Error: Class "MailPoet\Segments\DynamicSegments\Filters\WooCommerceCategory" not found in /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php:4538 Stack trace: #0 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(4348): MailPoetGenerated\FreeCachedContainer->getWooCommerceCategoryService() #1 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(4141): MailPoetGenerated\FreeCachedContainer->getFilterFactoryService() #2 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(4031): MailPoetGenerated\FreeCachedContainer->getSendingQueuesRepositoryService() #3 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(5088): MailPoetGenerated\FreeCachedContainer->getRenderer6Service() #4 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(5098): MailPoetGenerated\FreeCachedContainer->getConfirmationEmailCustomizerService() #5 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(5198): MailPoetGenerated\FreeCachedContainer->getConfirmationEmailMailerService() #6 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(5368): MailPoetGenerated\FreeCachedContainer->getSubscriberActionsService() #7 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(2612): MailPoetGenerated\FreeCachedContainer->getCommentService() #8 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(2640): MailPoetGenerated\FreeCachedContainer->getHooks2Service() #9 /htdocs/wp-content/plugins/mailpoet/vendor-prefixed/symfony/dependency-injection/Container.php(122): MailPoetGenerated\FreeCachedContainer->getInitializerService() #10 /htdocs/wp-content/plugins/mailpoet/vendor-prefixed/symfony/dependency-injection/Container.php(110): MailPoetVendor\Symfony\Component\DependencyInjection\Container->make('MailPoet\\Config...', 1) #11 /htdocs/wp-content/plugins/mailpoet/lib/DI/ContainerWrapper.php(39): MailPoetVendor\Symfony\Component\DependencyInjection\Container->get('MailPoet\\Config...') #12 /htdocs/wp-content/plugins/mailpoet/mailpoet_initializer.php(89): MailPoet\DI\ContainerWrapper->get('MailPoet\\Config...') #13 /htdocs/wp-content/plugins/mailpoet/mailpoet.php(194): require_once('/htdocs/wp-cont...') #14 /htdocs/wp-settings.php(526): include_once('/htdocs/wp-cont...') #15 /htdocs/wp-config.php(85): require_once('/htdocs/wp-sett...') #16 /htdocs/wp-load.php(50): require_once('/htdocs/wp-conf...') #17 /htdocs/wp-blog-header.php(13): require_once('/htdocs/wp-load...') #18 /htdocs/index.php(17): require('/htdocs/wp-blog...') #19 {main} thrown in /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php on line 4538