Wordpress

Woocommerce 3.0 – Where did the lighbox option go?

I was quite surprised when I found out that my product lightbox function was not working on the latest Woocommerce update. If you are like me then your theme does not support the built in gallery features of the new Woocommerce update.

The new update does not have the lightbox option on the backend because (believe or not) it is now a built in function on Woocommerce, should be great right? However, if you have an old/outdated Woocommerce template most likely it does not yet support the new built in feature.

Good news is that the Woocommerce team released a code snippet that will allow our themes to support this new feature. All you have to do is add this piece of code on your theme function.php file:

add_action( 'after_setup_theme', 'yourtheme_setup' );

function yourtheme_setup() {
add_theme_support( 'wc-product-gallery-zoom' );
add_theme_support( 'wc-product-gallery-lightbox' );
add_theme_support( 'wc-product-gallery-slider' );
}

That’s it! Your product lightbox and zoom functions are up and running again!

Tagged , ,