WooCommerce „Select Option“ („Wähle eine Option“) – Text anpassen
function dropdown_variation_attribute_options( $args ){
if ( 'pa_myattribute' == $args['attribute'] ) {
$args['show_option_none'] = __( 'Select my attribute name', 'my-textdomain' );
}
return $args;
}
add_filter( 'woocommerce_dropdown_variation_attribute_options_args', 'dropdown_variation_attribute_options', 10, 1 );
Code-Sprache: PHP (php)