My plugin is calling a third party over http whenever a users meta data is updated.
To do this I am using the
updated_user_meta hook. It seems however that that hook is called multiple times, once for each piece of meta that is updated.
This means that at the moment my plugin is making several http calls.
So is there a way to know which is the last piece of meta data updated. So I can make the call once at that point? Or should I be doing this a different way?
FYI I can't use
profile_updated because it doesn't always get called.
A practical example: I am keeping my users in sync with a Mailchimp list. In that list I have extra custom fields that match their wordpress meta data fields of Users Role, Organisation ID and Organisation name.
When these details are updated
updated_user_meta is called three times, once for each of the pieces of meta data. So at the moment I am making three calls to Mailchimp once for each of them because I can't find another hook that is called when the last piece of meta data is updated.