add timezone for the events calendar
All checks were successful
PHP Code Checker / PHP Code Checker (pull_request) Successful in 52s
PHPUnit / PHPUnit – PHP 8.1 (pull_request) Successful in 1m29s
PHPUnit / PHPUnit – PHP 8.2 (pull_request) Successful in 1m34s
PHPUnit / PHPUnit – PHP 8.3 (pull_request) Successful in 1m27s

This commit is contained in:
André Menrath 2024-09-28 19:52:48 +02:00
parent d7c4f5ae39
commit 4ff31c6b45

View file

@ -197,6 +197,17 @@ final class The_Events_Calendar extends Event {
return $location;
}
/** By default set the timezone of the WordPress site.
*
* This is likely to be overwritten by the actual transformer.
*
* @return string The timezone string of the site.
*/
public function get_timezone(): string {
return $this->tribe_event->timezone;
}
/**
* Extend the default event transformers to_object function.
*