Title: Changes back to primary image
Last modified: September 1, 2016

---

# Changes back to primary image

 *  [Shaan Nicol](https://wordpress.org/support/users/chillybin/)
 * (@chillybin)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/changes-back-to-primary-image/)
 * The Zoom function is working fine, but when hovering over or selecting another
   image, the featured image is being replaced with the main image, not the selected
   image from the thumbnails
 * In this example, if you select the black image, then hover over, the featured
   image will stay with the primary image, but it will zoom the correct image. The
   featured image should be replaced as well – [https://dl.dropboxusercontent.com/u/931439/YITH.mov](https://dl.dropboxusercontent.com/u/931439/YITH.mov)
 * [https://wordpress.org/plugins/yith-woocommerce-zoom-magnifier/](https://wordpress.org/plugins/yith-woocommerce-zoom-magnifier/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [YITHEMES](https://wordpress.org/support/users/yithemes/)
 * (@yithemes)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/changes-back-to-primary-image/#post-7622320)
 * Hi,
    it seems to be related to variable products with several variations, try
   the following code(to be entered in the functions.php file inside your theme 
   folder):
 *     ```
       function custom_wc_ajax_variation_threshold( $qty, $product ) {
       return 50; // set your own limit
       }
   
       add_filter( 'woocommerce_ajax_variation_threshold', 'custom_wc_ajax_variation_threshold', 10, 2 );
       ```
   
 *  [vaneeka](https://wordpress.org/support/users/vaneeka/)
 * (@vaneeka)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/changes-back-to-primary-image/#post-8149536)
 * Hello there, I have the same problem. I’m working with a plugin that allow me
   to show the product in different color variant. If I select an other color variant
   the zoom display the featured image. I tried to add your script in function.php
   file of my theme but still doesn’t working..
    This is the link of the website
   [http://www.bordegoni-lab.com/monfrini/prodotto/new-sauvage-collection/](http://www.bordegoni-lab.com/monfrini/prodotto/new-sauvage-collection/)
 * Thenk you a lot for your attention!

Viewing 2 replies - 1 through 2 (of 2 total)

 The topic ‘Changes back to primary image’ is closed to new replies.

 * ![](https://ps.w.org/yith-woocommerce-zoom-magnifier/assets/icon.svg?rev=3055439)
 * [YITH WooCommerce Product Gallery & Image Zoom](https://wordpress.org/plugins/yith-woocommerce-zoom-magnifier/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/yith-woocommerce-zoom-magnifier/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/yith-woocommerce-zoom-magnifier/)
 * [Active Topics](https://wordpress.org/support/plugin/yith-woocommerce-zoom-magnifier/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/yith-woocommerce-zoom-magnifier/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/yith-woocommerce-zoom-magnifier/reviews/)

 * 2 replies
 * 3 participants
 * Last reply from: [vaneeka](https://wordpress.org/support/users/vaneeka/)
 * Last activity: [10 years, 1 month ago](https://wordpress.org/support/topic/changes-back-to-primary-image/#post-8149536)
 * Status: not resolved