Created
April 20, 2016 13:43
-
-
Save stuartduff/a1ea175d0538c8ca6d5d9d815397f03f to your computer and use it in GitHub Desktop.
Change WooCommerce Bookings single add to cart text "Book Now"
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
function change_booking_single_add_to_cart_text() { | |
echo 'Changed Text'; | |
} | |
add_filter( 'woocommerce_booking_single_add_to_cart_text','change_booking_single_add_to_cart_text' ); |
Thank you so much @stuartduff for posting this...I realize it's been six years but it actually worked when I placed it in the functions.php file of my child theme. I'm so happy to be done with figuring that out that I created a GitHub account just to thank you 😁
@datmt Yeah and that plugin is $29/year. Or I can just get it here for free. Why would I even...
A filter function should normally return a string, not echo it...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Great! I found a plugin here that does the same thing https://wordpress.org/plugins/custom-add-to-cart-button-for-woocommerce/