From e18d9741a443db0f1140bcd765c2a766d5a9f54a Mon Sep 17 00:00:00 2001 From: Manos Psychogyiopoulos Date: Thu, 6 Apr 2017 17:42:51 +0300 Subject: [PATCH] Fix non-existing stdClass props --- includes/class-wc-form-handler.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/class-wc-form-handler.php b/includes/class-wc-form-handler.php index ce7323896cf..bcb7d0f2c94 100644 --- a/includes/class-wc-form-handler.php +++ b/includes/class-wc-form-handler.php @@ -586,10 +586,10 @@ class WC_Form_Handler { $cart_item_data = apply_filters( 'woocommerce_order_again_cart_item_data', array(), $item, $order ); foreach ( $item->get_meta_data() as $meta ) { - if ( taxonomy_is_product_attribute( $meta->meta_key ) ) { - $variations[ $meta->meta_key ] = $meta->meta_value; - } elseif ( meta_is_product_attribute( $meta->meta_key, $meta->meta_value, $product_id ) ) { - $variations[ $meta->meta_key ] = $meta->meta_value; + if ( taxonomy_is_product_attribute( $meta->key ) ) { + $variations[ $meta->key ] = $meta->value; + } elseif ( meta_is_product_attribute( $meta->key, $meta->value, $product_id ) ) { + $variations[ $meta->key ] = $meta->value; } }