Tagged: buddypress, friends, request
Hi!
I have test this code to add automatic the friend without the user accept the request.But it isnt working, any suggest?
I searched by source and could not find it. I tried with follow plugin but it isnt the same ..Thanks very much!
function bp_auto_accept_friend_request( $friendship_id, $friendship_initiator_id, $friendship_friend_id ) { $friendship_status = BP_Friends_Friendship::check_is_friend( $friendship_initiator_id, $friendship_friend_id ); if ( 'not_friends' == $friendship_status ) { // force add friends_add_friend( $friendship_initiator_id, $friendship_friend_id, true ); friends_accept_friendship( $friendship_id ); } } add_action('friends_friendship_requested', 'bp_auto_accept_friend_request', 200, 3);
Viewing 1 post (of 1 total)
You must be logged in to reply to this topic.
This topic is: not resolved