Allow API to accept GET requests

[MAILPOET-2378]
This commit is contained in:
Ján Mikláš
2019-09-25 13:20:03 +02:00
committed by Jack Kitterhing
parent 1fe2249408
commit e768778691

View File

@ -79,7 +79,11 @@ class API {
function setupAjax() {
$this->wp->doAction('mailpoet_api_setup', [$this]);
$this->setRequestData($_POST);
if (isset($_POST['api_version'])) {
$this->setRequestData($_POST);
} else {
$this->setRequestData($_GET);
}
$ignoreToken = (
$this->settings->get('captcha.type') != Captcha::TYPE_DISABLED &&