I would like to remove from the dropdown of variations in WooCommerce product page following "option":
I found plenty of, apparently not working codes which should do the job. Probably outdated to the latest WooCommerce version.
What I tried and is partially working:
add_filter( 'woocommerce_dropdown_variation_attribute_options_args', 'my_wc_filter_dropdown_args', 10 );
function my_wc_filter_dropdown_args( $args ) {
$args['show_option_none'] = '';
return $args;
}
This is only working when I set some text between '', not empty. When it's added into functions.php exactly like above, it's without change and set to default text - "Select an option" like on the picture. I am not sure what's wrong here. I also tried "false" or "none" but didn't work with either option.
If anyone could help me with this I would be grateful.
I am using latest WP 4.9.6 and latest of WooCommerce (whatever version it is). Everything is updated to the latest version, even PHP (7.2).