Closed thecodecafe closed 8 years ago
Hi you need to pass a multidimensional array (which is what is meant by a struct in this case) as the second argument since a user can have multiple email addresses:
Change :
MailchimpWrapper::list()->memberInfo($list_id, ["example@email.com"]);
to:
MailchimpWrapper::list()->memberInfo($list_id, ['emails' => ['email' => 'example@email.com']]);
Good luck :)
O! Thanks should close this now!
Whenever i try to get member info like so.
MailchimpWrapper::list()->memberInfo($list_id, ["example@email.com"]);
I get the following responsearray(4) { ["success_count"]=> int(0) ["error_count"]=> int(1) ["errors"]=> array(1) { [0]=> array(3) { ["email"]=> string(19) "example@email.com" ["error"]=> string(26) ""email" should be a struct" ["code"]=> int(-100) } } ["data"]=> array(0) { } }
Any idea how to solve this?