@benenoo
Your code snippet should look like this if I understand your issue right:
add_action( 'um_after_profile_name_inline', 'um_after_profile_name_inline_custom', 10, 1 );
function um_after_profile_name_inline_custom( $args ) {
if( !empty( um_user( 'profil_status' ) && um_user( 'profil_status' ) == "Professionnel" )) {
$html = ob_get_contents();
ob_end_clean();
$html = str_replace( um_user( 'display_name' ), um_user( 'business_name' ), $html );
ob_start();
echo $html;
}
}
Add code snippet to your active theme’s functions.php file
or use the “Code Snippets” plugin.
-
This reply was modified 2 years, 6 months ago by
missveronica.
-
This reply was modified 2 years, 6 months ago by
missveronica.