Support » Plugin: WooCommerce » get variations description on product page

  • hi
    im stuck here. im able to get all the available variations on my front page. i want to list them and show which variation is available (works). on mouseover i want a tooltip to be explain the variation a bit further. but i dont know, how to get the description to each variation.

    here is the code, i have so far. a title attribute would be noice.

    $available_variations = $product->get_available_variations();
    foreach ( $available_variations as $variation ) {
    	echo $variation['is_in_stock'] ? "<div class=\"variation\">\n" : "<div class=\"variation out_of_stock\">\n";
    	echo array_shift(array_values($variation['attributes'])) . "\n";
    	echo "</div>\n";

    any hint is much appreciated.

  • The topic ‘get variations description on product page’ is closed to new replies.