From 609cf152af6a51832119acdb83375938ec2768f9 Mon Sep 17 00:00:00 2001 From: slawkens Date: Fri, 24 Apr 2026 16:24:06 +0200 Subject: [PATCH] Plugins: Fix uninstall when hook is without HOOK_ prefix --- system/src/Plugins.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/system/src/Plugins.php b/system/src/Plugins.php index 6a88fcab..2560f9f5 100644 --- a/system/src/Plugins.php +++ b/system/src/Plugins.php @@ -870,7 +870,11 @@ class Plugins { global $hooks; foreach($plugin_info['hooks'] ?? [] as $name => $info) { - $hooks->unregister($name, $info['type'], $info['file']); + if (str_contains($info['type'], 'HOOK_')) { + $info['type'] = str_replace('HOOK_', '', $info['type']); + } + + $hooks->unregister($name, 'HOOK_' . $info['type'], $info['file']); } clearCache();