This topic has 4 replies, 2 voices, and was last updated 4 years, 5 months ago ago by Olga Barlow
Hi
I can’t seem to figure out where I can change the button text “Select Options” as seen in the attached image.
https://urbanjewls.com/wp-content/uploads/2020/06/Skærmbillede-2020-06-29-kl.-13.51.17.png
Hello,
Either use translation files of the WooCommerce plugin and instead of the translation just edit the text to what you need. Or use child theme and add the following code to child theme functions.php
add_filter( 'woocommerce_product_add_to_cart_text' , 'custom_woocommerce_product_add_to_cart_text' );
function custom_woocommerce_product_add_to_cart_text() {
global $product;
$product_type = $product->product_type;
switch ( $product_type ) {
case 'variable':
return __( 'Options', 'woocommerce' );
break;
}
}
Regards
Thanks for the fast respond but it gives me an error when i add it to the functions.php and when i try to change the string in Loco Translate it does not apply. So what can i do?
Hello,
Provide us with temporary WP Dashboard access to your site and tell me what should be instead of the default “Select Options”? I’ll check and try to help you.
Regards
You must be logged in to reply to this topic.Log in/Sign up