= ''; $title .= ''; $title .= Helpers::getLabel( 'tax_' . $taxonomy ) . ': '; $title .= ''; $title .= esc_html( wp_unslash( $termName ) ); $title .= ''; $title = apply_filters( 'dgwt/wcas/suggestion_details/taxonomy/headline', $title, $termID, $taxonomy, $termName ); echo '
' ; do_action( 'dgwt/wcas/details_panel/term_products/container_before' ); echo '
' ; echo ( !empty($title) ? $title : '' ) ; $thumbSize = apply_filters( 'dgwt/wcas/suggestion_details/term_products/thumb_size', 'dgwt-wcas-product-suggestion' ); $responsiveImages = apply_filters( 'dgwt/wcas/suggestion_details/responsive_images', true ); while ( $products->have_posts() ) { $products->the_post(); $product = new Product( get_the_ID() ); if ( $product->isValid() ) { $vars = array( 'ID' => $product->getID(), 'name' => $product->getName(), 'link' => $product->getPermalink(), 'imageSrc' => $product->getThumbnailSrc( $thumbSize ), 'imageSrcset' => ( $responsiveImages ? $product->getThumbnailSrcset( $thumbSize ) : '' ), 'imageSizes' => ( $responsiveImages ? $product->getThumbnailSizes( $thumbSize ) : '' ), 'reviewCount' => $product->getReviewCount(), 'ratingHtml' => $product->getRatingHtml(), 'priceHtml' => $product->getPriceHTML(), 'wooObject' => $product->getWooObject(), ); $vars = (object) apply_filters( 'dgwt/wcas/suggestion_details/term_products/vars', $vars, $product->getID(), $product ); Helpers::loadTemplate( 'details-panel/term-product.php', $vars ); } } echo '
' ; if ( $showMore ) { $showMoreUrl = get_term_link( $termID, $taxonomy ); echo '' . Helpers::getLabel( 'show_more_details' ) . ' (' . $totalProducts . ')' ; } do_action( 'dgwt/wcas/details_panel/term_products/container_after' ); echo '
' ; } wp_reset_postdata(); $html = ob_get_clean(); return apply_filters( 'dgwt/wcas/suggestion_details/term/html', $html, $termID, $taxonomy ); } /** * Get query vars for products that should be displayed in the daxonomy details box * * @param int $termID * @param string $taxonomy * * @return array */ private function getProductsQueryArgs( $termID, $taxonomy ) { $productVisibilityTermIds = wc_get_product_visibility_term_ids(); $queryArgs = array( 'posts_per_page' => apply_filters( 'dgwt/wcas/suggestion_details/taxonomy/limit', 4 ), 'post_status' => 'publish', 'post_type' => 'product', 'no_found_rows' => false, 'order' => 'desc', 'orderby' => 'meta_value_num', 'meta_key' => 'total_sales', 'tax_query' => array(), ); // Visibility $queryArgs['tax_query'][] = array( 'taxonomy' => 'product_visibility', 'field' => 'term_taxonomy_id', 'terms' => $productVisibilityTermIds['exclude-from-search'], 'operator' => 'NOT IN', ); // Out of stock if ( 'yes' === get_option( 'woocommerce_manage_stock' ) && DGWT_WCAS()->settings->getOption( 'exclude_out_of_stock' ) === 'on' ) { $queryArgs['tax_query'][] = array( 'taxonomy' => 'product_visibility', 'field' => 'term_taxonomy_id', 'terms' => $productVisibilityTermIds['outofstock'], 'operator' => 'NOT IN', ); } // Search with specific category $queryArgs['tax_query'][] = array( 'taxonomy' => $taxonomy, 'field' => 'id', 'terms' => $termID, 'include_children' => true, ); return apply_filters( 'dgwt/wcas/suggestion_details/taxonomy/products_query_args', $queryArgs, $termID, $taxonomy ); } }
Fatal error: Uncaught Error: Class 'DgoraWcas\Engines\WordPressNative\DetailsBox' not found in /home/arasetne/public_html/wp-content/plugins/ajax-search-for-woocommerce/ajax-search-for-woocommerce.php:79 Stack trace: #0 /home/arasetne/public_html/wp-content/plugins/ajax-search-for-woocommerce/ajax-search-for-woocommerce.php(379): DGWT_WC_Ajax_Search::getInstance() #1 /home/arasetne/public_html/wp-includes/class-wp-hook.php(324): DGWT_WCAS('') #2 /home/arasetne/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #3 /home/arasetne/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #4 /home/arasetne/public_html/wp-settings.php(550): do_action('plugins_loaded') #5 /home/arasetne/public_html/wp-config.php(188): require_once('/home/arasetne/...') #6 /home/arasetne/public_html/wp-load.php(50): require_once('/home/arasetne/...') #7 /home/arasetne/public_html/wp-blog-header.php(13): require_once('/home/arasetne/...') #8 /home/arasetne/public_html/index.php(17): require('/home/arasetn in /home/arasetne/public_html/wp-content/plugins/ajax-search-for-woocommerce/ajax-search-for-woocommerce.php on line 79