function wpupdate_cron() { include 'includes/wp-update-class.php'; include 'includes/wp-update-functions.php'; $wpupdate = new WP_Update(); $plugins = wpupdate_get_plugins(); foreach ((array) $plugins as $plugin_file => $plugin_info) { $result = $wpupdate->checkPluginUpdate($plugin_file, false, false); if (is_array($result['Errors']) && in_array('Not Cached', $result['Errors'])) { //We want to force an update on this item $result = $wpupdate->checkPluginUpdate($plugin_file, true, true); } } //Now that we've updated every plugins details, we want to update the notices, this will also have the effect of sending the email if theres new updates. $wpupdate->updateNotifications(); }