Created
May 19, 2015 13:58
-
-
Save WillBrubaker/154cec18cd060246d9a8 to your computer and use it in GitHub Desktop.
Conditionally change 'read more' to 'book now' if a bookable product
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', 'wooninja_read_more_text', 10, 2 ); | |
function wooninja_read_more_text( $text, $product ) { | |
if ( 'booking' == $product->product_type ) { | |
$text = 'Book Now'; | |
} | |
return $text; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment