Use POST for cron requests

[MAILPOET-1485]
This commit is contained in:
Pavel Dohnal
2018-08-16 08:27:05 +02:00
parent 081f362799
commit 8ea06f3f31
2 changed files with 2 additions and 2 deletions

View File

@@ -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) {

View File

@@ -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);