section and everything up until
* * @package Buzz Ecommerce */ add_action( "wp_ajax_nopriv_category_tab_products", 'buzz_ecommerce_category_tab_products' ); add_action( 'wp_ajax_category_tab_products','buzz_ecommerce_category_tab_products'); if ( ! function_exists( 'buzz_ecommerce_category_tab_products' ) ) { function buzz_ecommerce_category_tab_products(){ //Ajax Call Products Display Hear $tab_category_id = $_POST['post_id']; $tab_product_count = $_POST['prduct_count']; $html = ob_start(); ?>
'product', 'tax_query' => array( array( 'taxonomy' => 'product_cat', 'field' => 'term_id', 'terms' => $tab_category_id // Ajax Category Id ), array( 'taxonomy' => 'product_visibility', 'field' => 'name', 'terms' => 'exclude-from-catalog', 'operator' => 'NOT IN' ) ), 'posts_per_page' => $tab_product_count ); $query = new WP_Query($product_args); $total_products = ($query->post_count)-1; if($query->have_posts()) { while($query->have_posts()) { $query->the_post(); ?>