Usage of email placeholders in content
-
Hello.
How can I use email placeholders (like {display_name}, {usermeta:permit_code}, {usermeta:location}, {usermeta:item_type}, {usermeta:item_size}, etc.) in the user’s profile?
Here’s the story:
The client will input paintball gear types (jackets, pants, masks, etc) and sizes for each gear through the profile form. On profile update, an email is sent to the client, the email contains the reserved gear, legal rules and regulations, safety instructions, range rules, warnings, etc., which the client will print at home and it will be signed and used as a contract/agreement when entering the range. Paintball range owner wants to be fully covered legally and he needs to have this agreement available on the client’s profile too.
For this, I’ve tried to use a content block in the profile form, added everything we need, it looks good visually, but the placeholders are still visible, they’re not replaced with the user’s info.
I’ve tried using the instructions from this page
https://docs.ultimatemember.com/article/226-restrict-content-on-a-page-post-to-specific-users-community-role
as it sayAdding tags to text
Common placeholders (tags) can be used inside the shortcode. The shortcode then converts these to their proper values.but that didn’t worked, the whole shortcode, including the placeholder, is displayed.
Then I tried using the code from the bottom of this page in my child theme’s functions.php file
https://docs.ultimatemember.com/article/1340-placeholders-for-email-templates
but that didn’t worked either.I even added both shortcodes and placeholders directly in profile.php file, that didn’t worked either. I also tried echo do_shortcode(), which worked, but, as expected, it displayed my info, not the info from the profile I was viewing.
Can you point me in the right direction regarding how to achieve this? Any functions I could use? Tips, tricks?
Thank you.
- The topic ‘Usage of email placeholders in content’ is closed to new replies.