...
WooCommerce, Wordpress

How to change all attribute variations to custom text

07 March 2019

Here, I would like to show you how to change all attribute variations to custom text?

This code is mainly use for the change of default text of drop-down instead of “choose an option” text to you own text.

If you have only single variation across your shop you can easily change the all drop-down text using simple worpdress filter. Add the following code to you “functions.php” file.

add_filter( 'woocommerce_dropdown_variation_attribute_options_args', 'cinchws_filter_dropdown_args', 10 );

function cinchws_filter_dropdown_args( $args ) {
    $args['show_option_none'] = 'Choose your kitty weight';
    return $args;
}

Leave a Comments