-
Notifications
You must be signed in to change notification settings - Fork 68
bugfix-remove-tags-new-subscriber #810
New issue
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
Conversation
add_filter('mc4wp_subscriber_data', function (MC4WP_MailChimp_Subscriber $subscriber) {
$subscriber->tags[] = ['name' => 'removethis', 'status' => 'inactive'];
return $subscriber;
});
Ability to remove tags, closes ibericode#621, props @arnelap
When submitting a new email I would get an error - tags[n] : This value should be of type string.
|
ok, so i think what i could do for NEW subscribers is:
That way the procedure stays close to what it has been doing so far. However, updating subscribers the second API call is required though (and that's already how we did it, right?), I don't think there is any way around it, so maybe doing that same second call for new subscribers is actually the better way to do it to keep results consistent with future changes, and prevent the need to convert the tags to a string. |
|
@arnelap I think the current approach is the cleanest (a separate call to the https://mailchimp.com/developer/marketing/api/list-member-tags/add-or-remove-member-tags/ endpoint), but:
Answer: Maichimp does not modify any tags not supplied in the API call 🎉
Answer: No, you can set unexisting tags to EDIT: Tested both cases, looks like we're good! |
When submitting a new email I would get an error
I decided to go with unsettling the tags from args, and submitting it separately.
Is this the right way though? Tbh I don't really understand how it did work with new subscribers before (and it did).