Skip to content

Instantly share code, notes, and snippets.

@joshfeck
Created April 29, 2019 19:54
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/81249ddc38e5eee2fa956a04a718fd93 to your computer and use it in GitHub Desktop.
Save joshfeck/81249ddc38e5eee2fa956a04a718fd93 to your computer and use it in GitHub Desktop.
Change count of "spaces" for calendar tooltip to number of total tickets available before any sales. Event Espresso 4
<?php
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
function ee_change_calendar_spaces_left(
$text,
$datetime
) {
$text = $datetime->sum_tickets_initially_available();
return $text;
}
add_filter(
'FHEE__EE_Calendar__tooltip_datetime_available_spaces',
'ee_change_calendar_spaces_left',
10,
2
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment