From b39c5d7f3f55c118e819fd43cd0111d1c67f7ae2 Mon Sep 17 00:00:00 2001 From: hbhalodia Date: Mon, 2 Feb 2026 13:52:25 +0530 Subject: [PATCH 1/2] CoreTrac-64568 Add wp_clean_plugins_cache to remove stale data after plugin uninstall --- src/wp-admin/includes/plugin.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/wp-admin/includes/plugin.php b/src/wp-admin/includes/plugin.php index 460874ca52181..f766faf9078a6 100644 --- a/src/wp-admin/includes/plugin.php +++ b/src/wp-admin/includes/plugin.php @@ -1054,6 +1054,9 @@ function delete_plugins( $plugins, $deprecated = '' ) { return new WP_Error( 'could_not_remove_plugin', sprintf( $message, implode( ', ', $errors ) ) ); } + // Clean up plugin cache to remove stale data after plugin deletion. + wp_clean_plugins_cache(); + return true; } From 0677f37e3af7003cb3a1426593ab3d7c6db6a22d Mon Sep 17 00:00:00 2001 From: hbhalodia Date: Mon, 2 Feb 2026 13:54:01 +0530 Subject: [PATCH 2/2] CoreTrac-64568 Update messaging for comment --- src/wp-admin/includes/plugin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-admin/includes/plugin.php b/src/wp-admin/includes/plugin.php index f766faf9078a6..e377ee172a61f 100644 --- a/src/wp-admin/includes/plugin.php +++ b/src/wp-admin/includes/plugin.php @@ -1054,7 +1054,7 @@ function delete_plugins( $plugins, $deprecated = '' ) { return new WP_Error( 'could_not_remove_plugin', sprintf( $message, implode( ', ', $errors ) ) ); } - // Clean up plugin cache to remove stale data after plugin deletion. + // Clears the plugin cache to remove stale data following plugin deletion. wp_clean_plugins_cache(); return true;