would be great to return a full user meta
-
Hi,
Been using wpwh, it is an awesome plugin! Only one minor issue, we started to add some additional fields when user registers, and those fields are saved in wp_usermeta, however, when I am checking the webhook payload, I don’t see any of those new fields included, even through those data has been clearly saved in database.
I found one thing from https://codex.www.ads-software.com/Plugin_API/Action_Reference/user_register, where
Not all user meta data has been stored in the database when this action is triggered. For example, nickname is in the database but first_name and last_name are not (as of 3.9.1). The password has already been encrypted when this action is triggered.
I am no expert in wp, but this makes me wondering could it because the time the action is triggered, your code in ironikus_trigger_user_register(), $user_data[‘user_meta’] = get_user_meta($user_id) is reading data from database, where the custom fields haven’t been saved yet.
Would like to know if there are any suggestions regarding this situation?
1. postpone the time this action being triggered?
2. pass along the full user object instead of passing the user_id only?Would like to get your opinions, really appreciate it!
- The topic ‘would be great to return a full user meta’ is closed to new replies.