I have custom tab on each product variation with some 'variation description' static content and that I have displayed on product page as well in > product summary when I select a variation (like in this link).
And now I need to display the same on shop page in product loop (see my shop page).
OR even better to display specific attributes. I tried this code:
add_action( 'woocommerce_after_shop_loop_item', 'custom_before_title' );
function custom_before_title() {
global $product;
echo '<h4><b>Seizoen:</b>' . $product->get_attribute('pa_seizoen') .'</h4>';
echo '<h4><b>Maat:</b> ' . $product->get_attribute('pa_maat') .'</h4>';
echo '<h4><b>Tijk:</b> ' . $product->get_attribute('pa_tijk-weving') .'</h4>';
echo '<h4><b>Vulkracht:</b> ' . $product->get_attribute('pa_fullkraft[') .'</h4>';
echo '<h4><b>Vulkracht:</b> ' . $product->get_attribute('pa_vulling') .'</h4>';
}
But whatever I do I get same result, it displays only product attributes that are in the product variations: first two "season and size".
Any help is appreciated.