I’ve been using GeneratePress Premium for years now and love it. Two years ago a added Elementor to my builds. I recently discovered a conflict when I built a new site using the Theme Builder feature from Elementor. I made templates for Product Archives and Single Product. The client wanted the GP ‘zoom on hover’ feature removed. I found a snippet on this forum to remove the zoom on hover but then discovered I got 2 lightboxes when I clicked on the main image. I tried deactivating woocommerce from the GP Premium tools to get rid of the extra lightbox but that didn’t work. I found another snippet on this forum that would remove the lightbox. I now put them together and everything seems to work as intended.
Is this the best solution?
function remove_image_zoom_lbox_support() {
remove_theme_support( 'wc-product-gallery-zoom' );
remove_theme_support( 'wc-product-gallery-lightbox' );
}
add_action( 'wp', 'remove_image_zoom_lbox_support', 100 );