2016-09-01 5 views
0

woocommerce 플러그인을 수정하고 있으며 제품 이미지와 축소판의 크기가 동일합니다 (전체 크기는 400x600으로 설정 됨).Woocommerce 이미지 대체 크기

그러나 product_thumbnails.php는 180x180 크기의 미리보기 이미지를 호출하지만 다른 크기의 코덱을 찾을 수 없었습니다. 누구든지 180x180 대신 전체 크기 400x600 이미지를 호출 할 수있는 방법을 알고 있습니까?

 echo apply_filters(
      'woocommerce_single_product_image_thumbnail_html', 
      sprintf(
       '<a href="%s" class="%s" title="%s" data-rel="prettyPhoto[product-gallery]">%s</a>', 
       esc_url($props['url']), 
       esc_attr($image_class), 
       esc_attr($props['caption']), 
       wp_get_attachment_image($attachment_id, apply_filters('single_product_small_thumbnail_size', 'shop_thumbnail'), 0, $props) 
      ), 
      $attachment_id, 
      $post->ID, 
      esc_attr($image_class) 
     ); 

     $loop++; 
    } 

내가 아무 소용이 줄을 수정하려고되었습니다

wp_get_attachment_image($attachment_id, apply_filters('single_product_small_thumbnail_size', 'shop_thumbnail'), 0, $props) 

답변

0

This site보고를, 당신은 쉽게 다음을 사용할 수 있습니다

// single_product_small_thumbnail_size 콜백을 정의

function filter_single_product_small_thumbnail_size ($ shop_catalog) {

반품 '전체';

}}; //하는 필터를

add_filter ('single_product_small_thumbnail_size', 'filter_single_product_small_thumbnail_size', 99, 1)에 추가;

테마 functions.php에 복사해야하며 WOO가 제품 축소판을 표시하는 모든 곳에서 전체 크기 이미지를 대신 제공해야합니다.

관련 문제