Skip to content

Instantly share code, notes, and snippets.

@joshfeck
Created February 5, 2019 18:42
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/1d0c78e541b4e24fd744b8805499bb6e to your computer and use it in GitHub Desktop.
Save joshfeck/1d0c78e541b4e24fd744b8805499bb6e to your computer and use it in GitHub Desktop.
Show upcoming dates in EE4 calendar even if they no longer have tickets on sale
<?php
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
add_filter(
'FHEE__EED_Espresso_Calendar__get_calendar_events__query_params',
'my_ee_remove_ticket_sale_calendar_check',
10,
7
);
function my_ee_remove_ticket_sale_calendar_check(
$query_params,
$category_id_or_slug,
$venue_id_or_slug,
$public_event_stati,
$start_date,
$end_date,
$show_expired
) {
if ($show_expired == 'false' || $show_expired == false) {
unset($query_params[0]['Ticket.TKT_end_date']);
}
return $query_params;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment