- Web templates
- E-commerce Templates
- CMS & Blog Templates
- Facebook Templates
- Website Builders
WooCommerce. How to change “Select options” text
October 26, 2015
This tutorial will show you how to change Select options text in WooCommerce templates.
WooCommerce. How to change “Select options” text
Here is the Select Options text that you can find on the Shop page or products archive page:
We will replace this text with some other text.
-
Log into the host control panel (cPanel), go to File Manager:
Locate the root directory of wordpress site.
-
Go to wp-content/themes/themeXXXXX/includes directory. Open custom-function.php file to edit:
In the bottom of this file, before closing code ?>, we will need to add the following codes:
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; } }
You can see Options text, this text will replace the current Select Options text at the front end. If you need some other text, you can replace this text. Save the file.
-
Refresh the shop page/archive page to see the new text:
Feel free to check the detailed video tutorial below: