strangerstudios / pmpro-mailchimp

WordPress plugin for MailChimp integration.
https://www.paidmembershipspro.com/add-ons/pmpro-mailchimp-integration/
GNU General Public License v3.0
25 stars 23 forks source link

Can't see more than 15 Mailchimp lists (of 23) #123

Closed wbgraphics closed 2 years ago

wbgraphics commented 3 years ago

I've set up Mailchimp API keys on my two websites, but I cant see more than 15 Mailchimp lists on both of them. Is there any way to see all lists without the 15 limit?

wbgraphics commented 3 years ago

I've found out that it can be changed in "classes/class-pmpromc-mailchimp-api.php" file, line 104: $max_lists = apply_filters('pmpro_addon_mc_api_fetch_list_limit', 15); This isn't a very good way as it will be overwritten with every uplate or PMPro Mailchimp plugin. Can it be applied in WP theme functions.php file or in pmpro-customizations.php file? If yes, then how?

I've foud this hook on PMPro website: apply_filters( 'pmpro_addon_mc_api_fetch_list_limit', int $limit ); but I have no idea how to use it.

dparker1005 commented 3 years ago

Hi @wbgraphics,

We have a code recipe here that shows how to use that filter to set the number of lists that are shown: https://gist.github.com/andrewlimaza/da44c73ea7811549023803100b99686a

Please let me know if you run into any issues while using that code recipe on your site.

wbgraphics commented 3 years ago

Hi @dparker1005, Thank you very much!