- Membership Relation

Hey guys,

I know that if I delete user subscriptions out of the "wp_m_membership_relationships" that the plugin picks up on that, great.

However, if I manually delete subscriptions like that, what happens to

I will be hooking in extensively into your plugin, can you PLEASE give me a list of hooks and filters I can use!?

Answer me this, when someone unsubscribes from a subscription, how does handle that or where in your plugin does it handle unsubscriptions to cancel payments.


  • Vaughan

    Hi @Marcell T,

    When someone unsubscribes, the plugin let's know. I believe it uses the following function in "membershipincludes/gateways/gateway.authorizenetarb.php"

    function process_unsubscribe_subscription( $pass, $sub_id, $user_id )

    Called with this filter.

    add_filter( 'membership_unsubscribe_subscription', array(&$this, 'process_unsubscribe_subscription'), 10, 3 );

    For more details, I will need to ask the developer for you. Hopefully he should respond shortly.

    Hope this helps

  • Marcell T

    Yes, I need more details.

    If I go ahead and manually delete a subscription from the database, will know that?

    I know the "subscriptions" page know this, it shows the user as if they don't have a subscription (which they don't) but will the payment gateway know that or will still be charging the user behind the scenes.

    If all if good, could I use that filter as follows

    User subscribes to subscription
    Use hook to fun custom function
    function checks if user already has subscription
    if they do, it deletes all of their subscriptions and inserts the new one into the table

    This won't be a problem, BUT WILL AUTHORIZE.NET know that they should no longer process those payments. Also,


    I need the correct hook for subscribing and unsubscribing.


  • Jonathan

    Hi @Marcell T,

    If you manually delete the record from the database then, no, will not know that you deleted the record because the appropriate API calls won't have been made.

    As far a list of hooks - I'm afraid this isn't very feasible as there are HUNDREDS of webhooks in Membership. Even it was feasible, a simple list of webhooks wouldn't do you much good as you would need to know the context of the hooks.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.