Skip to content

Instantly share code, notes, and snippets.

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 stuartduff/ab7c3ab41883a6b2798115aa13fd2b17 to your computer and use it in GitHub Desktop.
Save stuartduff/ab7c3ab41883a6b2798115aa13fd2b17 to your computer and use it in GitHub Desktop.
Change the text for the Select Options button when using Composite Products
add_filter( 'woocommerce_product_add_to_cart_text', function( $text ) {
global $product;
if ( $product->is_type( 'composite' ) ) {
$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