Skip to content

Instantly share code, notes, and snippets.

@rynaldos-zz
Last active March 23, 2021 16:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save rynaldos-zz/695d4d13897b8fbd09862f8a5a7b7be0 to your computer and use it in GitHub Desktop.
Save rynaldos-zz/695d4d13897b8fbd09862f8a5a7b7be0 to your computer and use it in GitHub Desktop.
[WooCommerce 3.0+] Remove "Choose an option" text from drop-downs
add_filter( 'woocommerce_dropdown_variation_attribute_options_args', 'wc_remove_options_text');
function wc_remove_options_text( $args ){
$args['show_option_none'] = ' ';
return $args;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment