Linked Variations
Change the Image Thumbnail Size
Coming soon: Iconic Linked Variations is becoming part of Kadence Shop Kit. You may see both names used while we update the product, documentation, and customer experience.
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 );
Filed under
Uncategorized
Was this page helpful?
Thanks for the feedback!