Merge pull request #14042 from franticpsyx/order-again-meta-std-class-props

[3.0] Fix non-existing stdClass props in WC_Form_Handler::order_again
This commit is contained in:
Claudio Sanches 2017-04-06 14:42:14 -03:00 committed by GitHub
commit 2ff763a976
1 changed files with 4 additions and 4 deletions

View File

@ -586,10 +586,10 @@ class WC_Form_Handler {
$cart_item_data = apply_filters( 'woocommerce_order_again_cart_item_data', array(), $item, $order ); $cart_item_data = apply_filters( 'woocommerce_order_again_cart_item_data', array(), $item, $order );
foreach ( $item->get_meta_data() as $meta ) { foreach ( $item->get_meta_data() as $meta ) {
if ( taxonomy_is_product_attribute( $meta->meta_key ) ) { if ( taxonomy_is_product_attribute( $meta->key ) ) {
$variations[ $meta->meta_key ] = $meta->meta_value; $variations[ $meta->key ] = $meta->value;
} elseif ( meta_is_product_attribute( $meta->meta_key, $meta->meta_value, $product_id ) ) { } elseif ( meta_is_product_attribute( $meta->key, $meta->value, $product_id ) ) {
$variations[ $meta->meta_key ] = $meta->meta_value; $variations[ $meta->key ] = $meta->value;
} }
} }