Skip to content
3 changes: 3 additions & 0 deletions src/wp-admin/includes/plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -1054,6 +1054,9 @@ function delete_plugins( $plugins, $deprecated = '' ) {
return new WP_Error( 'could_not_remove_plugin', sprintf( $message, implode( ', ', $errors ) ) );
}

// Clears the plugin cache to remove stale data following plugin deletion.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Clears the plugin cache to remove stale data following plugin deletion.
// Force refresh of plugin update information.

Similar to other instance where core use wp_clean_plugins_cache(). Can we have unit test that verify the behaviour?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated!

wp_clean_plugins_cache();

return true;
}

Expand Down
Loading