Ben Zumdahl
Sep 6, 2018 · 1 min read

Hi Ben. Yes, this use case was to check a WP user’s status on the Mailchimp list and then to add a yes / no value on a user meta field to store that status.

You could check an email address that is provided some other way — perhaps via a form submission. To do so, you’d need to tweak the function to clarify how you’re setting the $email_address variable and you’d need to hook the function on a different action, since ‘wp_login’ wouldn’t be relevant to a visitor that isn’t logging in.

After checking the status, if you wanted to do something persistent based upon the status (eg, showing or hiding a sign up form) you’d also need a method to store the result — such as a cookie or query variable.

    Ben Zumdahl

    Written by

    Lead Developer at Fiat Insight