Answers for "wp wc get_available_variations name not slug"

0

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>';
        }

    }
Posted by: Guest on July-12-2021

Browse Popular Code Answers by Language