Skip to content

Commit 02bbbbe

Browse files
committed
Get proper My Calendar permalink for ticket lists
1 parent 75b8057 commit 02bbbbe

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/mt-notifications.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,11 @@ function mt_format_array( $output, $type, $data, $payment_id, $context = 'admin'
103103
* @return string URL to event.
104104
*/
105105
function mt_get_event_link( $event_id ) {
106-
$url = get_the_permalink( $event_id );
106+
if ( 'mc-events' === get_post_type( $event_id ) ) {
107+
$url = mc_get_permalink( $event_id );
108+
} else {
109+
$url = get_the_permalink( $event_id );
110+
}
107111

108112
/**
109113
* Filter the link to a ticketed event.

0 commit comments

Comments
 (0)