diff --git a/app/code/community/Ebizmarts/MailChimp/Model/Api/Batches.php b/app/code/community/Ebizmarts/MailChimp/Model/Api/Batches.php index edcdb964b..27f358d9f 100644 --- a/app/code/community/Ebizmarts/MailChimp/Model/Api/Batches.php +++ b/app/code/community/Ebizmarts/MailChimp/Model/Api/Batches.php @@ -88,6 +88,9 @@ public function _sendEcommerceBatch($mailchimpStoreId) $batchArray['operations'] = array_merge($batchArray['operations'], $ordersCanceledArray); } try { + /** + * @var $mailchimpApi \Ebizmarts_Mailchimp + */ $mailchimpApi = Mage::helper('mailchimp')->getApi(); if (!empty($batchArray['operations'])) { $batchJson = json_encode($batchArray); @@ -152,6 +155,10 @@ protected function _sendSubscriberBatches() break; } } + $this->_getResults(0, false); + if ($subscriberLimit > 0) { + list($batchResponses[], $subscriberLimit) = $this->sendStoreSubscriberBatch(0, $subscriberLimit); + } return $batchResponses; }