diff --git a/wp-cron.php b/wp-cron.php index dd52f2b3a9..d992601140 100644 --- a/wp-cron.php +++ b/wp-cron.php @@ -17,12 +17,11 @@ foreach ($crons as $timestamp => $cronhooks) { do_action_ref_array($hook, $args['args']); $schedule = $args['schedule']; if ($schedule != false) { - $args = array_merge( array($timestamp, $schedule, $hook), $args['args']); - call_user_func_array('wp_reschedule_event', $args); + $new_args = array_merge( array($timestamp, $schedule, $hook), $args['args']); + call_user_func_array('wp_reschedule_event', $new_args); } - wp_unschedule_event($timestamp, $hook); + wp_unschedule_event($timestamp, $hook, $args['args']); } - wp_unschedule_event($timestamp, $hook, $args); } } ?>