• Resolved r-c

    (@rlmc)


    Hi!
    I’m using integromat to listen to my PayPal webhooks, and the WP Webhooks to update my wordpress site users table. The create_user function works great, and when I use create_user I assign a role of subscriber.

    Now, when I receive a cancellation from PayPal webhooks, I’d like to be able to UPDATE the user (e.g. update_user) and assign a new role, in my case I have it called _cancelled_subscriber as a custom role type.

    I couldn’t find a way to update an existing user. Thanks for any help!

    On a (somewhat) related note, do you know how I find the name of a custom field in my paypal webhook feed?

    • This topic was modified 4 years, 1 month ago by r-c.
    • This topic was modified 4 years, 1 month ago by r-c.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Ironikus

    (@ironikus)

    Hey @rlmc – Thank you very much for reaching out, as well as for using our plugin! ??
    The free version currently does not provide a free webhook action for updating a user, but the pro version does. The action is called update_user and is available within the comparison table of both of our versions: https://ironikus.com/compare-wp-webhooks-pro/

    If you want to make sure the webhook endpoint suits your setup, you can also take a look at it via the web view of our pro version at: https://wp-webhooks.com/pro/?wpwh=wp-webhooks-pro&wpwhtb=receive-data

    Tipp: The update_user webhook action also allows you to create users by using the create_if_none argument.

    In case you would continue using the free version, you can also make it work by creating your own logic using the custom_action webhook action. It allows you to write some custom lines of code that you can then use to execute your required functionality.
    Do let me know if you have any further questions. ??

    Thread Starter r-c

    (@rlmc)

    Awesome, seems like some good options!

    Related question though related to using PayPal into the WP Webhook:

    In Paypal IPN, I have a custom field when I am receiving a txn.type == subscr_payment message that is called option_selection2

    On a cancellation or expiration message type, that same field is called option_selection1

    I am getting some information that maybe this field is not available in PayPal WebHooks? That would really be a bummer is it is a required field for my app — it’s the field that contains the user’s Google email address that needs to be used as the email address when creating the wordpress user.

    Any knowledge on this one? ??

    Plugin Contributor Ironikus

    (@ironikus)

    Hey @rlmc – Thank you for your answer.
    If the field is available within the response of PayPal, you can use two ways to check that:

    1. Using https://webhook.site/ – once you receive data there, you will have an overview of the full payload, which also shows you all fields included.

    2. Use the Log feature of WP Webhooks Pro. Since our pro version contains a logging feature, you can also use it to check the full payload for all of the available values.

    I hope that helps you so far. Do let me know if you have any further questions. ??

    Thread Starter r-c

    (@rlmc)

    Perfect. Got the pro version and trying out integration with integromat. So far so good.

    Plugin Contributor Ironikus

    (@ironikus)

    Hey @rlmc – Thanks for supporting our plugin! If you have any further questions, feel free to reach out again! ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Need to update_user’ is closed to new replies.