parent
043265101f
commit
7274c14591
|
@ -566,7 +566,7 @@
|
||||||
$product_img.wc_set_variation_attr( 'data-large_image_width', variation.image.full_src_w );
|
$product_img.wc_set_variation_attr( 'data-large_image_width', variation.image.full_src_w );
|
||||||
$product_img.wc_set_variation_attr( 'data-large_image_height', variation.image.full_src_h );
|
$product_img.wc_set_variation_attr( 'data-large_image_height', variation.image.full_src_h );
|
||||||
$product_img_wrap.wc_set_variation_attr( 'data-thumb', variation.image.src );
|
$product_img_wrap.wc_set_variation_attr( 'data-thumb', variation.image.src );
|
||||||
$gallery_img.wc_set_variation_attr( 'src', variation.image.src );
|
$gallery_img.wc_set_variation_attr( 'src', variation.image.thumb_src );
|
||||||
$product_link.wc_set_variation_attr( 'href', variation.image.full_src );
|
$product_link.wc_set_variation_attr( 'href', variation.image.full_src );
|
||||||
} else {
|
} else {
|
||||||
$product_img.wc_reset_variation_attr( 'src' );
|
$product_img.wc_reset_variation_attr( 'src' );
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -703,6 +703,12 @@ function wc_get_product_attachment_props( $attachment_id = null, $product = fals
|
||||||
$props['full_src_w'] = $src[1];
|
$props['full_src_w'] = $src[1];
|
||||||
$props['full_src_h'] = $src[2];
|
$props['full_src_h'] = $src[2];
|
||||||
|
|
||||||
|
// Thumbnail version.
|
||||||
|
$src = wp_get_attachment_image_src( $attachment_id, 'shop_thumbnail' );
|
||||||
|
$props['thumb_src'] = $src[0];
|
||||||
|
$props['thumb_src_w'] = $src[1];
|
||||||
|
$props['thumb_src_h'] = $src[2];
|
||||||
|
|
||||||
// Image source.
|
// Image source.
|
||||||
$src = wp_get_attachment_image_src( $attachment_id, 'shop_single' );
|
$src = wp_get_attachment_image_src( $attachment_id, 'shop_single' );
|
||||||
$props['src'] = $src[0];
|
$props['src'] = $src[0];
|
||||||
|
|
Loading…
Reference in New Issue