Model/Newsletter/Subscriber.php
public function unsubscribe()
    {
        $result['customers'] = 0;
        $suppressedEmails = [];

        /**
         * Sync all suppressed for each store
         */
        $websites = $this->helper->getWebsites(true);

        foreach ($websites as $website) {
            //not enabled
            if (! $this->helper->isEnabled($website)) {
                continue;
            }

            $suppressedEmails = $this->getSuppressedContacts($website);
        }
        //Mark suppressed contacts
        if (! empty($suppressedEmails)) {
            $result['customers'] = $this->emailContactResource->unsubscribe($suppressedEmails);
        }
        return $result;
    }
public function unsubscribe()
    {
        $result['customers'] = 0;
        $suppressedEmails = [];

        /**
         * Sync all suppressed for each store
         */
        $websites = $this->helper->getWebsites(true);

        foreach ($websites as $website) {
            //not enabled
            if (! $this->helper->isEnabled($website)) {
                continue;
            }

            $suppressedEmails = $this->getSuppressedContacts($website);
        }
        //Mark suppressed contacts
        if (! empty($suppressedEmails)) {
            $result['customers'] = $this->emailContactResource->unsubscribe($suppressedEmails);
        }
        return $result;
    }
public function unsubscribe ( ) { $ result [ 'customers' ] = 0 ; $ suppressedEmails = [ ] ; /**
         * Sync all suppressed for each store
         */ $ websites = $ this -> helper -> getWebsites ( true ) ; foreach ( $ websites as $ website ) { //not enabled if ( ! $ this -> helper -> isEnabled ( $ website ) ) { continue ; } $ suppressedEmails = $ this -> getSuppressedContacts ( $ website ) ; } //Mark suppressed contacts if ( ! empty ( $ suppressedEmails ) ) { $ result [ 'customers' ] = $ this -> emailContactResource -> unsubscribe ( $ suppressedEmails ) ; } return $ result ; }
Un-subscribe suppressed contacts.

@return array
Un - subscribe suppressed contacts .