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"
May 18, 2018 at 5:13 am
#14298
Shamim Hasan
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 );