Closed mskraban closed 4 years ago
It's possible they aren't. Feel free to dig into the library we're using and if necessary make a PR to a better one.
I have found the solution. Member list accepts PUT for adding and updating existing members info, Tags accept only POST method. And both methods have to be separated.
$subscriber_hash = $MailChimp->subscriberHash(post('email'));
$result = $MailChimp->put("lists/".$this->property('list')."/members/". $subscriber_hash, $subscriptionData);
$result = $MailChimp->post("lists/".$this->property('list')."/members/$subscriber_hash/tags", [
'tags' => [
[
'name' => 'team',
'status' => 'inactive',
],
]
]);
I'm trying to add tags, but no success. Don't know if this is the correct way of adding tags, but I'm getting error of
"Undefined offset: 1
ondrewm/mailchimp-api/src/MailChimp.php
Do tags work in this version or I'm doing it wrong?