Init added variables if product doesnt have featured image.

This commit is contained in:
Tiago Noronha 2015-11-24 23:00:25 +00:00
parent 8c805eccf0
commit 3fdec7f4a8
1 changed files with 1 additions and 1 deletions

View File

@ -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();