Created
October 3, 2014 08:29
-
-
Save woogist/7af8dd7c4b2493719b14 to your computer and use it in GitHub Desktop.
Change "Select Option" button text
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'woocommerce_product_add_to_cart_text' , 'custom_woocommerce_product_add_to_cart_text' ); | |
/** | |
* custom_woocommerce_template_loop_add_to_cart | |
*/ | |
function custom_woocommerce_product_add_to_cart_text( $text ) { | |
global $product; | |
$product_type = $product->product_type; | |
if ( $product_type == 'variable' ) { | |
return __( 'Select options', 'woocommerce' ); | |
} | |
return $text; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thx!