Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Jeff Farthing

    (@jfarthing84)

    Unfortunately, the code for variable replacement falls back to the site title if the variable it is looking for isn’t found.

    Thread Starter pkbonzer

    (@pkbonzer)

    Hi Jeff,
    Thank you for immediate reply.

    So, can there be any solution for it? Any hack in a code? Or can we override some function in functions.php?

    OR there is no solution for replacement of unavailable variables in custom registration email with empty string (“”) instead of ‘site title’? ??

    So, is it a case, if we customized Registration form (without using any plugin) in wordpress, it will happen?
    Is this default in wordpress?
    Or is it due to some customization of email modules for ‘Theme My login’ Plugin?

    Your help is most appreciated.
    Please help, It will be very useful.

    Thanks.

    Thread Starter pkbonzer

    (@pkbonzer)

    Hi guys,

    Any help please?

    Didn’t any one face such issue?

    Plugin Author Jeff Farthing

    (@jfarthing84)

    function tml_replace_vars( $replacements, $user_id ) {
    	$user = get_user_by( 'id', $user_id );
    	if ( $user ) {
    		// Check each field you want to use and set them accordingly
    		$replacements['%some_field%'] = $user->some_field;
    	}
    	return $replacements;
    }
    add_filter( 'tml_replace_vars', 'tml_replace_vars', 10, 2 );
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘User registration Custom email – replace variable with empty string if not avail’ is closed to new replies.