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

Help with image change on color swatch selection – product page

Lisa Alpert

I have the plugin installed and configured.  I have two attributes, color and power. On the product page, the image changes correctly when the color swatch is selected, regardless of whether or not a power has been selected. So that’s all working as expected.

However, I want to disable product zoom and lightbox functionality from the product pages. The code I added to the functions.php file has accomplished that, but disabling the lightbox seems to also disable the image switch featured when selecting a color swatch.

This is the code I used to disable the lightbox feature, whereupon the image opens larger when clicked:

add_filter(‘woocommerce_single_product_image_thumbnail_html’,’wc_remove_link_on_thumbnails’ );
function wc_remove_link_on_thumbnails( $html ) {
return strip_tags( $html,'<img>’ );
}

Do you have a way for me to have both the image swap and the disabled lightbox?

Thank you!

Golam Kibria

Hi Lisa,

We apologize for the inconvenience.

Unfortunately, the shared credential did not work.

Please give us temporary admin access to your site.

We will investigate the issue for you.

You can use this plugin to create a passwordless temporary admin access link.

Once created, please share the link here.

Hope to hear from you soon.

Thank You