Widget logic using woocommerce product category

For the product category page (which is actually a Woocommerce archive type of page) use the condition:

is_product_category( ‘shirts’ )

For the product page itself use the condition:

has_term( “shirts”, “product_cat” )