Skip to content

Instantly share code, notes, and snippets.

@PluginHive
Created October 29, 2019 04:51
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 PluginHive/1c03eca9c68e1b390d25d4facd2098a4 to your computer and use it in GitHub Desktop.
Save PluginHive/1c03eca9c68e1b390d25d4facd2098a4 to your computer and use it in GitHub Desktop.
Change book now add to cart button text.
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