Skip to content

Instantly share code, notes, and snippets.

Created May 10, 2018
What would you like to do?
Change "choose an option" in WooCommerce.
//Customise the dropdown 'choose an option'
add_filter('woocommerce_dropdown_variation_attribute_options_args', 'wcvdc_dropdown_choice', 10);
// Displays the custom "Choose an option" on the front end
function custom_dropdown_choice( $args ){
global $product;
$args['show_option_none'] = "Select a: " . strtolower(wc_attribute_label($args['attribute'],$product));
return $args;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment