• How do I display Custom User Registration Fields in the email? The shortcode {submitted_registration} returns all the custom fields value but they are not in order so I want to re-order them in the email.

    For example, I have custom fields called Company Name with meta key company_name but adding {company_name} as a shortcode in the email does not return anything.

    Also, {submitted_registration} shortcode returns meta key company_name: and then the value “Company Name” instead of returning meta Label Company Name: Value

    Thank you

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Ultimate Member Support

    (@ultimatemembersupport)

    Hi @flourishdna,

    You have to create custom email placeholders.
    Please use these hooks:
    um_template_tags_patterns_hook
    um_template_tags_replaces_hook

    Regards.

    Thread Starter FlourishDNA

    (@flourishdna)

    @ultimatemembersupport if possible could you give me one example? I am still learning WordPress and would help a lot.

    Thank you for the awesome plugin.

    Thread Starter FlourishDNA

    (@flourishdna)

    @ultimatemembersupport sorry for the trouble. I was able to make it work with the custom hooks. An example can be found below. Now I am able to use {company_name} in the email as a shortcode to get user-submitted value (Company name) in the email.

    add_filter( 'um_template_tags_replaces_hook', 'my_template_tags_replaces', 10, 1 );
    function my_template_tags_replaces( $replace_placeholders ) {
    	// your code here
    	$replace_placeholders[] = um_user('company_name');
    	return $replace_placeholders;
    }
    
    add_filter( 'um_template_tags_patterns_hook', 'my_template_tags_patterns', 10, 1 );
    function my_template_tags_patterns( $placeholders ) {
    	// your code here
    	$placeholders[] = '{company_name}';
    	return $placeholders;
    }
    Thread Starter FlourishDNA

    (@flourishdna)

    @ultimatemembersupport I have a custom field with meta key business_locations which has multi-select field. I am using below hooks to get the values but since it returns the multiple data as an array so {business_locations} shortcode returns ‘Array” text as a value.

    SO, how do I deal with such fields to make it return each value with comma separated?

    add_filter( 'um_template_tags_replaces_hook', 'my_template_tags_replaces', 10, 1 );
    function my_template_tags_replaces( $replace_placeholders ) {
    	// your code here
    	$replace_placeholders[] = um_user('business_locations');
    	return $replace_placeholders;
    }
    
    add_filter( 'um_template_tags_patterns_hook', 'my_template_tags_patterns', 10, 1 );
    function my_template_tags_patterns( $placeholders ) {
    	// your code here
    	$placeholders[] = '{business_locations}';
    	return $placeholders;
    }

    Thank you

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Display Custom User Registration Fields in the email’ is closed to new replies.