title: Woocommerce got Fatal error: Uncaught Error: Call to undefined method WooCommerce::get_image_size()
body: <p>I have an old theme and I think it is not compatible with the new version of woocommerce anymore. my website is showing error</p>
  
  <blockquote>
    <p>Fatal error: Uncaught Error: Call to undefined method
    WooCommerce::get_image_size() in
    /home3/lohasfarms/public_html/adohrmilkcream.com/wp-content/themes/AdohrMilkCream/woocommerce/single-product/product-thumbnails.php:16
    Stack trace: #0
    /home3/lohasfarms/public_html/adohrmilkcream.com/wp-content/plugins/woocommerce/includes/wc-core-functions.php(211):
    include() #1
    /home3/lohasfarms/public_html/adohrmilkcream.com/wp-content/plugins/woocommerce/includes/wc-template-functions.php(1053): wc_get_template('single-product/...') #2
    /home3/lohasfarms/public_html/adohrmilkcream.com/wp-includes/class-wp-hook.php(286):
    woocommerce_show_product_thumbnails('') #3
    /home3/lohasfarms/public_html/adohrmilkcream.com/wp-includes/class-wp-hook.php(310):
    WP_Hook->apply_filters('', Array) #4
    /home3/lohasfarms/public_html/adohrmilkcream.com/wp-includes/plugin.php(453):
    WP_Hook->do_action(Array) #5
    /home3/lohasfarms/public_html/adohrmilkcream.com/wp-content/themes/AdohrMilkCream/woocommerce/single-product/product-image.php(36):
    do_action('woocom in
    /home3/lohasfarms/public_html/adohrmilkcream.com/wp-content/themes/AdohrMilkCream/woocommerce/single-product/product-thumbnails.php
    on line 16</p>
  </blockquote>
  
  <p>Could you help to find out what should I do for this issue?</p>
  
  <p>This is my code for /public_html/adohrmilkcream.com/wp-content/themes/AdohrMilkCream/woocommerce/single-product/product-thumbnails</p>
  
  <pre><code> &lt;?php
  /**
   * Single Product Image
   */
  
  global $post, $woocommerce, $product;
  
  // if less than 2.0
  if ( version_compare( WOOCOMMERCE_VERSION, '2.0', '&lt;' ) ) { 
      //$image_width = get_option( 'woocommerce_single_image_width' );
      //$image_height = get_option( 'woocommerce_single_image_height' );
  } else {            
      $image_sizes = $woocommerce-&gt;get_image_size( 'shop_single' );
      $image_width = $image_sizes['width'];
      $image_height = $image_sizes['height'];
  }
  
  ?&gt;
  &lt;div class="imagecol images"&gt;
      &lt;?php if ( has_post_thumbnail() ) : ?&gt;
  
          &lt;a data-rel="prettyPhoto[&lt;?php echo $post-&gt;ID; ?&gt;]" href="&lt;?php echo sp_get_image($post-&gt;ID); ?&gt;" class="zoom thickbox preview_link" title="&lt;?php the_title_attribute(); ?&gt;" data-id="&lt;?php echo $post-&gt;ID; ?&gt;" onclick="return false;"&gt;
          &lt;img width="&lt;?php echo $image_width; ?&gt;" height="&lt;?php echo $image_height; ?&gt;" class="product_image attachment-shop_single wp-post-image" alt="&lt;?php the_title_attribute(); ?&gt;" src="&lt;?php echo sp_timthumb_format('single_main', sp_get_image($post-&gt;ID), $image_width, $image_height); ?&gt;" /&gt;
          &lt;/a&gt;
  
      &lt;?php else : ?&gt;
  
          &lt;a data-rel="prettyPhoto[&lt;?php echo $post-&gt;ID; ?&gt;]" class="zoom thickbox preview_link" href="&lt;?php echo get_template_directory_uri(); ?&gt;/images/no-product-image.jpg" title="&lt;?php the_title_attribute(); ?&gt;" data-id="&lt;?php echo $post-&gt;ID; ?&gt;" onclick="return false;"&gt;
          &lt;img class="no-image" alt="No Image" title="&lt;?php the_title_attribute(); ?&gt;" src="&lt;?php echo sp_timthumb_format('single_main', get_template_directory_uri().'/images/no-product-image.jpg', $image_width, $image_height); ?&gt;" width="&lt;?php echo $image_width; ?&gt;" height="&lt;?php echo $image_height; ?&gt;" /&gt;
          &lt;/a&gt;
  
      &lt;?php endif; ?&gt;            
    &lt;?php 
        global $main_image_height; 
        $main_image_height = $image_height;   
        do_action('woocommerce_product_thumbnails');
    ?&gt;
  &lt;/div&gt;&lt;!--close imagecol--&gt;
  </code></pre>
  
  <p>Thank you so much</p>