The email field is not displayed in the list of merge fields. Is that why my subscription test is failing? How do I add the email field to the merge fields as required by Mailchimp?
Don’t worry – the email field is included. You just don’t see it in the list of options to change because it is automatically included in the merge fields array.
Note that because it is automatically set, you cannot change it in the merge fields map settings. It is set to the “user_email” field, which is the WP email field for the user.
If for some reason you have multiple email fields for your users and you need to customize the field that is used to something other than “user_email”, you can create a filter function and change it in the merge field array using the wpmem_mc_merge
filter hook.
I am testing and the user is not subscribed to Mailchimp even though the registration went through and the user displays in WordPress. What is wrong?
If the registered user does not display, here are some steps to review:
- Is your API key valid? The plugin only validates if your API key LOOKS like a valid API key. But if it’s shut off, incorrect, or wrong for some other reason, your request will not go through. (Note that if the Merge Fields tab does displays merge fields from your MailChimp account, then your API key is valid and working – otherwise those fields would not be able to be retrieved.)
- What are your settings for subscribing? First, you must have a subscribe field (a checkbox) set in the plugin’s settings (See: Subscribe Field). The user uses this to “opt in” to your list. Second, is the plugin set to require double opt in? If so, the user is added as “pending” until they confirm their subscription through the confirmation email sent to them.
- Check merge fields for valid data. There are a number of elements here that can cause a problem – mismatched data, empty required fields, etc. For initial testing, start with no merge fields, or text merge fields only and make sure any MC required fields are matched to WP-Members required fields. (See: Merge Fields)
- Was the user being subscribed ever deleted from MailChimp? If so, you will not be able to add them via the API. Any user deleted from any of your MailChimp lists (any of your lists, not just the list you’re working with) can only be re-added through a Mailchimp hosted form.
Most of the time, the issue is #3 or #4 above. Double check the Log tab in the WP-Members > MailChimp settings for additional insight into reasons for failed subscriptions. If it is #3 or #4 above, there will likely be a log entry indicating this.