From 4db38dce158bde0e6461d7fdf76645d3f5d0fce1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Menrath?= Date: Fri, 27 Sep 2024 17:54:19 +0200 Subject: [PATCH] fix location for tribe --- .../activitypub/transformer/class-the-events-calendar.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/activitypub/transformer/class-the-events-calendar.php b/includes/activitypub/transformer/class-the-events-calendar.php index 7707ca8..0c1e617 100644 --- a/includes/activitypub/transformer/class-the-events-calendar.php +++ b/includes/activitypub/transformer/class-the-events-calendar.php @@ -136,7 +136,7 @@ final class The_Events_Calendar extends Event { */ public function get_location(): Place|null { // Get short handle for the venues. - $venues = $this->wp_object->venues; + $venues = $this->tribe_event->venues; // Get first venue. We currently only support a single venue. if ( $venues instanceof \Tribe\Events\Collections\Lazy_Post_Collection ) { @@ -181,6 +181,8 @@ final class The_Events_Calendar extends Event { $location = new Place(); if ( count( $address ) > 1 ) { $location->set_address( $address ); + } else { + $location->set_address( $venue->post_title ); } $location->set_id( $venue->permalink ); $location->set_name( $venue->post_title ); -- 2.39.5