| @@ -63,9 +63,9 @@ | ||
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | public function addQueueAjax(): void |
| 66 | 66 | { |
| 67 | - acym_checkToken(); | |
| 67 | + wp_verify_nonce(acym_getVar('cmd', '_wpnonce'), 'acymnonce') || die('Invalid Token'); | |
| 68 | 68 | |
| 69 | 69 | $emailId = acym_getVar('int', 'emailId', 0); |
| 70 | 70 | if (empty($emailId)) { |
| 71 | 71 | acym_sendAjaxResponse(acym_translation('ACYM_EMAIL_NOT_FOUND'), [], false); |
| @@ -73,9 +73,9 @@ | ||
| 73 | 73 | |
| 74 | 74 | $followupClass = new FollowupClass(); |
| 75 | 75 | $queued = $followupClass->queueForSubscribers($emailId); |
| 76 | 76 | |
| 77 | - if ($queued === false) { | |
| 77 | + if ($queued === null) { | |
| 78 | 78 | acym_sendAjaxResponse(acym_translation('ACYM_ERROR_ADD_QUEUE'), [], false); |
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | acym_sendAjaxResponse(acym_translationSprintf('ACYM_EMAILS_ADDED_QUEUE', $queued)); |