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.

Writing a custom plugin for subscriptions

  1. lhornaday
    Member

    Hi, my objective is to allow my registered WordPress users to subscribe (change roles). I am not wanting to use the registration addon because the members are already registered.

    My gravity form is simply setup to pass some hidden variables for later processing.

    When I get a new subscriber, these are the only hooks I need to be concerned with, correct?

    gform_paypal_fulfillment
    gform_subscription_canceled

    I have a new plugin setup to change the user's status to paid and unpaid accordingly using those two hooks. As far as I know, gform_paypal_fulfillment is for completed payments. Therefore I can simply change the user's role with it. Is that the proper hook for doing so?

    Lastly, I don't think I need a notice for the repeated payments every month, I just need to catch the cancellation with gform_subscription_canceled. Does this also sound right?

    Posted 12 years ago on Sunday December 25, 2011 | Permalink
  2. lhornaday
    Member

    I have all of this working properly. I'll just have to watch and see if it works correctly for a while I guess.

    Posted 12 years ago on Friday December 30, 2011 | Permalink
  3. Not sure why this post wasn't replied to by someone on our team, but what you described does sound correct. I would suggest setting up a PayPal Sandbox account and doing some tests using the Sandbox to refine your customization.

    The good news is we do plan on enhancing the User Registration Add-On to not only support creating new users, but also allow updating existing users. This is one of many features we have planned for the User Registration Add-On and will make it easy to update a users account via a form that can also require making a payment before the change is made.

    Posted 12 years ago on Friday December 30, 2011 | Permalink
  4. lhornaday
    Member

    Thanks,

    I did test with the sandbox. I guess I am good until the update comes out. I was wondering how the user addon worked without having the ability to update users. Can't wait to see what you guys do with it.

    Posted 12 years ago on Friday December 30, 2011 | Permalink