Magento – What does the STATUS_NOT_ACTIVE status in newsletter mean

magento-2.1magento2newsletter

In the Magento2 newsletter, there are 4 statuses. Here's my interpretation of them:

  1. STATUS_SUBSCRIBED – User has confirmed and subscribed to newsletter
  2. STATUS_NOT_ACTIVE – ???
  3. STATUS_UNSUBSCRIBED – User may or may
    not
    have confirmed his email address but is certainly not subscribed
    to newsletter
  4. STATUS_UNCONFIRMED – User has subscribed to newsletter but has not
    confirmed his email address

Is my understanding of the statuses correct? And what does STATUS_NOT_ACTIVE mean?

Best Answer

I think your interpretation is correct for STATUS_SUBSCRIBED and STATUS_UNSUBSCRIBED, but there is a subtlety you've missed for STATUS_UNCONFIRMED.

The difference between STATUS_UNCONFIRMED and STATUS_NOT_ACTIVE hinges on whether the newsletter subscription was created as part of a customer account or was created as a stand alone newsletter sign up.

  • STATUS_SUBSCRIBED - active newsletter subscriptions
  • STATUS_NOT_ACTIVE - waiting for user to click activation link in the newsletter subscription confirmation email
  • STATUS_UNSUBSCRIBED - user or admin has unsubscribed the user from the newsletter
  • STATUS_UNCONFIRMED - waiting for the user to click the activation link the customer account confirmation email

If a visitor just subscribes to the site's newsletter, without creating an customer account at the same time, then depending on the config value of newsletter/subscription/confirm (set in Stores>>Configuration>>Customers>>Newsletter>>Subscription Options>>Need to Confirm), the associated subscription will either get the status STATUS_SUBSCRIBED or STATUS_NOT_ACTIVE.

If a visitor signs up for a new account and checks the box to subscribe to the newsletter at the same time, then depending on the config value of customer/create_account/confirm (set in Stores>>Configuration>>Customers>>Customer Configuration>>Create New Account Options>>Require Emails Confirmation), the associated newsletter subscription will either get the status STATUS_SUBSCRIBED or STATUS_UNCONFIRMED.

Related Topic