• 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.

    • This topic was modified 1 year, 3 months ago by naomispirit.
    • This topic was modified 1 year, 3 months ago by naomispirit.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Support Shohan Hossain Nabil – a11n

    (@sohanhossain)

    Hi there,

    It’s odd that it worked as expected on your local environment but not on the live site. It is possible that some thing on your live site could be contributing to this. Have you tried disabling all other plugins (if you have any) on your site can check? If not, could you please try that and see how that goes?

Viewing 1 replies (of 1 total)
  • The topic ‘Mailpoet API incorrectly returning users it shouldnt’ is closed to new replies.