Viewing 2 replies - 1 through 2 (of 2 total)
  • I could resolve this by modifying
    $lists_array = $MCHandler->lists($apikey);
    to $lists_array = $MCHandler->lists();

    in wpcj-chimp/index.php
    This is the correct way according to the mailChimp API wrappers, btw.

    You can check if there’s an error by using

    if ($MCHandler->errorCode){
    	echo "Unable to load lists()!";
    	echo "\n\tCode=".$MCHandler->errorCode;
    	echo "\n\tMsg=".$MCHandler->errorMessage."\n";
    }

    Which in my case allowed me to see that the Datacenter being used was the wrong one (the -us2 or -us1 after your API key). So I headed to wpcj-chimp/MCAPI.class.php and I just changed in line 42:

    $this->apiUrl = parse_url("http://api.mailchimp.com/" . $this->version . "/?output=php");

    To

    $this->apiUrl = parse_url("http://us2.api.mailchimp.com/" . $this->version . "/?output=php");

    You can just put your datacenter before the .api there.

    Note that I don’t think this is the proper way to define your datacenter when using the mailChimp API, so you’re welcome to look for a better method that doesn’t alter the MCAPI.class.php.

    Note that you have to reload the page to see the list as its not auto populated with JS.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: wpCJ Chimp] Unable to retrieve mailing lists from MailCHimp’ is closed to new replies.