jQuery(function($) { function ribierFixGallery() { $('.woocommerce-product-gallery').each(function() { var $gallery = $(this); if ($gallery.css('opacity') !== '1') { $gallery.css({ 'opacity': '1', 'transition': 'none' }); } }); } // Si l'event WooCommerce se déclenche normalement, on force quand même par sécurité $(document.body).on('wc-product-gallery-after-init', ribierFixGallery); // Filet de sécurité si l'event est loupé (le bug qu'on a identifié) setTimeout(ribierFixGallery, 1200); setTimeout(ribierFixGallery, 3000); });