Dražen
Supporter
Languages:
English (English )
Timezone:
Europe/Zagreb (GMT+01:00)
|
Hello,
please try next workaround
Open the /wp-content/plugins/kadence-blocks-pro/includes/query/query-indexer-woo.php file
Look for line 74
Replace:
if ( ! empty( $attribute_values ) ) {
$attribute_values_array = explode( ',', $attribute_values );
foreach ( $attribute_values_array as $facet_name ) {
$facet_name = trim( $facet_name );
$term = get_term_by('name', $facet_name, $tax_name);
if ($term) {
$term_id = $term->term_id;
}
$rows[] = array(
'facet_value' => isset( $term_id ) ? $term_id : 0,
'facet_name' => $facet_name,
'facet_id' => isset( $term_id ) ? $term_id : 0
);
}
return $rows;
}
With:
if ( ! empty( $attribute_values ) ) {
$attribute_values_array = explode( ',', $attribute_values );
foreach ( $attribute_values_array as $facet_name ) {
$facet_name = trim( $facet_name );
$term = get_term_by('name', $facet_name, $tax_name);
if ($term) {
$term_id = $term->term_id;
}
//WPML workaround for compsupp-7812
$languages = apply_filters( 'wpml_active_languages', NULL);
if ( !empty( $languages ) ) {
foreach( $languages as $language ){
$term_id = apply_filters( 'wpml_object_id', $term_id, $tax_name, TRUE, $language['language_code'] );
$rows[] = array(
'facet_value' => isset( $term_id ) ? $term_id : 0,
'facet_name' => $facet_name,
'facet_id' => isset( $term_id ) ? $term_id : 0
);
}
}
}
return $rows;
}
- Go to your default language product and click update, just so re-index is created for loop
Regards,
Drazen
|