Reply To: Please add new case to fep_user_name to include usermeta "last_name_suffix"


Home Forums Front End PM PRO Please add new case to fep_user_name to include usermeta "last_name_suffix" Reply To: Please add new case to fep_user_name to include usermeta "last_name_suffix"

#14298
shamim
Keymaster

Please do not change any plugin code. It will be overwritten when you update plugin.
There are lots of hook in this plugin. So you can change almost anything without touching plugin code.
To achieve this functionality without changing plugin code, please add following code in your theme’s ( child theme’s if any) functions.php

add_filter( 'fep_filter_user_name', function( $name, $id ){
    $name = fep_get_userdata( $id, 'first_name', 'id' ) . ' ' . fep_get_userdata( $id, 'last_name', 'id' ) . ' ' . fep_get_userdata( $id, 'last_name_suffix', 'id' );
    return $name;
}, 10, 2 );