When selecting a product thumbnail in Woocommerce the main image doesn’t change.
How do I:
- Fix the problem ? … or
- Remove the ‘Elevate Zoom’ feature completely ?
Regards
Ian
1 Answers
To resolve this issue, You can add the following code to the functions.php
file:
add_filter('wp_get_attachment_image_attributes', function($attr) {
if (isset($attr['sizes'])) unset($attr['sizes']);
if (isset($attr['srcset'])) unset($attr['srcset']);
return $attr;
}, PHP_INT_MAX);
add_filter('wp_calculate_image_sizes', '__return_false', PHP_INT_MAX);
add_filter('wp_calculate_image_srcset', '__return_false', PHP_INT_MAX);
remove_filter('the_content', 'wp_make_content_images_responsive');
Hope this helps !
Please login or Register to submit your answer