Created
October 29, 2019 04:51
-
-
Save PluginHive/1c03eca9c68e1b390d25d4facd2098a4 to your computer and use it in GitHub Desktop.
Change book now add to cart button 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_single_add_to_cart_text', 'change_phive_booking_add_to_cart_text',10,2 ); | |
function change_phive_booking_add_to_cart_text($button_text,$product ) { | |
if(!empty($product) && $product->get_type()=='phive_booking') | |
{ | |
$button_text="New Book now button"; | |
} | |
return $button_text; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment