• echowosh2019

    (@echowosh2019)


    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!

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Contributor Ironikus

    (@ironikus)

    Hey @echowosh2019 – thank you a lot for your message. Indeed, custom meta is always something that has to be taken care of based on the used plugin. Can you tell me which plugin you currently use to add custom meta?
    We already started to offer some integrations that make the meta compliant with our plugin. You can find more details here: https://ironikus.com/docs/article-categories/integrations/

    After you share some more information on what plugin you use, I can give you a more tailored answer.

    (The integration link I sent you works either with the free and the pro version).
    If you have any further questions, feel free to reach out at any time.

    Thread Starter echowosh2019

    (@echowosh2019)

    Wow, didn’t expect such quick response. We are using User Registration plugin, https://www.ads-software.com/plugins/user-registration/. and any new fields, they will add them as new usermeta in the form of something like ‘user_registration_check_box_1572989625’.

    Would love to get any kind of tips that I can try with, really appreciate it!

    Thread Starter echowosh2019

    (@echowosh2019)

    just in case, we already tried get_user_meta( $user_id, 'user_registration_check_box_1572989625' );
    it returns empty all the time

    Plugin Contributor Ironikus

    (@ironikus)

    Hey @echowosh2019 – thank you for the details.
    I’ll check on it and give you an answer as soon as I made some tests with the plugin.

    JSP0421

    (@jsp0421)

    The same thing is happening with Contact Form 7 Frontend Registration and EPForms user registration. The first and last name are not yet saved in the DB when the payload is sent.

    • This reply was modified 5 years ago by JSP0421.
    Plugin Contributor Ironikus

    (@ironikus)

    Hey @jsp0421 @echowosh2019 – Since this topic is bothering us as much as you, we are currently working on creating a post-delay for webhook triggers. This means, that the webhooks will be registered and send before PHP shuts down.
    This allows us to track every custom meta or change that happens within the same instance of the current website call. ??
    We will launch that update with our next version, so that should fix all of your issues. ??

    Thread Starter echowosh2019

    (@echowosh2019)

    @ironikus thank you guys so much!! Not expecting such great response, i was actually planning to create some workaround from our side. Really appreciate this effort. You guys rock!

    Plugin Contributor Ironikus

    (@ironikus)

    Happy to help @echowosh2019 ! ??

    JSP0421

    (@jsp0421)

    Thank you for your help and quick response!

    Plugin Contributor Ironikus

    (@ironikus)

    Hey @jsp0421 @echowosh2019 – I just wanted to inform you that we launched our new version, which also addresses your issues.
    It would be great if you can give it another try and check if the meta is added accordingly.
    I’m happy to hear your feedback. ??

    Thread Starter echowosh2019

    (@echowosh2019)

    @ironikus I can confirm the new change is working on my side with the user registration plugin, awesome work!!

    Thread Starter echowosh2019

    (@echowosh2019)

    btw, a minor suggestion, once the a new webhook url is submitted, it’s better to clear up the user input, I remember i can still see the url in the text input ‘ironikus-webhook-url-create_user’

    Plugin Contributor Ironikus

    (@ironikus)

    Hi @echowosh2019 – thanks for your feedback. I added the suggestion for our next launch. ??
    Feel free to reach out in case you have any questions.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘would be great to return a full user meta’ is closed to new replies.