Skip to content

Instantly share code, notes, and snippets.

@woogist
Created October 3, 2014 08:29
Show Gist options
  • Save woogist/7af8dd7c4b2493719b14 to your computer and use it in GitHub Desktop.
Save woogist/7af8dd7c4b2493719b14 to your computer and use it in GitHub Desktop.
Change "Select Option" button text
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;
}
@msjoker
Copy link

msjoker commented Feb 13, 2017

Thx!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment