We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It would be nice to have an method like isSubscribed which would have 2 arguments $listId and $subscriberHash and would return only boolean.
isSubscribed
$listId
$subscriberHash
boolean
public function isSubscribed(int $listId, string $subscriberHash): bool
The text was updated successfully, but these errors were encountered:
I support this. But for now I do it like this:
$result = $MailChimp->get("lists/".$list_id."/members/".$subscriber_hash); if ($result['status'] == '404') { // No user in mailChimp database } else {
}
Sorry, something went wrong.
I have similar solution right now.
/** * Check if email is subscribed in specific audience. */ private function hasStatusSubscribed(string $email, string $audienceId): bool { $response = $this->mailChimp->get(sprintf( 'lists/%s/members/%s', $audienceId, $this->mailChimp->subscriberHash($email) )); return isset($response['status']) && $response['status'] === self::MAIL_CHIMP_USER_STATUS_SUBSCRIBED; }
But I would love to have this method in drewm/mailchimp-api, because now, I'm basically wrapping a wrapper
drewm/mailchimp-api
No branches or pull requests
It would be nice to have an method like
isSubscribed
which would have 2 arguments$listId
and$subscriberHash
and would return onlyboolean
.public function isSubscribed(int $listId, string $subscriberHash): bool
The text was updated successfully, but these errors were encountered: