From da72a760899abf0d2fdcff508c02701569ccde3d Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Thu, 10 Nov 2016 17:11:21 -0200 Subject: [PATCH] Fixed undefined $image_id in WC_Product_Variation::get_image_id() --- includes/class-wc-product-variation.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/includes/class-wc-product-variation.php b/includes/class-wc-product-variation.php index e93c7a97c50..ada79614e4e 100644 --- a/includes/class-wc-product-variation.php +++ b/includes/class-wc-product-variation.php @@ -270,12 +270,13 @@ class WC_Product_Variation extends WC_Product_Simple { * @return string */ public function get_image_id( $context = 'view' ) { - $value = $this->get_prop( 'image_id', $context ); + $image_id = $this->get_prop( 'image_id', $context ); if ( 'view' === $context && ! $image_id ) { - $value = $this->parent_data['image_id']; + $image_id = $this->parent_data['image_id']; } - return $value; + + return $image_id; } /*