From 5906f46606ea285435c9f586ad31195f180dfebe Mon Sep 17 00:00:00 2001 From: Matthew Batchelder Date: Thu, 9 Nov 2023 12:03:15 -0500 Subject: [PATCH] Avoid overriding the events that are already cached. --- src/Telemetry/Events/Event_Subscriber.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/Telemetry/Events/Event_Subscriber.php b/src/Telemetry/Events/Event_Subscriber.php index d1d81e9..281943f 100644 --- a/src/Telemetry/Events/Event_Subscriber.php +++ b/src/Telemetry/Events/Event_Subscriber.php @@ -51,15 +51,11 @@ public function register() { * @return void */ public function cache_event( $name, $data ) { - $events = []; - self::$events[] = [ 'name' => $name, 'data' => wp_json_encode( $data ), 'stellar_slug' => Config::get_stellar_slug(), ]; - - self::$events = $events; } /**