BuddyDev

Search

[Resolved] Email message

  • Participant
    Level: Initiated
    Posts: 14
    swati on #8977

    Hi Brajesh Ji,
    Looking for your response.

  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #8978

    Hi Swati,
    I am sorry i could not reply earlier.

    Can you please remove the older code for Pm and try this

    
    
    function filter_message_button_link( $link ) {
    	$user_id = bp_get_member_user_id();
    
    	if ( ! $user_id ) {
    		return $link;
    	}
    
    	$link = wp_nonce_url( bp_loggedin_user_domain() . bp_get_messages_slug() . '/compose/?r=' . bp_get_member_user_login() );
    
    	return $link;
    }
    
    add_filter( 'bp_get_send_private_message_link', 'filter_message_button_link', 1, 1 );
    
    function display_private_message_button() {
    	if ( bp_get_member_user_id() != bp_loggedin_user_id() ) {
    		bp_send_message_button();
    	}
    }
    
    add_action( 'bp_directory_members_item', 'display_private_message_button' );
    
    

    It is working for me and should work for you too.

    Please check and let me know.

  • Participant
    Level: Initiated
    Posts: 14
    swati on #8979

    Worked.. Thank you so much

  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #8980

    You are welcome.
    All the best with your project.

    Regards
    Brajesh

The topic ‘ [Resolved] Email message’ is closed to new replies.

This topic is: resolved