Created
April 12, 2019 09:25
-
-
Save eksiscloud/5376e0a01e81d99d2c0a977a3882c02a to your computer and use it in GitHub Desktop.
Change first option in dropdownlist of variations at Woocommerce to some default text
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
// This snippet must be more or less public domain, because you can find it from several sources | |
// It is not coded by me, I just copied the snippet from somewhere | |
// Paste it in functions.php or use some custom functions plugin like Code Snippet | |
add_filter( 'woocommerce_dropdown_variation_attribute_options_args', 'ec_filter_dropdown_args', 10 ); | |
function ec_filter_dropdown_args( $args ) { | |
$args['show_option_none'] = 'Choose...'; | |
return $args; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment