WordPress.org

Forums

WooCommerce - excelling eCommerce
get variations description on product page (1 post)

  1. jnz31
    Member
    Posted 2 years ago #

    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.
    thanks
    jens

    http://wordpress.org/plugins/woocommerce/

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce - excelling eCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic