How to Change WooCommerce “Select Options” text in WooCommerce

January 27, 2020 0 comments
default placeholder

add_filter( ‘woocommerce_product_single_add_to_cart_text’, ‘woo_custom_single_add_to_cart_text’ );
add_filter( ‘woocommerce_product_add_to_cart_text’, ‘woo_custom_single_add_to_cart_text’ );
function woo_custom_single_add_to_cart_text() {

return __( ‘ajouter au panier’, ‘woocommerce’ );

}

// define the woocommerce_dropdown_variation_attribute_options_args callback
function filter_woocommerce_dropdown_variation_attribute_options_args( $array ) {

// Find the name of the attribute for the slug we passed in to the function
$attribute_name = wc_attribute_label($array[‘attribute’]);

// Create a string for our select
// $select_text = ‘Select a ‘ . $attribute_name;

$array[‘show_option_none’] = __( ‘personnaliser’, ‘woocommerce’ );
return $array;
};

// add the filter
add_filter( ‘woocommerce_dropdown_variation_attribute_options_args’, ‘filter_woocommerce_dropdown_variation_attribute_options_args’, 10, 1 );

Ashok kuikel

Ashok Kuikel is DevOps Engineer(Cloud Computing and Cyber Security), Entrepreneur working on Socio-Economic Development via Technology

He has been actively contributing as Joint Secretary of Federation of Computer Association of Nepal Kavre Chapter. Beside that, he is an official Global Peace Ambassador for Global Peace Chain, Nepal Chapter and Member of Internet Society, Nepal Chapter.

Above all, he enjoys learning about new trends and technologies and loves to share innovative ideas to contribute for the growth of the industry.

You can follow me on Social Media, GitHub, and via my Blog Channels.

Leave a Reply

Articles and Tutorials

We love writing about WordPress and latest plugins tutorials, WooCommerce stats, and much more.