Filtrar JetSmartFilters añadiendo una categoría además de los filtros definidos

Filtrar JetSmartFilters añadiendo una categoría además de los filtros definidos.

function ebfilter_pre_get_posts( $query ) {
$ceb = $_SESSION["ceb"];
$term = get_term_by("slug", get_query_var("s"), "product_tag");
$tax_query = array(
"taxonomy" => "product_cat",
"terms" => array ( $ceb ),
"field" => "term_id",
"operator" => "IN",
);
$query->tax_query->queries[] = $tax_query;
$query->query_vars["tax_query"] = $query->tax_query->queries;
$query->set("tax_query", $query->tax_query->queries);
}



function ebfilter_products_shortcode_args( $args, $atts, $type ){
//echo "<pre>";print_r ($type);echo "</pre>";
if ( wp_doing_ajax() && $type === "products" ) {
add_action( "pre_get_posts", "ebfilter_pre_get_posts", 1 );
}
else {
remove_action( "pre_get_posts", "ebfilter_pre_get_posts", 1 );
}

return $args;
//echo "<pre>";print_r ($atts);echo "</pre>";
}

add_filter( "woocommerce_shortcode_products_query", "ebfilter_products_shortcode_args", 10, 3 );