Skip to content

Commit

Permalink
Events: Prepare events to fix invalid date error
Browse files Browse the repository at this point in the history
WordPress/wporg-mu-plugins@ebfc71a applied `prepare_events()` to all code paths callbacks for `google_map_event_filters_{$filter_slug}`. 3a7cccd removed the `timestamp` property from events, because `prepare_events()` adds it dynamically.

That commit should have also updated `prime_query_cache()`, since it sets the same transient as `Google_Map\get_events()`. That was missed, and that caused the city landing pages to display `invalid date` after the `events_landing_prime_query_cache` cron job ran.
  • Loading branch information
iandunn committed Jan 16, 2024
1 parent ea45162 commit 9290b54
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ function prime_query_cache(): void {

$cache_key = Google_Map\get_cache_key( $parts );
$events = get_city_landing_page_events( $request_uri );
$events = Google_Map\prepare_events( $events );

set_transient( $cache_key, $events, DAY_IN_SECONDS );
}
Expand Down

0 comments on commit 9290b54

Please sign in to comment.