public function get_ics_link(){
$nonce = wp_create_nonce('export_event_nonce');
$slug = EVO()->cal->get_ics_url_slug();
$path_segment = $this->ID . '_' . $this->ri;
$structure = get_option( 'permalink_structure' );
// for plain permalink
if( !$structure){
$args = array(
$slug => 'single',
'event_id' => $this->ID,
'repeat_interval' => $this->ri,
'key' => $nonce,
);
return add_query_arg( $args, home_url( '/' ) );
}
return home_url("/". $slug . "/{$path_segment}/?key={$nonce}");
}
ICS not working on Plain
Code created on: 2026-01-08 10:47:48