Getting wp_timezone undefined within a namespace
Thank you Tom J Nowell for the insightful comment above. Turns out that wp_timezone is a relatively recent addition to WordPress, and didn’t exist in the version of WP I was developing in. It was added, as the Changelog says, in v5.3. I was using v5.2. The function itself: function wp_timezone() { return new DateTimeZone( … Read more