Bug report

  • sannin
    Participant
    8 months, 3 weeks ago #35305

    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;
    }
    wpsolr
    Keymaster
    8 months, 3 weeks ago #35306

    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 )) {
      ..
    }
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.