Fixed undefined $image_id in WC_Product_Variation::get_image_id()
This commit is contained in:
parent
4dc32da477
commit
da72a76089
|
@ -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;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue