Init added variables if product doesnt have featured image.
This commit is contained in:
parent
8c805eccf0
commit
3fdec7f4a8
|
@ -566,7 +566,7 @@ class WC_Product_Variable extends WC_Product {
|
||||||
$image_srcset = wp_get_attachment_image_srcset( $attachment_id, 'shop_single' );
|
$image_srcset = wp_get_attachment_image_srcset( $attachment_id, 'shop_single' );
|
||||||
$image_sizes = wp_get_attachment_image_sizes( $attachment_id, 'shop_single' );
|
$image_sizes = wp_get_attachment_image_sizes( $attachment_id, 'shop_single' );
|
||||||
} else {
|
} else {
|
||||||
$image = $image_link = $image_title = $image_alt = '';
|
$image = $image_link = $image_title = $image_alt = $image_srcset = $image_sizes = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$availability = $variation->get_availability();
|
$availability = $variation->get_availability();
|
||||||
|
|
Loading…
Reference in New Issue