Title: Corrected Issue with Variants
Last modified: August 3, 2017

---

# Corrected Issue with Variants

 *  [jmdev](https://wordpress.org/support/users/jmdev/)
 * (@jmdev)
 * [9 years ago](https://wordpress.org/support/topic/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">
       ```
   
    -  This topic was modified 9 years ago by [jmdev](https://wordpress.org/support/users/jmdev/).
    -  This topic was modified 9 years ago by [jmdev](https://wordpress.org/support/users/jmdev/).
      Reason: clarity

The topic ‘Corrected Issue with Variants’ is closed to new replies.

 * ![](https://ps.w.org/amp-woocommerce/assets/icon-256x256.png?rev=1516308)
 * [AMP WooCommerce](https://wordpress.org/plugins/amp-woocommerce/)
 * [Support Threads](https://wordpress.org/support/plugin/amp-woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/amp-woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/amp-woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/amp-woocommerce/reviews/)

## Tags

 * [images](https://wordpress.org/support/topic-tag/images/)
 * [variants](https://wordpress.org/support/topic-tag/variants/)

 * 0 replies
 * 1 participant
 * Last reply from: [jmdev](https://wordpress.org/support/users/jmdev/)
 * Last activity: [9 years ago](https://wordpress.org/support/topic/corrected-issue-with-variants/)
 * Status: not resolved