WooCommerce single products images doesn’t zoom on hover and doesn’t change clicking on gallery

my solution works for who makes a theme from zero (not using WordPress ready themes)

  1. make a Backup from your WordPress theme
  2. go to wp-content/plugins/woocommerce and find and copy a directory which name is templates into wp-content/themes/your-theme and rename it to woocommerce
  3. in your theme directory, create a file and name it woocommerce.php and add these lines in it:
<!DOCTYPE html>
<html lang="en">
<head>
    <?php get_header(); ?>
</head>
<body <?php body_class(); ?>>
    <div class="woocommerce">
        <?php woocommerce_content(); ?>
    </div>
    <?php get_footer(); ?>
</body>
</html>
  1. then add this codes to your theme functions.php :

<?php
function web_add_woocommerce_support() {
    add_theme_support( 'woocommerce' );
}
add_theme_support( 'wc-product-gallery-zoom' );
add_theme_support( 'wc-product-gallery-lightbox' );
add_theme_support( 'wc-product-gallery-slider' );
add_action( 'after_setup_theme', 'web_add_woocommerce_support' );
?>

note(1): be sure you have single.php and page.php.

note(2): be sure your <body> tags is like this: <body <?php body_class(); ?>>