Change the Image Thumbnail Size
If you want to change the image size/crop used by Linked Variations, you can do so with this snippet.
By default it uses the shop_thumbnail
size.
Add it to your theme’s functions.php file, or use a Code Snippets plugin.
/**
* Iconic Linked Variations change the image size.
*
* @param string $size Image size. Example 'thumbnail', 'large' etc.
* @param WC_product $linked_variation The product object.
* @param Iconic_WLV_Linked_Variations_Group $group Linked Variation object.
*
* @return string
*/
function iconic_lv_change_image_size( $size, $linked_variation, $group ) {
return 'large';
}
add_filter( 'iconic_wlv_linked_variation_image_size' , 'iconic_lv_change_image_size', 10, 3 );
WooCommerce Linked Variations
Link a group of WooCommerce products together by attribute; a new way to handle product variations.
Was this helpful?
Please let us know if this article was useful. It is the best way to ensure our documentation is as helpful as possible.