• Resolved Brian Henry

    (@brianhenryie)


    Some new notices since updating to 2.5.0.

    
    PHP Notice:  Undefined index: line_tax in /path/to/wp-content/plugins/klaviyo/includes/wck-cart-rebuild.php on line 155
    PHP Notice:  Undefined index: line_total in /path/to/wp-content/plugins/klaviyo/includes/wck-cart-rebuild.php on line 155
    PHP Notice:  Undefined index: line_tax in /path/to/wp-content/plugins/klaviyo/includes/wck-cart-rebuild.php on line 154
    PHP Notice:  Undefined index: line_total in /path/to/wp-content/plugins/klaviyo/includes/wck-cart-rebuild.php on line 153
    PHP Notice:  Undefined index: line_subtotal_tax in /path/to/wp-content/plugins/klaviyo/includes/wck-cart-rebuild.php on line 152
    PHP Notice:  Undefined index: line_subtotal in /path/to/wp-content/plugins/klaviyo/includes/wck-cart-rebuild.php on line 151
    
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author klaviyo

    (@klaviyo)

    Hi @brianhenryie

    We’ll release a patch to fix this in the coming days.

    Thanks,
    Klaviyo

    Thread Starter Brian Henry

    (@brianhenryie)

    Thanks.

    For now I added some checks, but I don’t know if the values’ absences causes problems elsewhere.

    wck-cart-rebuild:138

    
    $item = array(
        'Quantity' => $values['quantity'],
        'ProductID' => $parent_product_id,
        'VariantID' => $product->get_id(),
        'Name' => $product->get_name(),
        'URL' => $product->get_permalink(),
        'Images' => array(
            array(
                'URL' => $image
            )
        ),
        'Categories' => $categories,
        'Variation' => $values['variation'],
    );
    
    if( isset( $values['line_subtotal'] ) ) {
        $item['SubTotal'] = $values['line_subtotal'];
    }
    if( isset( $values['line_subtotal_tax'] ) ) {
        $item['Total'] = $values['line_subtotal_tax'];
    }
    if( isset( $values['line_total'] ) ) {
        $item['LineTotal'] = $values['line_total'];
    }
    if( isset($values['line_tax'] ) ) {
        $item['Tax'] = $values['line_tax'];
    }
    if( isset($values['line_total'] ) && isset( $values['line_tax'] ) ) {
        $item['TotalWithTax'] = $values['line_total'] + $values['line_tax'];
    }
    
    $event_data['$extra']['Items'][] = $item;

    `

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Undefined index in 2.5.0’ is closed to new replies.