1// verify that this is a product category page
2if ( is_product_category() ){
3 global $wp_query;
4
5 // get the query object
6 $cat = $wp_query->get_queried_object();
7
8 // get the thumbnail id using the queried category term_id
9 $thumbnail_id = get_woocommerce_term_meta( $cat->term_id, 'thumbnail_id', true );
10
11 // get the image URL
12 $image = wp_get_attachment_url( $thumbnail_id );
13
14 // print the IMG HTML
15 echo "<img src='{$image}' alt='' width='762' height='365' />";
16}