Skip to content

Instantly share code, notes, and snippets.

@michelmany
Created November 4, 2020 21:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michelmany/f1de199829006dc076b1a585ee54a093 to your computer and use it in GitHub Desktop.
Save michelmany/f1de199829006dc076b1a585ee54a093 to your computer and use it in GitHub Desktop.
How to Change WooCommerce “Select Options” Text
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 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment