Unsubscribe from list with API doesn’t change status
-
I’m trying to use the API to unsubscribe users from a list using this example:
$subscriber = "[email protected]"; // you can also pass a subscriber ID $list = 1; // you can get available list IDs by using the \MailPoet\API\API::MP('v1')->getLists(); method try { $subscriber = \MailPoet\API\API::MP('v1')->unsubscribeFromList($subscriber, $list); } catch(Exception $exception) { // return $exception->getMessage(); }
The user gets removed from the list but the status keeps ‘subscribed’ in stead of ‘unsubscribed’. How can I change that?
MailPoet version: 3.12.1
Wordpress: 4.9.8
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Unsubscribe from list with API doesn’t change status’ is closed to new replies.