Created
October 18, 2019 05:02
-
-
Save hmowais/f2810bc78ace025f48ab3bc3e36a8138 to your computer and use it in GitHub Desktop.
Show Woocommerce Product Variation Label in Dropdown list
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'woocommerce_dropdown_variation_attribute_options_args', 'dropdown_label', 10 ); | |
function dropdown_label( $args ) { | |
$var_tax = wc_attribute_label( $args['attribute']); | |
$args['show_option_none'] = apply_filters( 'the_title', $var_tax ); | |
return $args; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment