Title: getSubscribers() function does not work anymore?
Last modified: February 27, 2025

---

# getSubscribers() function does not work anymore?

 *  [wp_user1](https://wordpress.org/support/users/wp_user1/)
 * (@wp_user1)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/getsubscribers-function-does-not-work-anymore/)
 * After updating MailPoet we got an error – what should we do here?
 * MailPoet 5.7.1/5.8.0
 * Here is the source code:
 * `if (class_exists(\MailPoet\API\API::class)) {
   $mailpoet_api = \MailPoet\API\
   API::MP('v1');}try {$fil=array('status'=>'subscribed','listId'=>$listid);$subscribers
   = $mailpoet_api->getSubscribers($fil,500);} catch (\Exception $e) {echo 'error';}

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Ján Mikláš](https://wordpress.org/support/users/neosinner/)
 * (@neosinner)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/getsubscribers-function-does-not-work-anymore/#post-18338528)
 * Hi [@wp_user1](https://wordpress.org/support/users/wp_user1/),
 * Could you please share the exact error that you get? You can do so by removing
   the `try{} catch() {}` part and only calling the API, which should then surface
   the error.
 *     ```wp-block-code
       if (class_exists(\MailPoet\API\API::class)) {    $mailpoet_api = \MailPoet\API\API::MP('v1');}$fil=array(    'status'=>'subscribed',    'listId'=>$listid);$subscribers = $mailpoet_api->getSubscribers($fil,500);
       ```
   
 *  Thread Starter [wp_user1](https://wordpress.org/support/users/wp_user1/)
 * (@wp_user1)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/getsubscribers-function-does-not-work-anymore/#post-18338570)
 * The class does not exist anymore since the last update. But I cannot find the
   new documentation.
 *  Plugin Author [Ján Mikláš](https://wordpress.org/support/users/neosinner/)
 * (@neosinner)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/getsubscribers-function-does-not-work-anymore/#post-18338614)
 * [@wp_user1](https://wordpress.org/support/users/wp_user1/) there were no changes
   in MailPoet API in 5.8.0, and the `MailPoet\API\API` class [is still there](https://github.com/mailpoet/mailpoet/blob/trunk/mailpoet/lib/API/API.php).
 * Could you please reinstall the plugin to ensure that some files are not missing?
   If that doesn’t work, could you please share the exact error (copy and paste 
   it here please) that you see?
 *  Thread Starter [wp_user1](https://wordpress.org/support/users/wp_user1/)
 * (@wp_user1)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/getsubscribers-function-does-not-work-anymore/#post-18338625)
 *     ```wp-block-code
       Fatal error: Uncaught Error: Call to a member function getSubscribers() on null in /var/www/html/_cron-newsletter.php:99Stack Trace1.	{main}thrown in xxxx.php on line 99
       ```
   
 * this is my error message.
 *  Plugin Support [Gui A. a11n](https://wordpress.org/support/users/guicmazeredo/)
 * (@guicmazeredo)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/getsubscribers-function-does-not-work-anymore/#post-18348871)
 * Thanks for sending the error [@wp_user1](https://wordpress.org/support/users/wp_user1/).
   Can you confirm if you have tried to [re-install the plugin via FTP as per these instructions](https://kb.mailpoet.com/article/258-re-installing-updating-the-plugin-via-ftp)?

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘getSubscribers() function does not work anymore?’ is closed to new replies.

 * ![](https://ps.w.org/mailpoet/assets/icon-256x256.png?rev=3284564)
 * [MailPoet - Newsletters, Email Marketing, and Automation](https://wordpress.org/plugins/mailpoet/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/mailpoet/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/mailpoet/)
 * [Active Topics](https://wordpress.org/support/plugin/mailpoet/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/mailpoet/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/mailpoet/reviews/)

 * 5 replies
 * 3 participants
 * Last reply from: [Gui A. a11n](https://wordpress.org/support/users/guicmazeredo/)
 * Last activity: [1 year, 3 months ago](https://wordpress.org/support/topic/getsubscribers-function-does-not-work-anymore/#post-18348871)
 * Status: not resolved