parent
9f67e46ef8
commit
ed1ae6aed5
|
|
@ -90,18 +90,9 @@ class Campaign
|
|||
*/
|
||||
public function getEmailAddresses($campaign)
|
||||
{
|
||||
$newsletterEmails = app('\Webkul\Core\Repositories\SubscribersListRepository')->getModel()
|
||||
->where('is_subscribed', 1)
|
||||
->where('channel_id', $campaign->channel_id)
|
||||
->get('email');
|
||||
|
||||
$customerGroupEmails = $campaign->customer_group->customers()->where('subscribed_to_news_letter', 1)->get('email');
|
||||
|
||||
$emails = [];
|
||||
|
||||
foreach ($newsletterEmails as $row) {
|
||||
$emails[] = $row->email;
|
||||
}
|
||||
$customerGroupEmails = $campaign->customer_group->customers()->where('subscribed_to_news_letter', 1)->get('email');
|
||||
|
||||
foreach ($customerGroupEmails as $row) {
|
||||
$emails[] = $row->email;
|
||||
|
|
|
|||
Loading…
Reference in New Issue