Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Aswin Giri

    (@aswingiri)

    Hello @adcadesigns

    For now, adding shortcodes on the email template is not possible with ultimate member plugin.

    Thread Starter adcadesigns

    (@adcadesigns)

    Thank you @aswingiri , but is there any function to activate it? just like in contactform7?

    Plugin Support Aswin Giri

    (@aswingiri)

    Hello @adcadesigns

    You can’t add a shortcode but you can add your own short tag to be used in the email template as explained in this article.

    Here is an example of how you can use shortcode with custom short tag:

    add_filter( 'um_template_tags_patterns_hook',function($search){
    	$search[] = '{say_hello}';
    	return $search;
    }, 10, 1 );
    add_filter( 'um_template_tags_replaces_hook', function($replace){
    	$replace[] = do_shortcode('[say_hello]');
    	return $replace;
    }, 10, 1 );
    
    add_shortcode('say_hello',function(){
    	return 'Hello There!!';
    });

    With the above code example, you can include {say_hello} on your email template and that will be replaced with “Hello there!!

    I hope this helps.

    Thread Starter adcadesigns

    (@adcadesigns)

    Hello @aswingiri , again thank you. ill try this one. ??

    Plugin Support Ultimate Member Support

    (@ultimatemembersupport)

    Hey there!

    This thread has been inactive for a while so we’re going to go ahead and mark it Resolved.

    Please feel free to re-open this thread by changing the Topic Status to ‘Not Resolved’ if any other questions come up and we’d be happy to help. ??

    Regards,

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Allow shortcode on email template’ is closed to new replies.