MyListing | WooCommerce Email Templates
The {CODICTS} MyListing | WooCommerce Email Templates plugin lets you create fully custom HTML email templates for both MyListing theme notifications and WooCommerce transactional emails. Instead of editing theme template files directly, you design email templates in a built-in code editor with syntax highlighting, use simple
placeholders for dynamic content, and the plugin compiles and deploys the finished templates automatically.
Templates are assigned directly from MyListing’s notification settings page or WooCommerce’s email settings page — the plugin injects a dropdown selector into each, so you never leave the familiar settings interface.
Installation & Activation
Start by downloading the plugin from the Downloads page on your dashboard on the CoDicts website.
After downloading, install and activate the plugin in WordPress by navigating to “Plugins” > “Add New” > “Upload Plugin” and selecting the downloaded zip file. Click “Install Now” and then “Activate”.
On activation, the plugin adds an “Email Templates” menu item in the admin sidebar with the CoDicts {C} icon. It also deploys any previously saved template assignments to the child theme.
Key Features
| Feature | Description |
|---|---|
| Custom HTML Email Templates | Create fully custom HTML email templates using a built-in code editor with syntax highlighting. |
| Dual Platform Support | Works with both MyListing theme notifications and WooCommerce transactional emails. |
| CodeMirror Editor | Full-featured code editor with syntax highlighting (Material dark theme), line numbers, bracket matching, and autocomplete. |
| Tag-Based Placeholders | Simple [tag-name] syntax for inserting dynamic content like recipient names, listing details, or order information — no PHP required. |
| Conditional Tags | Show or hide content blocks based on conditions (e.g., claim status approved/pending/declined). |
| PHP Support | Embed raw PHP code directly in templates for advanced customization. |
| Inline Assignment | Assign templates directly from MyListing or WooCommerce email settings pages via injected dropdown selectors. |
| Template Management | Full CRUD — create, edit, duplicate, delete, search, and paginate templates. |
| Auto HTML Wrapping | Automatically wraps your template body in a proper HTML document structure with MyListing brand color styling. |
| Admin-Aware Templates | Automatically adjusts receiver fields for admin-facing notification templates. |
| Email Reports Integration | Compatible with {CoDicts} MyListing Email Reports plugin for stats-based email tags. |
| WooCommerce Wallet Support | Compatible with WooCommerce Wallet (TeraWallet) email templates. |
How It Works
The plugin works in three stages:
1. Create a template — You write an HTML email template in the built-in code editor, using [tag] placeholders for dynamic content like [reciever-name] or [listing-name].
2. Assign the template — From MyListing’s notification settings or WooCommerce’s email settings, you select your template from a dropdown that the plugin injects into the settings page.
3. The plugin compiles and deploys — When you save settings, the plugin replaces all [tag] placeholders with the appropriate PHP code and writes the compiled template file to the child theme directory. MyListing and WooCommerce then automatically use your custom template when sending emails.
For example, you write:
<h1>Hi [reciever-name],</h1>
<p>Your listing <a href="[listing-url]">[listing-name]</a> has been updated.</p>
And the recipient receives:
<h1>Hi John,</h1>
<p>Your listing <a href="https://example.com/listing/sunrise-cafe">Sunrise Café</a> has been updated.</p>
Accessing the Email Templates Manager
1. In the WordPress admin sidebar, click “Email Templates” (identified by the CoDicts {C} icon).
2. This displays the template list table showing all created templates with their title, type, author, and date.
Alternatively, go to Plugins → Installed Plugins, find the plugin, and click the Settings link.
Creating a New Email Template
1. From the Email Templates list page, click “Add New”.
2. Enter a title for your template (e.g., “Custom Welcome Email”).
3. Select the Template Type:
| Type | Use For |
|---|---|
| My Listing | MyListing theme notification emails (listing submitted, listing approved, claim updates, etc.). |
| WooCommerce | WooCommerce transactional emails (new order, processing order, completed order, reset password, etc.). |
4. The available tags update based on the selected type — MyListing tags or WooCommerce tags are shown above the editor.
5. Write your HTML email content in the CodeMirror code editor. Use the [tag] placeholders shown above the editor for dynamic content.
6. Click Save.
Important: The template type cannot be changed after the template is first saved. Create a new template if you need a different type.
Editing an Existing Template
1. From the Email Templates list page, click the template’s title or the Edit link in the row actions.
2. Modify the title or HTML body as needed.
3. Click Save.
If this template is currently assigned to a notification, the compiled file in the child theme is automatically regenerated.
Duplicating a Template
Click the Duplicate button in the Status sidebar (when editing) or the Duplicate link in the row actions on the list page. A copy is created with _copy appended to the title. The duplicate is independent — changes to one do not affect the other.
Deleting a Template
Click the Delete button in the Status sidebar (when editing) or the Delete link in the row actions. For bulk deletion, check multiple templates and select Delete from the Bulk Actions dropdown. When a template is deleted, its compiled file is also removed from the child theme — the notification reverts to the default email template.
Assigning Templates to MyListing Notifications
1. Navigate to Starter Theme → Settings → Notifications (MyListing’s settings page).
2. For each notification type (e.g., “Listing Submitted,” “Listing Approved”), a dropdown selector appears below the enable/disable toggle.
3. The dropdown lists all templates of type My Listing.
4. Select a template to assign it to that notification. The dropdown is only visible when the notification is set to “enabled.”
5. Click Save Changes.
The plugin compiles and deploys the template file to the child theme. The next time that notification fires, your custom template is used.
Assigning Templates to WooCommerce Emails
1. Navigate to WooCommerce → Settings → Emails.
2. Click on a specific email type (e.g., “New order,” “Processing order”).
3. A new row appears in the email settings with a template dropdown listing all templates of type WooCommerce.
4. Select a template and click Save changes.
Note: When a WooCommerce email template is assigned, the plugin automatically forces the “Email type” to HTML and disables the email type selector, because custom templates require HTML mode.
Reverting to the Default Template
To revert any notification to its default template, go to the notification’s settings page, change the template dropdown back to “– Select A Template –“, and save. The compiled file is removed and the default template is used.
Using Template Tags
Template tags are placeholders written as [tag-name] in your template body. At compile time, they are replaced with PHP code that outputs dynamic content. For example:
<h1>Hello [reciever-name],</h1>
<p>Your listing <a href="[listing-url]">[listing-name]</a> has been updated.</p>
Available tags are displayed above the code editor and update based on the selected template type (My Listing or WooCommerce).
Note: The tag names
[reciever-email]and[reciever-name]use this exact spelling. The plugin will not recognize[receiver-email]with an “i.”
Using Conditional Tags
Conditional tags let you show content only when certain conditions are met. They use an opening [tag] and closing
syntax:
[claim-status-approved]
<p>Your claim has been approved! 🎉</p>
[/claim-status-approved]
[claim-status-declined]
<p>Unfortunately, your claim has been declined.</p>
[/claim-status-declined]
The content between the tags only renders when the condition matches (e.g., claim status is “approved”).
Using PHP in Templates
For advanced customization, you can embed raw PHP directly in your templates:
<p>Current date: <?php echo date('F j, Y'); ?></p>
<p>Site name: <?php echo get_bloginfo('name'); ?></p>
Important: Because templates support raw PHP, only trusted administrators should have access to create or edit templates.
MyListing Template Tags
| Tag | Description |
|---|---|
[reciever-email] | The email address of the notification recipient. |
[reciever-name] | The first name of the notification recipient. |
[listing-name] | The name/title of the listing. |
[listing-url] | The URL/permalink of the listing. |
[user-profile-url] | The profile edit URL of the claimer (for claim notifications). |
[claimer-name] | The first name of the user who submitted a claim. |
[mylisting-default-message] | The default notification message from MyListing. |
MyListing Conditional Tags
| Opening Tag | Closing Tag | Condition |
|---|---|---|
[claim-status-approved]
[/claim-status-approved]
Content shown only when a claim is approved.
[claim-status-pending]
[/claim-status-pending]
Content shown only when a claim is pending.
[claim-status-declined]
[/claim-status-declined]
Content shown only when a claim is declined.
Admin-facing templates: When a template is assigned to an admin notification (notification key contains "admin"), the [reciever-email] tag automatically outputs the site admin email and [reciever-name] outputs "Admin."
WooCommerce Template Tags
Tag Description [reciever-email]The billing email of the order customer. [reciever-name]The billing first name of the order customer. [user-reset-password-link]Password reset URL (for reset password emails). [order_details]Renders the full WooCommerce order details table. [order_meta]Renders order meta data. [customer_details]Renders customer billing/shipping details.
Email Reports Tags (Add-on)
If the {CoDicts} MyListing Email Reports plugin is active, additional stats-based tags become available for MyListing templates. These appear in a separate "Email Reports Tags" section in the template editor. When Email Reports tags are used, the plugin automatically injects the required CSS and stats retrieval code into the template.
Auto HTML Wrapping
You do not need to write a full HTML document structure. If your template body does not contain <html> tags, the plugin automatically wraps it in a proper HTML document with:
Element What's Included Document structure DOCTYPE, html, head, and body tags with charset and viewport meta. Site title Your site name in the <title> tag. Brand color styles (MyListing only) Automatic styling for headings, links, and buttons using your MyListing brand color. Button classes (MyListing only) Pre-styled .mbtn and .btn classes for call-to-action buttons matching your brand color.
If you need full control over the HTML structure, include your own <html> tags and the auto-wrapping is skipped.
Supported WooCommerce Email Types
Email Type Description New order (admin) Sent to admin when a new order is placed. Cancelled order (admin) Sent to admin when an order is cancelled. Failed order (admin) Sent to admin when an order fails. On-hold order (customer) Sent to customer when order is placed on hold. Processing order (customer) Sent to customer when order starts processing. Completed order (customer) Sent to customer when order is completed. Refunded order (customer) Sent to customer when order is refunded. Customer invoice Invoice email sent to customer. Customer note Note added to order sent to customer. Reset password Password reset link email. New account New customer account creation email. New wallet transaction WooCommerce Wallet transaction notification. Low wallet balance WooCommerce Wallet low balance alert.
Example Setup
1. Activate the plugin with a child theme active.
2. Go to Email Templates in the admin sidebar and click Add New.
3. Enter the title "Custom Listing Approved."
4. Select template type My Listing.
5. In the code editor, write your HTML template using tags:
<h1>Great news, [reciever-name]!</h1>
<p>Your listing <strong>[listing-name]</strong> has been approved and is now live.</p>
<a href="[listing-url]" class="mbtn mbtn1">View Your Listing</a>
6. Click Save.
7. Navigate to Starter Theme → Settings → Notifications.
8. Find the "Listing Approved" notification. In the template dropdown below the toggle, select "Custom Listing Approved."
9. Click Save Changes.
The plugin compiles the template — replacing tags with PHP code, wrapping in HTML with brand color styles — and deploys the file to the child theme. The next time a listing is approved, the user receives your custom email with their name, listing name, and a branded "View Your Listing" button.
Frequently Asked Questions
Does this require a child theme?
Yes. The plugin writes compiled template files to the child theme directory. Without a child theme, all functionality is disabled.
Does this require the MyListing theme?
No. The plugin works with any child theme. It supports both MyListing notifications and WooCommerce emails. You need at least one of: a MyListing child theme (for MyListing templates) or WooCommerce (for WooCommerce templates).
Is there a settings page?
The plugin has its own Email Templates admin page for creating and managing templates. Template assignment is done from the existing MyListing notification settings or WooCommerce email settings pages.
Can I use the same template for multiple notifications?
Yes. A single template can be assigned to multiple notifications. Each compiles a separate file with the same content.
Can I change the template type after saving?
No. The template type (My Listing or WooCommerce) is locked after the first save because different types use different tags. Create a new template with the correct type instead.
What happens when I delete an assigned template?
The compiled file is removed from the child theme and the notification reverts to the default email template provided by MyListing or WooCommerce.
How do I revert to the default email?
Go to the notification's settings page, change the template dropdown back to "-- Select A Template --", and save. The compiled file is removed and the default template is used.
Do templates update automatically when I edit them?
The template is saved to the database immediately. The compiled file in the child theme is regenerated when you save the template from the editor or when the template assignment is saved from MyListing/WooCommerce settings. You can also deactivate and reactivate the plugin to force all files to regenerate.
Is there an email preview feature?
No. To test templates, trigger the actual notification event and check the received email.
What happens when I switch themes?
The plugin automatically re-deploys all template files to the new child theme's directory when you switch themes.
What happens when I deactivate the plugin?
All compiled template files are removed from the child theme. The templates themselves (stored in the database) are preserved. Reactivating the plugin re-deploys all assigned templates.
Does the plugin create any database tables?
No. Templates are stored as a custom post type in the standard WordPress tables.
Troubleshooting
Email Templates Menu Not Appearing
Cause Solution No child theme active A child theme must be active. Go to Appearance → Themes and activate a child theme. Plugin not activated Go to Plugins → Installed Plugins and verify the plugin is active.
Template Dropdown Not Appearing in MyListing Settings
Cause Solution No templates created Create at least one template of type My Listing first. Notification is disabled The template dropdown only appears when the notification is set to "enabled." Enable the notification first. Wrong template type Only My Listing-type templates appear on the MyListing settings page. WooCommerce-type templates appear on WooCommerce settings pages.
Template Dropdown Not Appearing in WooCommerce Settings
Cause Solution No templates created Create at least one template of type WooCommerce first. Not on individual email page The dropdown appears on individual email settings pages (e.g., WooCommerce → Settings → Emails → New order), not on the main Emails list.
Tags Not Being Replaced in Emails
Cause Solution Wrong tag spelling Tags must be spelled exactly as shown — [reciever-name] (not [receiver-name]). Check spelling carefully. Wrong template type MyListing tags only work in My Listing-type templates, and WooCommerce tags only work in WooCommerce-type templates. Template not re-compiled Re-save the template assignment from the settings page, or deactivate and reactivate the plugin to force recompilation.
Email Not Using Custom Template
Cause Solution Template not assigned Creating a template is not enough — it must also be assigned to a notification from the MyListing or WooCommerce settings page. Compiled file missing Deactivate and reactivate the plugin to re-deploy all template files. File permissions The child theme directory must be writable. Check file permissions on the server. Caching Some email or object caching plugins may serve cached versions. Clear caches and test again.
WooCommerce Email Type Locked to HTML
This is expected behavior. When a custom template is assigned, the plugin forces the email type to HTML because custom templates require HTML rendering. To restore the email type selector, change the template dropdown back to "-- Select A Template --" and save.
"Child Theme Not Detected" Error
A child theme must be active. Go to Appearance → Themes and activate a child theme.
For further support, visit codicts.com or contact us at support@codicts.com.
CoDicts Co., Ltd. © 2021-2026. All rights reserved