WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. jnz31
    Member
    Posted 11 months 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/

Reply

You must log in to post.

About this Plugin

About this Topic