Home » Topics » Integration with plugins » WooCommerce » Bug report
Hey,
I am getting an indexing error for some variable products. The problem i at line 784 if i am not mistaken in file wp-content/plugins/wpsolr-pro/wpsolr/pro/extensions/woocommerce/class-wpsolr-plugin-woocommerce.php
$attribute_name = get_term_by( 'name', $attribute_value, $attribute_name )->name;
I temporarily fixed it by adding a check on attribute object:
$attribute = get_term_by( 'name', $attribute_value, $attribute_name ); if ( $attribute ) { $attribute_name = $attribute->name; } else { continue; }
Thanks for the feedback.
It is already fixed and will be in WPSOLR 23.4:
if ( ! empty( $attribute_term = get_term_by( 'name', $attribute_value, $attribute_name ) ) && property_exists( $attribute_term, 'name' ) && ! empty( $attribute_name = $attribute_term->name )) { .. }
You must be logged in to reply to this topic.