Change Select Options Text in WooCommerce Plugin

How to change the text “Select Options” in WooCommerce Plugin

Changing the “Select Options” Text in WooCommerce is quite simple:

First we’re going to assume that you’re using a child theme or the Code Snippets plugin in your WooCommerce site.

Next we’re going to add the following code to your site: (again, do NOT put this in your main theme’s files!):

add_filter( 'woocommerce_product_add_to_cart_text', function( $text ) {
	global $product;
	if ( $product->is_type( 'variable' ) ) {
		$text = $product->is_purchasable() ? __( 'Custom options text', 'woocommerce' ) : __( 'Read more', 'woocommerce' );
	}
	return $text;
}, 10 );

Now, see the part that says ‘Custom options text’?

Also, see the part that says ‘Read more’ as well?

Replace that text with the text you would like.

Be absolutely sure that you do not modify or delete the surrounding single quote ‘

If you do accidently remove one of those quotes, remember that those quotes are not the one at the top left of your keyboard, but instead, that is the quote that is normally directly between your right pinky and the enter button.

 

THOUGHT FILLED NEWS, TIPS, OPTIMIZATION GUIDES, SECURITY UPDATES FOR EVERY WOOCOMMERCE STORE OWNER

CLICK REPLY ANYTIME! NO QUESTIONS OFF LIMITS.
Howdy! I'm Brad. After 10 Years of WooCommerce Store Owners, Creating Sites, Implementing WorkFlows, Shipping, Growing Customers, and more... I share EVERYTHING possible with as many people I can. Will you Join Us?
JOIN US TODAY
Spam-less Crafted Wisdom for Your WooCommerce Journey!

Lost your password? Please enter your email address. You will receive mail with link to set new password.

close

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.