How to Get WooCommerce Order Details (Complete API Reference)
Complete reference for accessing WooCommerce order data programmatically - getter methods, get_data(), billing/shipping fields, iterating order…
Override the Ultimate Member welcome_email.php at theme level, add role-specific emails, and customize registration confirmation messages. Includes a full copy-paste template with all available variables.
If you're building a membership site with Ultimate Member, at some point you'll need to customize the welcome email. The default template says "Welcome to [your site]" - functional, but completely generic. This guide covers how to override it properly so your changes survive every plugin update, what template variables are available, and how to send different emails to different member roles.
Ultimate Member stores its default welcome email template at:
wp-content/plugins/ultimate-member/templates/email/welcome_email.phpEdit that file and it works - until the next plugin update wipes your changes. The correct approach is the theme override, which WordPress loads instead of the plugin version whenever it exists.
Create the following path inside your active theme (or child theme):
wp-content/themes/your-theme/ultimate-member/email/welcome_email.phpUltimate Member checks for a theme-level version first. If it finds one, it uses that. If not, it falls back to the plugin default. Your customizations are now update-safe.
If the ultimate-member/email/ directory doesn't exist in your theme, create it. WordPress doesn't create it automatically.
These placeholders are replaced with real values when the email sends:
| Variable | Output |
|---|---|
{display_name} | User's display name |
{user_login} | Username chosen at registration |
{email} | Email address the user registered with |
{account_activation_link} | Email verification / activation URL |
{admin_email} | Site admin email address |
{site_url} | Full URL of your WordPress site |
{site_name} | Site title from Settings > General |
{submitted_registration} | All fields submitted during registration |
This is the template I built for a Pointricity loyalty platform project. It includes the activation button, shows the submitted email address, and links back to the site. Replace the branding text with your own.
<?php if ( ! defined( 'ABSPATH' ) ) exit; ?>
<div style="max-width: 560px; padding: 20px; background: #ffffff; border-radius: 5px; margin: 40px auto; font-family: Open Sans, Helvetica, Arial; font-size: 15px; color: #666;">
<div style="color: #444444; font-weight: normal;">
<div style="text-align: center; font-weight: 600; font-size: 26px; padding: 10px 0; border-bottom: solid 3px #eeeeee;">
Welcome to {site_name}!
</div>
</div>
<div style="padding: 0 30px 30px 30px; border-bottom: 3px solid #eeeeee;">
<div style="padding: 30px 0; font-size: 18px; text-align: center; line-height: 32px;">
Hi {display_name}, your account is almost ready.<br /><br />
Click the button below to verify your email and complete registration.
</div>
<div style="padding: 10px 0 40px 0; text-align: center;">
<a href="{account_activation_link}" style="background: #0073aa; color: #fff; padding: 12px 30px; text-decoration: none; border-radius: 3px; letter-spacing: 0.3px; font-weight: 600;">
VERIFY MY EMAIL
</a>
</div>
<p style="font-size: 13px; color: #999;">
Registered email: {email}
</p>
<p style="font-size: 13px; color: #999;">
If you have any problems, contact us at
<a href="mailto:{admin_email}" style="color: #0073aa;">{admin_email}</a>
</p>
</div>
<div style="color: #999; padding: 20px 30px; font-size: 13px;">
Thank you,<br />
The <a href="{site_url}" style="color: #0073aa;">{site_name}</a> Team
</div>
</div>
If your site uses multiple Ultimate Member roles - for example a "Vendor" role and a "Customer" role - you'll want to send different welcome emails to each. The theme override approach above gives you one template for everyone. For role-specific emails, use the um_email_templates filter to register a separate template per role, then hook into um_after_register_user to trigger the right one.
Here's the basic pattern to add to your theme's functions.php:
add_filter( 'um_email_templates', function( $templates ) {
$templates['welcome_email_vendor'] = array(
'key' => 'welcome_email_vendor',
'title' => 'Welcome Email - Vendor',
'subject' => 'Welcome to {site_name} - Vendor Account',
);
return $templates;
} );
add_action( 'um_after_register_user', function( $user_id ) {
$user = get_userdata( $user_id );
if ( in_array( 'vendor', (array) $user->roles ) ) {
UM()->mail()->send( get_userdata( $user_id )->user_email, 'welcome_email_vendor' );
}
}, 10, 1 );
Create the matching template file at wp-content/themes/your-theme/ultimate-member/email/welcome_email_vendor.php and Ultimate Member will use it for that role.
The theme override approach keeps your customizations intact across every Ultimate Member update, which is the main thing most developers get wrong the first time.