Use POST for cron requests
[MAILPOET-1485]
This commit is contained in:
@@ -137,7 +137,7 @@ class CronHelper {
|
|||||||
'user-agent' => 'MailPoet Cron'
|
'user-agent' => 'MailPoet Cron'
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
return WPFunctions::wpRemoteGet($url, $args);
|
return WPFunctions::wpRemotePost($url, $args);
|
||||||
}
|
}
|
||||||
|
|
||||||
static function getCronUrl($action, $data = false) {
|
static function getCronUrl($action, $data = false) {
|
||||||
|
@@ -273,7 +273,7 @@ class CronHelperTest extends \MailPoetTest {
|
|||||||
return $request_args;
|
return $request_args;
|
||||||
};
|
};
|
||||||
$wp_remote_get_args = array();
|
$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();
|
$wp_remote_get_args = func_get_args();
|
||||||
});
|
});
|
||||||
WPHooks::addFilter('mailpoet_cron_request_args', $filter);
|
WPHooks::addFilter('mailpoet_cron_request_args', $filter);
|
||||||
|
Reference in New Issue
Block a user