hello, i added html block with product filters and i saw that the Hierarchical attributes not working, i reenabled it with this function
if( function_exists( 'WC' ) ){
add_action( 'init', 'yith_woocommerce_register_taxonomies_hack', 4 );
if( ! function_exists( 'yith_woocommerce_register_taxonomies_hack' ) ){
function yith_woocommerce_register_taxonomies_hack(){
if( $attribute_taxonomies = wc_get_attribute_taxonomies() ) {
foreach ($attribute_taxonomies as $tax) {
if ($name = wc_attribute_taxonomy_name($tax->attribute_name)) {
add_filter( "woocommerce_taxonomy_args_{$name}", 'yith_woocommerce_taxonomy_product_attribute_args' );
}
}
}
}
}
if( ! function_exists( 'yith_woocommerce_taxonomy_product_attribute_args' ) ){
function yith_woocommerce_taxonomy_product_attribute_args( $taxonomy_data ){
$taxonomy_data['hierarchical'] = true;
return $taxonomy_data;
}
}
}
but now i want to show only the parent attributes on my shop page. i need it for the size and the colors. (pa_color, pa_size) is that possible ?