Skip to content
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

BUG: No Change To Contact When User Is Deleted #77

Open
tictag opened this issue Nov 28, 2019 · 2 comments
Open

BUG: No Change To Contact When User Is Deleted #77

tictag opened this issue Nov 28, 2019 · 2 comments

Comments

@tictag
Copy link

tictag commented Nov 28, 2019

As at MailChimp Integration Add On v2.1.2

When a membership expires or is otherwise cancelled, the contact is archived on MailChimp (assuming Non-member Users has no audience selected and Unsubscribe on Level Change? has a 'Yes' option selected), however, when the user is deleted, nothing happens on MailChimp.

I would expect membership cancellation, expiry and/or user deletion to all have the same effect on MailChimp*, the effect being that they are no longer subscribed to the audience so do not receive email sent to that audience.

*Currently this is to archive the contact but I personally believe that the contact's Marketing Status should simply be changed to 'Nonsubscribed' per #43

@dparker1005
Copy link
Member

If this is not already implemented, it can probably be done with the following lines:

  • add_action('delete_user', 'pmpromc_process_audience_member_updates_queue', 11);
  • add_action('wpmu_delete_user', 'pmpromc_process_audience_member_updates_queue', 11);

Those would both be run after PMPro removes the user's membership level here:
https://github.com/strangerstudios/paid-memberships-pro/blob/4286d876b3aa5a24dbc314fbd0e84701b5c3852f/includes/cleanup.php#L6-L22

Note that this approach would not "batch unsubscribe" users and would instead send a separate API call for each user to unsubscribe.

@dparker1005
Copy link
Member

dparker1005 commented Mar 1, 2021

I have just performed the following test:

  1. Check out for new user with PMPro, adding them to the level audience in Mailchimp
  2. Verify that user is added in Mailchimp with correct merge fields
  3. Delete user from WP site
  4. Verify that user is set to "Unsubscribed" status in Mailchimp and default PMProMC merge fields are cleared.

It seems like this issue has been addressed in a previous update, but if I am missing something please let me know. I will keep this issue open for a bit just in case. For the same reason, I am also removing this from the v2.3.2 milestone as this will not likely be addressed in the next release.

@dparker1005 dparker1005 removed this from the v2.3.2 milestone Mar 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants