Skip to content

Instantly share code, notes, and snippets.

@joshfeck
Created August 27, 2019 16:39
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 joshfeck/a19abe1b6534489dff0831fe53d9f26f to your computer and use it in GitHub Desktop.
Save joshfeck/a19abe1b6534489dff0831fe53d9f26f to your computer and use it in GitHub Desktop.
Change display of attendee limit text in Event Espresso 4's calendar tooltip
<?php
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
add_filter(
'FHEE__EE_Calendar__get_calendar_events__tooltip_reg_btn_html',
'my_custom_calendar_available_spaces',
10,
3
);
function my_custom_calendar_available_spaces(
$original_output,
$event,
$datetime
) {
$text = 'Spaces Available: ' . $datetime->total_tickets_available_at_this_datetime();
$spaces = '<p class="attendee_limit_qtip">' . $text . '</p>';
return $spaces . $original_output;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment