From 9ca9a4833af37e6ac8bbb08b2d2a977cf07d8eb5 Mon Sep 17 00:00:00 2001 From: Marius Cristea Date: Wed, 22 Nov 2017 23:22:28 +0200 Subject: [PATCH 1/2] Keep consistency for wp cron fallback Because `wp_schedule_single_event` is converting the `$args` variable into parameters used for that hook, in order to keep consistency, we need to wrap them in a array. --- includes/WpMinions/Cron/Client.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/WpMinions/Cron/Client.php b/includes/WpMinions/Cron/Client.php index 76df989..6b1f667 100644 --- a/includes/WpMinions/Cron/Client.php +++ b/includes/WpMinions/Cron/Client.php @@ -30,7 +30,7 @@ public function register() { */ public function add( $hook, $args = array(), $priority = 'normal' ) { // Priority isn't really something we can manage with wp-cron - wp_schedule_single_event( time(), $hook, $args ); + wp_schedule_single_event( time(), $hook, array ( $args ) ); return true; } From 13bf873bac1e99a213bb85e0065c82af3fcc5648 Mon Sep 17 00:00:00 2001 From: Marius Cristea Date: Wed, 22 Nov 2017 23:23:52 +0200 Subject: [PATCH 2/2] Fix small typo. --- includes/WpMinions/Cron/Client.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/WpMinions/Cron/Client.php b/includes/WpMinions/Cron/Client.php index 6b1f667..8a89c70 100644 --- a/includes/WpMinions/Cron/Client.php +++ b/includes/WpMinions/Cron/Client.php @@ -30,7 +30,7 @@ public function register() { */ public function add( $hook, $args = array(), $priority = 'normal' ) { // Priority isn't really something we can manage with wp-cron - wp_schedule_single_event( time(), $hook, array ( $args ) ); + wp_schedule_single_event( time(), $hook, array( $args ) ); return true; }