Skip to:
Content
Pages
Categories
Search
Top
Bottom

Having problems with membership request notifications not deleting?

  • Avatar of buddypresser
    BuddyPresser
    Participant

    @buddypresser

    I was having a problem where ‘Membership Request Accepted’ notifications weren’t being deleted when clicked. It might be the customised theme I’m using, or it might be a bug, but either way…

    Here’s a solution I found – not sure how good it is, but it seems to work.

    Drop this into bp-custom.php (if you don’t have one, create it and put it in the main plugins directory):

    function bp_custom_fix_group_notifications() {

    global $bp;

    bp_core_delete_notifications_for_user_by_type( $bp->loggedin_user->id, $bp->groups->slug, 'membership_request_accepted' );

    bp_core_delete_notifications_for_user_by_type( $bp->loggedin_user->id, $bp->groups->slug, 'membership_request_rejected' );

    }

    add_action( 'groups_screen_my_groups', 'bp_custom_fix_group_notifications' );

    Hope this helps somebody.

You must be logged in to reply to this topic.