diff --git a/includes/class-wc-product-variation.php b/includes/class-wc-product-variation.php index c2eee0b0419..4ca4e813b35 100644 --- a/includes/class-wc-product-variation.php +++ b/includes/class-wc-product-variation.php @@ -273,8 +273,9 @@ class WC_Product_Variation extends WC_Product_Simple { $image_id = $this->get_prop( 'image_id', $context ); if ( 'view' === $context && ! $image_id ) { - $vimage_id = $this->parent_data['image_id']; + $image_id = $this->parent_data['image_id']; } + return $image_id; }