Skip to content

BE-Zizoo/woocustomemails

 
 

Repository files navigation

WC Custom Emails Per Product

A WooCommerce plugin that lets you add custom content per product into order status notification emails. Fully compatible with WooCommerce HPOS (High Performance Order Storage) and tested with the latest WordPress and WooCommerce versions.

WC tested up to WP tested up to HPOS Compatible License: GPL v2


About This Fork

This is a maintained fork of alexmustin/woocustomemails, updated to be fully compatible with:

  • WooCommerce 7.0–9.4 (including HPOS / Custom Order Tables)
  • WordPress 6.4–6.7
  • PHP 7.4+

What Changed in v3.0.0

  • HPOS compatible — declares custom_order_tables support via FeaturesUtil
  • ✅ Updated plugin headers: WC tested up to 9.4, requires WP 6.4+, PHP 7.4+
  • ✅ Removed deprecated &$this references in admin class constructors
  • ✅ Fixed broken wp_verify_nonce() usage on admin settings tab
  • ✅ Fixed undefined $kses_allowed_html variable in AJAX handler
  • ✅ Added proper constructor to Woo_Product_Data_Admin class
  • ✅ Version-based cache busting for admin stylesheet
  • ✅ Cleaner, fully documented code throughout

Description

WC Custom Emails Per Product lets you add custom content per product into the default WooCommerce customer order emails. Create reusable "Custom Email Messages" and assign them to specific products, order statuses, and email template locations.

Key Features

  • Assign a unique custom message per product for each order status (On Hold, Processing, Completed)
  • Choose where in the email the message appears: before/after the order table, after order meta, or after customer details
  • Prevent duplicate messages when multiple products share the same custom message
  • Option to include custom messages in admin order notification emails
  • Supports additional WooCommerce product types (configurable via plugin settings)
  • AJAX-powered live message search in the product editor
  • Fully compatible with WooCommerce HPOS (High Performance Order Storage / Custom Order Tables)

Use Cases

  • Product-specific instructions or assembly guides
  • Terms and conditions per product
  • Follow-up registration links
  • Promo codes or upsell messages per product
  • Download links or license keys inside order emails

Requirements

Requirement Minimum
WordPress 6.4
WooCommerce 7.0
PHP 7.4

Installation

  1. Download the latest release zip from the Releases page.
  2. In WordPress admin, go to Plugins → Add New → Upload Plugin.
  3. Upload the zip file and click Install Now, then Activate.
  4. A new Custom Emails menu item will appear in the WordPress admin sidebar.

Manual Installation

Upload the plugin folder to /wp-content/plugins/woo-custom-emails-per-product/ via FTP and activate it through Plugins in the WordPress admin.


Usage

Step 1 – Create a Custom Email Message

  1. Go to Custom Emails → Add New WCE Message
  2. Write your message in the editor (HTML is supported)
  3. Give it a clear title and click Publish

Note: Shortcodes and dynamically generated content will not be processed in email output.

Step 2 – Assign the Message to a Product

  1. Go to Products and edit a product
  2. Scroll down to Product Data and open the Custom Emails tab
  3. For each order status row (On Hold, Processing, Completed):
    • Search for and select a Custom Email Message
    • Choose the Content Location (where in the email it should appear)
  4. Click Update to save

Step 3 – Test

Place a test order containing the configured product and check that the custom message appears in the resulting email.


Email Content Locations

Option Description
Before Order Table Appears at the top of the email, before the order details
After Order Table Appears directly after the order items table
After Order Meta Appears after the order meta section
After Customer Details Appears at the bottom, after billing/shipping info

Plugin Settings

Go to Custom Emails → WCE Settings to configure:

  • Include in Admin Emails — Also show custom messages inside admin order notification emails
  • Display for Other Product Types — Enter comma-separated CSS class names to enable the Custom Emails tab for non-standard product types (e.g. show_if_booking)

HPOS Compatibility

This plugin is fully compatible with WooCommerce High Performance Order Storage (HPOS / Custom Order Tables). All data access uses:

  • Product meta (get_post_meta / update_post_meta on product post IDs) — not order data, fully correct
  • WooCommerce CRUD methods ($order->get_items()) — no direct wp_posts or wp_postmeta order queries

The plugin explicitly declares HPOS compatibility via:

\Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility(
    'custom_order_tables',
    __FILE__,
    true
);

Frequently Asked Questions

Why can't I see the Custom Emails tab on my product? By default the tab only shows for standard product types (simple, variable, external, downloadable, grouped). For other types (e.g. WooCommerce Bookings), add the matching CSS class under WCE Settings → Display for Other Product Types.

Why don't search results appear in the product editor? There is a known conflict with the Loom browser extension — disable it while using this plugin. Other plugins may also interfere; check your browser console for JavaScript errors.

Why does my message appear in the wrong location? When an order contains multiple products with the same Custom Email Message, the first product found determines which Content Location setting is used.

What HTML is supported in messages? All HTML tags supported by the WordPress Classic Editor are allowed.

How do I report a bug or request a feature? Open an issue: https://github.com/BE-Zizoo/woocustomemails/issues


Changelog

3.0.0 — April 2026

  • ADD: Declared compatibility with WooCommerce High Performance Order Storage (HPOS)
  • UPDATE: WC tested up to 9.4, WC requires at least 7.0
  • UPDATE: WordPress requires at least 6.4, PHP requires at least 7.4
  • FIX: Removed deprecated &$this references in admin class constructors
  • FIX: Corrected wp_verify_nonce() usage in admin settings tab handler
  • FIX: Fixed undefined $kses_allowed_html variable in AJAX search handler
  • ADD: Proper constructor added to Woo_Product_Data_Admin with version parameter
  • UPDATE: Admin stylesheet now uses version-based cache busting
  • UPDATE: Corrected parameter naming in woo_custom_emails_insert_content()

2.2.10 and earlier

See the original repository changelog.


Credits

Original plugin by Alex Mustin. This fork maintained by BE-Zizoo.


License

GPL-2.0+

About

WooCommerce plugin: add custom content per product into order emails. HPOS compatible, tested with WP 6.7 and WC 9.4. Fork of alexmustin/woocustomemails.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

No contributors

Languages

  • PHP 90.8%
  • CSS 9.2%