Skip to content

Instantly share code, notes, and snippets.

@andrasguseo
Last active November 4, 2024 11:14
Show Gist options
  • Save andrasguseo/8d97350f1f5290cab1e3bbc2ce09cf02 to your computer and use it in GitHub Desktop.
Save andrasguseo/8d97350f1f5290cab1e3bbc2ce09cf02 to your computer and use it in GitHub Desktop.
ECP > Add the virtual event URL to the end of the description in the iCal exports.
<?php
/**
* Insert virtual event meeting URL at the end of the description.
*
* @param array $item Array of items describing the event in ical format.
* @param object $event The event object.
*
* @return array
*/
add_filter( 'tribe_ical_feed_item', function ( $item, $event ) {
if ( isset( $event->virtual_meeting_url ) ) {
$item['DESCRIPTION'] .= '\n\nClick on this link to join the meeting:\n' . $event->virtual_meeting_url;
}
return $item;
}, 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment