Reputation: 591
I am modifying the woocommerce plugin and I am trying to have the product image and the thumbnails the same size (full size which is set at 400x600).
the product_thumbnails.php calls the 180x180 thumbnail however and I have not been able to find the codex for different sizes. Does anyone know how I can call the full size 400x600 image instead of the 180x180?
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++;
}
I have been trying to modify this line to no avail:
wp_get_attachment_image( $attachment_id, apply_filters( 'single_product_small_thumbnail_size', 'shop_thumbnail' ), 0, $props )
Upvotes: 0
Views: 662
Reputation: 124
Seeing This site, you can easily use the following:
// define the single_product_small_thumbnail_size callback
function filter_single_product_small_thumbnail_size( $shop_catalog ) {
return 'full';
}; // add the filter
add_filter( 'single_product_small_thumbnail_size', 'filter_single_product_small_thumbnail_size', 99, 1 );
You need to copy this in your theme functions.php
and everywhere that WOO displays the product thumbnail it should give you the full size image instead.
Upvotes: 1