PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Update user role when payment is fulfilled

  1. In the current PayPal Add-On in combination with the User Registration Add-On we have the option: "Update user when subscription is cancelled.". I think it would be very powerfull to add an option: "Update user when payment is fulfilled to [field select]".

    The [field select] should not contain al the WordPress user roles, but the fields within in the Gravity Forms. That way we can link products / subscriptions directly to user roles. New users could be created with the default role "subscriber" and upgraded automatically to the selected product / subscription role (for exampled: "paid_subscriber") if the payment is fulfileld.

    We have developed something similar in the iDEAL Add-On (Dutch payment method):
    http://twitpic.com/6jrnwl

    Is this a feature that can be added? If so, how long will it take to add this? We could also develope this function with some custom code in combination with the "gform_paypal_fulfillment" filter.

    http://www.gravityhelp.com/forums/topic/using-gform-options-to-manipulate-register-user-addon

    Posted 8 years ago on Monday September 12, 2011 | Permalink
  2. This is something we can look at adding. It would be a good feature for the User Registration Add-On or the PayPal Add-On. There are a couple different ways it could be implemented.

    I can't provide you with an ETA as we aren't currently working on updates to these Add-Ons. It would be possible to do so now using the available hooks. You can add additional options to the PayPal Feed settings screen using hooks. The User Registration Add-On adds options to the PayPal Add-On to handle what happens to the user when a subscription is canceled, etc.

    Posted 8 years ago on Monday September 12, 2011 | Permalink
  3. Thanks for you reply Carl, we have developed an temporary 'plugin' for this feature: http://pastebin.com/t4Ffze8b

    Posted 8 years ago on Thursday September 22, 2011 | Permalink
  4. babsmiles
    Member

    Thanks Pronamic for the code! It was really exactly what I was looking for too. I uploaded your code to the plugins folder and activated. I see the Update User role on the paypal option in the forms section, it just didn't populate with any roles.

    I tried deactivating and activating the members plugin I am also using but it didn't help. I check

    Any help or advice would be greatly appreciated!

    Posted 8 years ago on Monday October 24, 2011 | Permalink
  5. brubrant2
    Member

    @pronamic Thanks a lot for sharing your code, nice for newbies like me to learn.

    Posted 8 years ago on Thursday August 2, 2012 | Permalink