I try to change the value of "Select a option" to the attributes names. So in a dropdown where you could select the color it should be the name color as the first one. So far it worked with this code snippet
add_filter( 'woocommerce_dropdown_variation_attribute_options_args', 'cinchws_filter_dropdown_args', 10 );
function cinchws_filter_dropdown_args( $args ) {
$var_tax = get_taxonomy( $args['attribute'] );
$args['show_option_none'] = apply_filters( 'the_title', $var_tax->labels->name );
return $args;
}
The Problem that I have now is that it shows "Product Color" or "Product Material", so it adds a product before the attribute value. How can I get only the Attribute Value?