Could you help me a little? I used this snippet, is working well.
add_action( 'woocommerce_single_product_summary', 'product_attribute_dimensions', 45 );
function product_attribute_dimensions(){
global $product;
$taxonomy = 'pa_dimensions';
$value = $product->get_attribute( $taxonomy );
if ( $value ) {
$label = get_taxonomy( $taxonomy )->labels->singular_name;
echo '<p>' . $label . ': ' . $value . '</p>';
}
}
https://stackoverflow.com/a/49602770/17244939
But I can't figure, how I can display the attribute attached image and not the text. Could you help me?