Skip to content

Instantly share code, notes, and snippets.

@PluginHive
Created February 8, 2020 04:28
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/1ab23288d4965a6298d6c26169983f05 to your computer and use it in GitHub Desktop.
Save PluginHive/1ab23288d4965a6298d6c26169983f05 to your computer and use it in GitHub Desktop.
Customize recurrent bookings price display message.
add_filter('phive_booking_booked_price_details','phive_booking_booked_price_details',11,3);
function phive_booking_booked_price_details($price_details,$product_id,$post_details)
{
$custom_messages="This is a recurrent booking. Your upcoming bookings are : ";
$new_message = "This class series meets at the green date above, and:";
if(isset($price_details['custom_messages']) )
{
$price_details['custom_messages'] = str_replace($custom_messages, $new_message, $price_details['custom_messages']);
}
return $price_details;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment