0
votes

I use a custom emailer that alerts me whenever a new user signs up to my wordpress members site. The shortcodes that i am currently able to include within my emails are:

[name] = Displays user name.
[username] = Displays user username.
[password] = Displays user password.
[first_name] = Displays user first name.
[last_name] = Displays user last name.
[email] = Displays the user email.
[admin_email] = Displays the admin email.
[blogname] = Displays the blog anme.
[siteurl] = Displays site url.
[loginurl] = Displayslogin url.
[login_url] = Displays login url.
[passwordlink] = Displays password reset link.
[reason] = Displays the reason.
[expire_date] = Displays user expire date.
[post_title] = Displays the purchase post title.
[purchase_cost] = Displays the purchase post cost.
[amount] = Displays the membership amount.
[currency_sign] = Displays the currency symbol.
[membership_type] = Displays the membership type.

I would like to include the following wp_usermeta info within the emails to so want to setup another custom shortcode for these emails:

_mgm_cf_show_details_in_member_directory

How would i tell wordpress to echo this information in a new shortcode, something like [member-directory].

Upon registration, user's enter yes or no for this question so i want the email alert to tell me whether they have chosen Yes or No.

I hope that all makes sense, thanks again guys.

1

1 Answers

1
votes

Without looking at the code, I can't give you a definitive answer, but;

It should be as simple as adding in a new array key to the outputting array.

There will be something somewhere that sends the short codes to the the emails, and that will be an object, something like:

$return['name'] = $user->name;

and you just need to add something like:

$return['member-directory'] = $user->_mgm_cf_show_details_in_member_directory 

something along those lines should get you there