Tell me how to get the name of the product attribute in woocommerce by its (attribute, meaning) slug or id?

    1 answer 1

    Use this code:

    $attr_slug = 'color;' $product->get_attribute( 'pa_' . $attr_slug );