After updating from 2.2.2 to 2.2.3 the fields available on the user bundle for Email under Merge Fields are many fewer and the email field is no longer available. Looking through the commits between 2.2.2 and 2.2.3 it seems that #2949125: mailchimp_lists_load_email fails to find email address field when attached to a related entity. could be the cause but I'm not able to verify that.
With 2.2.2:

With 2.2.3:

| Comment | File | Size | Author |
|---|
Comments
Comment #2
xenophyle commentedAre you able to experiment with 2.2.4 to see if that fixes it?
Comment #3
tjhellmannThank you @xenophyle. Sorry, I should have mentioned that the issue persists after updating to 2.2.4. 2.2.2 was the last version where the email field was an option. With 2.2.4 the options look the same as the ones I posted with the screenshot with 2.2.3.
Comment #4
xenophyle commentedUsing these steps, I was not able to reproduce the problem; I was still seeing the full set of options for email address.
-Install Mailchimp 2.2.2 on a standard Drupal install of 10.3
-Enable Mailchimp and Mailchimp Audiences
-Authenticate with OAuth
-Create a subscription field on users
-Set email address merge field to the user email property
-Update to Mailchimp 2.2.4 and clear caches
Is there any additional information you might be able to supply? Are you using any patches?
Comment #5
tjhellmannI was able to test more and the culprit was a feeds_item field on the user account.
Within the loop in the
getFieldmapOptionsfunction inmodules/mailchimp_lists/src/Plugin/Field/MailchimpListsSubscription.phpthe feeds_item field returnsFALSEfrom$options = $this->getOptionsForSubEntity($required, $field_definition, $target_definition, $target_type, $keypath, $label, $options);which resets/empties the$optionsarray. That's why I was only seeing the values in the loop that came after the feeds_item field after updating to 2.2.3.I'm not sure of the best way but it seems that we should check if
getOptionsForSubEntityreturns a value that isn'tFALSE.Comment #7
xenophyle commentedGreat tip! I just updated 2.x-dev with a change I think should fix this. Do you want to see if it helps?
Comment #8
tjhellmannYes, that fixed it. We have all the fields back as options now. Thank you!
Comment #10
xenophyle commented