I have just updated a client’s woocommerce to 3.0.0 and suddenly the gallery function was gone. So we need to enable woocmmerce single product gallery.
Good news!!!; the new gallery has 3 separate features, that you can enable individually:
- Lightbox
- Slider
- Image zoom / magnification
If you have a custom theme or your theme is not fully compatible with woocommerce you have to add theme support.
Open your functions.php file in your theme (if you are using a commercial theme, make sure you do this in a child theme, otherwise it will be lost in your next theme update) and add the following code;
function themename_wc_support() { add_theme_support( 'wc-product-gallery-zoom' ); add_theme_support( 'wc-product-gallery-lightbox' ); add_theme_support( 'wc-product-gallery-slider' ); } add_action( 'after_setup_theme', 'themename_wc_support' );
update themename with your theme name and this should do the trick.
You might need to update your css if you see thumbnails without margin.