Skip to content

Commit 1419ef4

Browse files
committed
Pass args to wp_schedule_event
1 parent 7cdde96 commit 1419ef4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/BackgroundTask/RecurringBackgroundTask.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function register() {
3131
*
3232
* @param mixed[] ...$args Arguments passed to the function from the action hook.
3333
*/
34-
public function schedule_event( ...$args ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
34+
public function schedule_event( ...$args ) {
3535
if ( ! current_user_can( 'manage_options' ) ) {
3636
return;
3737
}
@@ -43,7 +43,7 @@ public function schedule_event( ...$args ) { // phpcs:ignore VariableAnalysis.Co
4343
return;
4444
}
4545

46-
wp_schedule_event( time(), $this->get_interval(), $event_name );
46+
wp_schedule_event( time(), $this->get_interval(), $event_name, $args );
4747
}
4848

4949
/**

0 commit comments

Comments
 (0)