Look for the bpro_nouveau_friend_button_hide() function in the plugin’s includes/core.php file. The filter isn’t returning a value.
Don’t change the plugin code. Until the developer corrects the issue, you can add this to your theme’s functions.php file:
remove_filter( 'bp_get_add_friend_button', 'bpro_nouveau_friend_button_hide', 101, 1 );
function my_bpro_nouveau_friend_button_hide( $args ) {
if ( ! function_exists('bp_nouveau') ) {
return $args;
}
$moderated = bp_registration_get_moderation_status( get_current_user_id() );
if ( function_exists( 'bp_displayed_user_id' ) ) {
$displayed_moderated = bp_registration_get_moderation_status( bp_displayed_user_id() );
}
if ( $moderated || $displayed_moderated ) {
if ( 'friends' === bp_nouveau()->members->button_args['component'] ) {
bp_nouveau()->members->button_args = [];
}
}
return $args;
}
add_filter( 'bp_get_add_friend_button', 'my_bpro_nouveau_friend_button_hide', 101, 1 );
This dupes the code from the original function in the plugin, and simply adds the last line, “return $args;”