Skip to:
Content
Pages
Categories
Search
Top
Bottom

Topic or forum (un)subscription hook

  • @maksanse

    Participant

    Hello,

    I want to perform an action after a user subscribe or unsubscribe to a forum/topic.

    I have found “bbp_subscriptions_handler” hook that allows me to do my action when the user unsubscribe from topic or forum from his subscription page, but I cannot find something more “general” for any subscription / unsubscription from anywhere on a forum (via the (un)subscribe links).

    Does anyone knows if it is possible ?

    Best regards

Viewing 4 replies - 1 through 4 (of 4 total)
  • @robin-w

    Moderator

    as far as I know this action is fired on ANY subscribe/unsubscribe

    // Do additional subscriptions actions
    	do_action( 'bbp_subscriptions_handler', $success, $user_id, $object_id, $action, $object_type );

    @johnjamesjacoby

    Keymaster

    There is also…

    do_action( 'bbp_add_user_subscription', $user_id, $object_id, $type );

    …and…

    do_action( 'bbp_remove_user_subscription', $user_id, $object_id, $type );

    …if you need something a bit more lower-level, that isn’t tied directly to the request handler.

    @maksanse

    Participant

    Thank you Robin & John for those detailed answers !


    @robin-w
    , you were right : I was trying to modify my page with this handler… what is not possible the way I intended.

    So I found a way to do my feature differently.

    Best regards and thank you 2 so much for your implication in bbpress 🙏

    @robin-w

    Moderator

    🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Skip to toolbar