Q:

Use different size thumbnails for subcategories and products in Woocommerce

I need to set a different size of thumb for subcategory and product, is this possible?  
I need to show a list of subcategories with thumb 500 x 100 and a list of products with thumbnail 300 x 390. 
I have already setting in woocommerce> setting > product > display > Product images but i cannot set a different size for subcategory or product. 

A:

lol i develop a clean solution:
function register_size_image() {
   add_image_size( 'category_thumb', 1170, 585,true );
   add_image_size( 'product_thumb', 750, 940,true );
}

add_action( 'after_setup_theme', 'register_size_image' );

function size_of_category_thumb($u)
{
    return array(1170, 585,true);
}
add_filter('subcategory_archive_thumbnail_size', 'size_of_category_thumb');

function size_of_product_thumb($u)
{
    return array(750, 940,true);
}
add_filter('single_product_archive_thumbnail_size', 'size_of_product_thumb');

