Skip to content

Instantly share code, notes, and snippets.

@joshfeck
Last active February 16, 2021 00:14
Show Gist options
  • Save joshfeck/93779169155561c374b7665bdcfd1ab0 to your computer and use it in GitHub Desktop.
Save joshfeck/93779169155561c374b7665bdcfd1ab0 to your computer and use it in GitHub Desktop.
Add a reminder at 60 minutes before event's datetime start. Event Espresso 4.
<?php // open PHP tag must be omitted if adding the following code to an existing PHP file that already has an opening PHP tag
add_filter(
'FHEE__EED_Ical__download_ics_file_ics_data',
function(
$ics_data, $datetime
) {
$ics_data['BEGIN'] = "VALARM";
$ics_data['TRIGGER'] = "-PT60M";
$ics_data['ACTION'] = "DISPLAY\r\nDESCRIPTION:Reminder";
$ics_data['END'] = "VALARM";
return $ics_data;
},
10,
2
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment