Pause sending of spammer users [MAILPOET-1649]

This commit is contained in:
Amine Ben hammou
2018-11-28 17:33:26 +01:00
parent ddaf9e361d
commit 160d4ae3ec
4 changed files with 32 additions and 1 deletions

View File

@@ -20,6 +20,7 @@ class API {
const RESPONSE_CODE_NOT_ARRAY = 422;
const RESPONSE_CODE_PAYLOAD_TOO_BIG = 413;
const RESPONSE_CODE_PAYLOAD_ERROR = 400;
const RESPONSE_CODE_BANNED_ACCOUNT = 403;
private $api_key;
@@ -85,6 +86,7 @@ class API {
'message' => $result->get_error_message()
);
}
$response_code = WPFunctions::wpRemoteRetrieveResponseCode($result);
if($response_code !== 201) {
$response = (WPFunctions::wpRemoteRetrieveBody($result)) ?