WordPress.org

Make WordPress Core

Ticket #9303: 9303.2.diff

File 9303.2.diff, 616 bytes (added by Denis-de-Bernardy, 6 years ago)

based on DD32's suggestion

  • wp-admin/includes/plugin.php

     
    468468                return new WP_Error('could_not_remove_plugin', sprintf(__('Could not fully remove the plugin(s) %s'), implode(', ', $errors)) ); 
    469469 
    470470        // Force refresh of plugin update information 
    471         delete_transient('update_plugins'); 
     471        if ( $current = get_transient('update_plugins') ) {  
     472                unset( $current->response[ $plugin_file ] ); 
     473                set_transient('update_plugins', $current); 
     474        } 
    472475 
    473476        return true; 
    474477}