Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

wp wc get_available_variations name not slug

    foreach ($product->get_available_variations() as $variation) {
        foreach (wc_get_product($variation['variation_id'])->get_variation_attributes() as $attr) {
            echo '<pre>'; var_dump(wc_attribute_label( $attr )); echo '</pre>';
        }

    }
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #wp #wc #slug
ADD COMMENT
Topic
Name
4+6 =