Branded Emails
Orbit provides a clean HTML email template system that automatically wraps default WordPress system emails and Gravity Forms notifications in a responsive, modern HTML layout.
Features
- Automated Wrapping: Converts plain text emails sent via
wp_mail()into formatted HTML emails. - Gravity Forms Integration: Formats Gravity Forms notification emails using the same branded template.
- WooCommerce Design Parity: When WooCommerce is active, Orbit automatically inherits WooCommerce email colors, fonts, and header styling settings to maintain visual consistency across all outgoing emails.
- Developer Template Overrides: Allows complete customisation of email HTML markup and CSS inline styles within your theme.
Overriding Email Templates in Themes
You can override Orbit's default email template files by copying them into your active theme:
| Default Orbit File | Theme Override Location | Purpose |
|---|---|---|
templates/branded-emails/email-template.php | yourtheme/orbit/branded-emails/email-template.php | Outer HTML structure & layout markup |
templates/branded-emails/email-styles.php | yourtheme/orbit/branded-emails/email-styles.php | CSS styles passed to Emogrifier for inline styling |
Template Hierarchy
Orbit searches for overrides in your child theme first, falling back to parent themes, and finally to Orbit's default templates.
Customising Email Styling via Filters
Orbit provides filter hooks to customise email branding variables without needing to override full template files:
php
// Set a custom logo URL for email headers
add_filter( 'orbit_branded_emails_header_logo', function() {
return 'https://example.com/wp-content/uploads/email-logo.png';
} );
// Set header logo width in pixels
add_filter( 'orbit_branded_emails_logo_image_width', function() {
return 160;
} );
// Customise email background and link colors
add_filter( 'orbit_branded_emails_background_color', fn() => '#f4f5f7' );
add_filter( 'orbit_branded_emails_link_color', fn() => '#0055ff' );
add_filter( 'orbit_branded_emails_font_family', fn() => 'Arial, sans-serif' );Complete Styling Filters
| Filter | Description | Default Fallback |
|---|---|---|
orbit_enable_branded_emails | Enable/disable branded email wrapping | true |
orbit_branded_emails_header_logo | Header logo image URL | '' |
orbit_branded_emails_logo_image_width | Header logo image width in pixels | WooCommerce logo width or 120 |
orbit_branded_emails_background_color | Outer email background color | WooCommerce background color or #ffffff |
orbit_branded_emails_body_background_color | Email content container background | WooCommerce body background or #ffffff |
orbit_branded_emails_body_border_color | Border color around content box | Theme custom border var or #edeff1 |
orbit_branded_emails_body_text_color | Primary body copy color | WooCommerce text color or #3f474d |
orbit_branded_emails_link_color | Hyperlink color | WooCommerce base color or #8549ff |
orbit_branded_emails_footer_text_color | Footer text color | WooCommerce footer color or #3f474d |
orbit_branded_emails_font_family | CSS font family stack | WooCommerce font stack or "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif |
Disabling Branded Emails
If another plugin handles email templates or you prefer raw plain-text emails, disable Orbit's email module:
php
add_filter( 'orbit_enable_branded_emails', '__return_false' );