Corrected Issue with Variants
-
Hi,
Thanks for the work and effort you put in the plugin.
I’ve found an issue with the Variants and their images on WooCommerce 3.1.1.For 3.1.1 WooCommerce doesn’t use image_src, instead it uses an array for image, so the correct way to call the images is not
$get_available_variations[$i]['image_src']
but$get_available_variations[$i]['image']['src']
I’ve adjusted this on lines 97,110 and 111 on amp-woocommerce.php and my variants are showing again.
97:
<div class="amp-buttons <?php if($get_available_variations[$i]['image']['src']) { ?><?php } else { ?>ampwc-noimg-varients<?php } ?>">
110-111:
<?php if($get_available_variations[$i]['image']['src']) { ?> <amp-img src="<?php echo $get_available_variations[$i]['image']['src'];?>" height="500" layout="responsive" width="500">
- The topic ‘Corrected Issue with Variants’ is closed to new replies.