Ian Judge
asked 8 years ago

When selecting a product thumbnail in Woocommerce the main image doesn’t change.
 
How do I:

  1. Fix the problem ? … or
  2. Remove the ‘Elevate Zoom’ feature completely ?

Regards
Ian

1 Answers
DominicStaff
answered 8 years ago

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 !

 

Powered by DW Question & Answer Pro