From ee4b56b1fadbeafca6e8774effa9daf212c6d1c4 Mon Sep 17 00:00:00 2001 From: Udo Meister Date: Wed, 20 Mar 2024 13:27:37 +0100 Subject: [PATCH] always unregister transient from THEATER_TRANSIENTS_OPTION even if the transient itself does not exist anymore --- functions/transient/class-theater-transient.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/functions/transient/class-theater-transient.php b/functions/transient/class-theater-transient.php index b4a57383..3eac2da6 100644 --- a/functions/transient/class-theater-transient.php +++ b/functions/transient/class-theater-transient.php @@ -206,9 +206,7 @@ public function reset() { $result = delete_transient( $this->key ); - if ( $result ) { - $this->unregister(); - } + $this->unregister(); return $result; }