A Code Snippet to Fix WooCommerce 3.0 Lightboxes
I truly love WooCommerce, but there’s one thing I don’t love about it: breaking changes. Working mostly in WordPress, breaking changes generally feel like something scary and challenging that I expect people in other environments to have to deal with—a bit like, say, cobras. The exception is WooCommerce, which brings the cobras right into my house.
When WooCommerce 3.0 launched, I wondered where the “lightbox” option had gone on one of my clients’ sites. I Googled a bit, and it turned out product lightboxes were just gone as a WooCommerce setting.
Fortunately, I also found the simple PHP code to re-enable them, and the re-enabled version is cleaner and more beautiful than ever—which, I suppose, is the bright side of breaking backwards compatibility.
If you want lightboxes, hovering zoom, and product galleries for your WooCommerce products and wonder where they went after WooCommerce 3.0, check the link below.