Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ryanlabelle/340a1bf09d31e0a79bce8f43d29a2b58 to your computer and use it in GitHub Desktop.
Save ryanlabelle/340a1bf09d31e0a79bce8f43d29a2b58 to your computer and use it in GitHub Desktop.
$GLOBALS['themo_extra_adult_text'] = true;
$GLOBALS['themo_extra_child_text'] = true;
$GLOBALS['themo_extra_pet_text'] = true;
$GLOBALS['themo_extra_cleaning_text'] = true;
function themo_mphb_translate_service_callback( $service ) {
// Maybe modify $example in some way.
if(isset($service) && $service->getTitle() == 'Extra Adult' && $GLOBALS['themo_extra_adult_text'] ) {
echo '<li class="themo_rate_notice">Rate set per night based on double occupancy (2 guests). Check-in any additional adults here. 5 guests total is the maximum. </li>';
$GLOBALS['themo_extra_adult_text'] = false;
}
if(isset($service) && $service->getTitle() == 'Extra Child' && $GLOBALS['themo_extra_child_text'] ) {
echo '<li class="themo_rate_notice">Rate set per night based on double occupancy (2 guests). Check-in any additional children (under 12) here. 5 guests total is the maximum. </li>';
$GLOBALS['themo_extra_child_text'] = false;
}
if(isset($service) && $service->getTitle() == 'Pet Fee' && $GLOBALS['themo_extra_pet_text'] ) {
echo '<li class="themo_rate_notice">Pet Fee is $20 per night. We do not charge more then 3 nights or $60 each pet.</li>';
$GLOBALS['themo_extra_pet_text'] = false;
}
if(isset($service) && $service->getTitle() == 'Extra housekeeping (For five nights or longer)' && $GLOBALS['themo_extra_cleaning_text'] ) {
echo '<li class="themo_rate_notice">A $50 charge will apply to all bookings of 5 or more.</li>';
$GLOBALS['themo_extra_cleaning_text'] = false;
}
return $service;
}
add_filter( '_mphb_translate_service', 'themo_mphb_translate_service_callback' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment