ause} AND term_id in {$term_ids_to_filter_by_list} )"; } if ( ! empty( $clauses ) ) { // "temp" is needed because the extra derived tables require an alias. $args['where'] .= ' AND (' . join( ' temp ) AND ', $clauses ) . ' temp ))'; } elseif ( ! empty( $chosen_attributes ) ) { $args['where'] .= ' AND 1=0'; } return $args; } /** * Get an array of attributes and terms selected from query arguments. * * @param array $query_vars The WP_Query arguments. * @return array */ private function get_chosen_attributes( $query_vars ) { $chosen_attributes = array(); if ( empty( $query_vars ) ) { return $chosen_attributes; } foreach ( $query_vars as $key => $value ) { if ( 0 === strpos( $key, 'filter_' ) ) { $attribute = wc_sanitize_taxonomy_name( str_replace( 'filter_', '', $key ) ); $taxonomy = wc_attribute_taxonomy_name( $attribute ); $filter_terms = ! empty( $value ) ? explode( ',', wc_clean( wp_unslash( $value ) ) ) : array(); if ( empty( $filter_terms ) || ! taxonomy_exists( $taxonomy ) || ! wc_attribute_taxonomy_id_by_name( $attribute ) ) { continue; } $query_type = ! empty( $query_vars[ 'query_type_' . $attribute ] ) && in_array( $query_vars[ 'query_type_' . $attribute ], array( 'and', 'or' ), true ) ? wc_clean( wp_unslash( $query_vars[ 'query_type_' . $attribute ] ) ) : ''; $chosen_attributes[ $taxonomy ]['terms'] = array_map( 'sanitize_title', $filter_terms ); // Ensures correct encoding. $chosen_attributes[ $taxonomy ]['query_type'] = $query_type ? $query_type : 'and'; } } return $chosen_attributes; } }
Fatal error: Uncaught Error: Class 'Automattic\WooCommerce\Blocks\QueryFilters' not found in /home/abauctio/public_html/wp-content/plugins/woocommerce/src/Blocks/Domain/Bootstrap.php:415 Stack trace: #0 /home/abauctio/public_html/wp-content/plugins/woocommerce/src/Blocks/Registry/AbstractDependencyType.php(42): Automattic\WooCommerce\Blocks\Domain\Bootstrap->Automattic\WooCommerce\Blocks\Domain\{closure}(Object(Automattic\WooCommerce\Blocks\Registry\Container)) #1 /home/abauctio/public_html/wp-content/plugins/woocommerce/src/Blocks/Registry/SharedType.php(28): Automattic\WooCommerce\Blocks\Registry\AbstractDependencyType->resolve_value(Object(Automattic\WooCommerce\Blocks\Registry\Container)) #2 /home/abauctio/public_html/wp-content/plugins/woocommerce/src/Blocks/Registry/Container.php(96): Automattic\WooCommerce\Blocks\Registry\SharedType->get(Object(Automattic\WooCommerce\Blocks\Registry\Container)) #3 /home/abauctio/public_html/wp-content/plugins/woocommerce/src/Blocks/Domain/Bootstrap.php(176): Automattic\WooCommerce\ in /home/abauctio/public_html/wp-content/plugins/woocommerce/src/Blocks/Domain/Bootstrap.php on line 415