fbpx
Want To Add Extra Images Per Product Variation For Free? Download Now

Zoom and popup not working with Woodmart

Tobias Purro

Hi,

Zoom and popup not working with Woodmart whereas it’s a famous template so I don’t understand

Thanks for your feedback

Hakik Zaman

Hi Tobias,

Thanks for reaching out to us.

Our Zoom & Popup will not work if your theme removes the following supports:

add_theme_support( 'wc-product-gallery-zoom' );
add_theme_support( 'wc-product-gallery-lightbox' );

So, your theme must have the above supports to get them into work.

If you have a child theme, please add the above support like the following:

add_action( 'after_setup_theme', function(){
add_theme_support( 'wc-product-gallery-zoom' );
add_theme_support( 'wc-product-gallery-lightbox' );
}, 99 );

Then try again.

Thank You

Tobias Purro

Hi,

I added it but it does not change anything

The template Woodmart does not remove these hook

Zoom is working but not the click on the enlarge icon

Hakik Zaman

Hi Tobias,

Unfortunately, WoodMart has modified the photoswipe as per their needs.

Please add the below snippet using the Code Snippets plugin-

add_action( 'woo_variation_product_gallery_slider_start', function(){
woodmart_enqueue_js_library( 'photoswipe-bundle' );
woodmart_enqueue_inline_style( 'photoswipe' );
woodmart_enqueue_js_script( 'product-images' );
} );

Then let me know how it goes. Hope to hear from you soon.

Thank You