occurrence->id; } public function cancelled(): bool { return $this->occurrence->is_cancelled() || ! $this->session->is_active(); } public function delivery(): Delivery { return $this->session->delivery; } public function zone(): \DateTimeZone { return new \DateTimeZone( \RoosterLMS\Live\Schedule::is_zone( $this->session->timezone ) ? $this->session->timezone : 'UTC' ); } public function venue_line(): string { if ( null === $this->venue ) { return ''; } return implode( ', ', array_filter( array( (string) $this->venue['name'], (string) $this->venue['address'], (string) $this->venue['city'] ), static fn( string $part ): bool => '' !== trim( $part ) ) ); } public function location(): string { $venue = Delivery::ONLINE === $this->delivery() ? '' : $this->venue_line(); return '' !== $venue ? $venue : __( 'Online', 'rooster-lms' ); } }