Elastic Email unsubscribe processing

Lakjin

Active Member
FYI, MailWizz does not properly process when a user unsubscribers via list-unsubscribe or EE's unsubscribe tag. MailWizz needs to deal with $status == 'Unsubscribed', which it doesn't.
 
It actually does:
PHP:
// /apps/frontend/controllers/DswhController.php line 814:
if ($status == 'Unsubscribed') {
    
    $subscriber->saveStatus(ListSubscriber::STATUS_UNSUBSCRIBED);

    $trackUnsubscribe = CampaignTrackUnsubscribe::model()->findByAttributes(array(
        'campaign_id'   => $campaign->campaign_id,
        'subscriber_id' => $subscriber->subscriber_id,
    ));

    if (!empty($trackUnsubscribe)) {
        Yii::app()->end();
    }

    $trackUnsubscribe = new CampaignTrackUnsubscribe();
    $trackUnsubscribe->campaign_id   = $campaign->campaign_id;
    $trackUnsubscribe->subscriber_id = $subscriber->subscriber_id;
    $trackUnsubscribe->note          = 'Unsubscribed via Web Hook!';
    $trackUnsubscribe->ip_address    = Yii::app()->request->userHostAddress;
    $trackUnsubscribe->user_agent    = StringHelper::truncateLength(Yii::app()->request->userAgent, 255);
    $trackUnsubscribe->save(false);

    Yii::app()->end();
}
 
It actually does:
PHP:
// /apps/frontend/controllers/DswhController.php line 814:
if ($status == 'Unsubscribed') {
   
    $subscriber->saveStatus(ListSubscriber::STATUS_UNSUBSCRIBED);

    $trackUnsubscribe = CampaignTrackUnsubscribe::model()->findByAttributes(array(
        'campaign_id'   => $campaign->campaign_id,
        'subscriber_id' => $subscriber->subscriber_id,
    ));

    if (!empty($trackUnsubscribe)) {
        Yii::app()->end();
    }

    $trackUnsubscribe = new CampaignTrackUnsubscribe();
    $trackUnsubscribe->campaign_id   = $campaign->campaign_id;
    $trackUnsubscribe->subscriber_id = $subscriber->subscriber_id;
    $trackUnsubscribe->note          = 'Unsubscribed via Web Hook!';
    $trackUnsubscribe->ip_address    = Yii::app()->request->userHostAddress;
    $trackUnsubscribe->user_agent    = StringHelper::truncateLength(Yii::app()->request->userAgent, 255);
    $trackUnsubscribe->save(false);

    Yii::app()->end();
}
Was this added in the latest MailWizz release? Because that is not in the version I have, one release prior to the latest.
 
Back
Top