Mailpoet API incorrectly returning users it shouldnt
-
On my site I’m using the API to return all subscribed users on a list, and this has worked as planned while I’ve been working locally. I’m now testing my project on live and experiencing an issue.
The first issue is that anyone who joins up as a user to the website appears as a subscriber on the Mail Poet even though they arent being added to any list. ( I don’t want this ).
The second issue is that the code I’m using which should only be returning users subscribed to a specific list is actually returning all generally subscribed users.
I only have 1 subscribed (or otherwise) user on list with the id of 3.
What is actually being returned is a list of about 20 user which represents all the new users to the site since I installed this plugin.
Here is the code:
if (class_exists(\MailPoet\API\API::class)) { $mailpoet_api = \MailPoet\API\API::MP('v1'); $filter = array( 'status' => 'subscribed', 'listId' => 3, ); $fullsubscriberlist = $mailpoet_api->getSubscribers($filter); var_dump($fullsubscriberlist );
Can you help with this? I cannot find a way through the interface to stop people being automatically signed up, and I also need a way to ensure that whats being returned as subscribed list members actually is accurate.
The page I need help with: [log in to see the link]
- The topic ‘Mailpoet API incorrectly returning users it shouldnt’ is closed to new replies.