Hi @danielaromeo,
probably you have an issue with the functions.php file of your theme. I’m sure that the problem are linked to product attribute hierarchy. For this you can create a little plugin to restore it, please follow this instruction:
1. Create a file called init.php
2. Past this code inside it:
/*
Plugin Name: YITH Support Restore Attribute Hierarchy
Description: YITH Support Restore Attribute Hierarchy
Author: YITHEMES
Version: 1.0.0
Author URI: https://yithemes.com/
*/
/*
* This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* https://www.gnu.org/licenses/gpl-3.0.txt
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
} // Exit if accessed directly
add_action( 'init', 'yith_woocommerce_register_taxonomies_hack', 4 );
if( ! function_exists( 'yith_woocommerce_register_taxonomies_hack' ) ){
function yith_woocommerce_register_taxonomies_hack(){
if( function_exists( 'wc_get_attribute_taxonomies' ) && $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;
}
}
3. Create a new folder called yith-support-restore-attribute-hierarchy under wp-content/plugins and past the file init.php
4. Go on WordPress dashboard and enable the plugin YITH Support Restore Attribute Hierarchy
5. Go in YITH Plugins > Ajax Product Filter and set the sort By option to WooCommerce Default value.
Let me know if all works fine or not.
Have a nice day
YITH