Created
November 4, 2020 21:02
-
-
Save michelmany/f1de199829006dc076b1a585ee54a093 to your computer and use it in GitHub Desktop.
How to Change WooCommerce “Select Options” Text
This file contains 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', 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