WooCommerce Variation Swatches and Photos – get attribute thumbnail
I resolved it by using get_woocommerce_term_meta $terms = get_terms( array( ‘taxonomy’ => ‘pa_texture’, ‘hide_empty’ => false, )); foreach ( $terms as $term ) : $thumbnail_id = get_woocommerce_term_meta( $term->term_id, ‘pa_texture_swatches_id_photo’, true ); $textureImg = wp_get_attachment_image_src( $thumbnail_id, ‘full’ ); ?> <img src=”https://wordpress.stackexchange.com/questions/274247/<?php echo $textureImg[0]; ?>”> endforeach;