/** * Verify that we have MailPoet subscribers. * * If they haven't been retrieved yet, retrieve them. * * @since 1.0.0 */ protected function ensure_subscribers() { if (isset($this->subscribers)) { return; } $this->subscribers = array(); // Enable the model to return more than 10 records. Could be fragile. $this->user_model->limit_pp = 1000000; $list_subscribers = $this->user_model->get_subscribers(array('A.email', 'A.firstname', 'A.lastname', 'A.last_opened', 'A.last_clicked', 'A.created_at'), array('lists' => $this->mailpoet_list_ids)); foreach ($list_subscribers as $list_subscriber) { $this->add_source_subscriber($list_subscriber); } }