• Hello Emran,

    thank you for creating this awesome plugin!
    Might I suggest a slight change to the plugin logics?

    My customers complaint about “weird behavior” of the plugin.

    If a variation has no gallery images but has an image, the plugin would still display the gallery images of the parent product.

    In our case this for instance led to a mix of colors: https://ibb.co/wwGgrCs

    Our implemented solution looks as follows:

    /**WooCommerce Product Gallery Fix*/
    add_filter('woo_variation_gallery_available_variation_gallery',function($available_variation, $variation, $product_id){
    
    
        if(empty($variation->get_gallery_image_ids()) && !empty($available_variation['image'])){
    
            $available_variation['variation_gallery_images'] = [$available_variation['image']];
    
        }
    
        return $available_variation;
    
    
    },100,3);

    This way the Gallery Thumbnails are removed and only the variation image is displayed.

    Maybe you would consider to make this a default behavior – or at least a setting?

    Thank’s again for your work!!!

    Yours,
    Ilja

Viewing 1 replies (of 1 total)
  • Plugin Support fizanzvai

    (@fizanzvai)

    Hi,

    Thanks for reaching out to us and sharing the code snippet.

    I will forward this to our development team and will let you know their feedback on this matter.

    Thanks

Viewing 1 replies (of 1 total)
  • The topic ‘Suggestion: Do not display default images if variation has no gallery’ is closed to new replies.