diff --git a/lib/Cron/CronHelper.php b/lib/Cron/CronHelper.php index 7866fb6ef4..b08174ccf4 100644 --- a/lib/Cron/CronHelper.php +++ b/lib/Cron/CronHelper.php @@ -137,7 +137,7 @@ class CronHelper { 'user-agent' => 'MailPoet Cron' ) ); - return WPFunctions::wpRemoteGet($url, $args); + return WPFunctions::wpRemotePost($url, $args); } static function getCronUrl($action, $data = false) { diff --git a/tests/unit/Cron/CronHelperTest.php b/tests/unit/Cron/CronHelperTest.php index eceb29afb5..a23fc1aa49 100644 --- a/tests/unit/Cron/CronHelperTest.php +++ b/tests/unit/Cron/CronHelperTest.php @@ -273,7 +273,7 @@ class CronHelperTest extends \MailPoetTest { return $request_args; }; $wp_remote_get_args = array(); - WPHelper::interceptFunction('wp_remote_get', function() use (&$wp_remote_get_args) { + WPHelper::interceptFunction('wp_remote_post', function() use (&$wp_remote_get_args) { $wp_remote_get_args = func_get_args(); }); WPHooks::addFilter('mailpoet_cron_request_args', $filter);