This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This thread is resolved. Here is a description of the problem and solution.

Problem: Inside WooCommerce, how to change the string "Select Options"?

Solution: To change this string that was defined within WooCommerce, you must use a custom code. You can see in the link below the tip that was given to the client.

Relevant Documentation: https://wpml.org/forums/topic/string-select-options/#post-1277627 https://docs.woocommerce.com/document/change-add-to-cart-button-text/

This topic contains 2 replies, has 2 voices.

Last updated by benjamin 2 years, 4 months ago.

Assigned support staff: Bruno.

Author Posts
May 16, 2017 at 12:58 pm #1277200

benjamin

Hello WPML

URL: hidden link

I am trying to: change the string "Select option" on the product: Piballa Travel
like:"Change color", "Farbe wählen" ... and so on
I can not find this string!

thanks for your assitance
ben

May 16, 2017 at 7:47 pm #1277627

Bruno
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello,

Thank you for contacting us.

Are the strings that are located in WooCommerce been added in English?

If these strings were added in English, then you can not change them by String Translation. In this case, you should use a WooCommerce filter to change this string. You can see step-by-step in the WooCommerce documentation: https://docs.woocommerce.com/document/change-add-to-cart-button-text/

Here is a small example for you to see (this function should be added inside the functions.php file of your theme:

add_filter( 'woocommerce_product_add_to_cart_text', function( $string, $object ) {

	if( count( $object->attributes ) >= 1 && $object->is_purchasable() ) {
		return  __( 'Change color', 'woocommerce' );
	}

	return $string;

}, 10, 2);

Then, inside the WPML > String Translation page, you can translate the string "Change color".

Please, let me know if I can help with any other questions you may have.

Thank you.

May 16, 2017 at 8:11 pm #1277636

benjamin

great, thanks
thats all 4 now