Created
April 29, 2019 19:54
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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