---
title: How to Add Custom Triggers
description: "Add custom triggers to send a WooCommerce email on almost any action hook: where to add them, the format, and what they receive."
url: "https://wpfactory.com/docs/add-custom-triggers/"
updated: "2026-10-05"
category: How to
---

# How to Add Custom Triggers

A trigger is the event that sends a custom email. Alongside the built-in order, subscription, and Extra triggers, [Additional Custom Emails & Recipients for WooCommerce](https://wpfactory.com/item/custom-emails-for-woocommerce/) lets you turn almost any WordPress or WooCommerce action hook into a trigger of your own. This is how you send an email off an event the plugin does not list by default, for example a hook added by another plugin.

Custom triggers are added on the plugin's own tab and then appear in every email's Triggers list.

![General Options Advanced Options section of Custom Emails, showing the Custom triggers field](https://wpfactory.com/wp-content/uploads/General-Options-2.png)

### Where to add them

Go to **WPFactory > Custom Emails > General** (also reachable at **WooCommerce > Settings > Custom Emails > General**) and open the **Advanced Options** section. The **Custom triggers** field (option ID `alg_wc_custom_emails_custom_triggers`) is a text area, one trigger per line.

### The format

Each line is either the action hook name on its own, or the hook name and a display label separated by a vertical bar:

| Format | Example | Result in the Triggers list |
| --- | --- | --- |
| `action` | `woocommerce_checkout_order_processed` | Listed under its raw hook name. |
| `action|title` | `woocommerce_checkout_order_processed|Checkout order processed` | Listed as "Checkout order processed" (easier to recognize). |

Use the labeled form whenever you can. The label is only cosmetic, but it makes the per-email Triggers list readable.

### Using the trigger

Save the General tab, then open any email under **WooCommerce > Settings > Emails**. The **Triggers** field now shows a **Custom triggers** group containing every line you added. Select it like any other trigger. The email is then sent whenever that action fires, subject to the same per-email Order Options as the built-in triggers.

Custom triggers are always available in the Triggers list once defined; they do not depend on the **Enabled triggers groups** setting that governs the built-in groups.

### What the trigger receives

When the action fires, the plugin reads the hook's first argument as the object to send the email for. If that argument is an object with a `get_id()` method (an order, a subscription, a product), the plugin resolves its ID automatically; if it is already an ID, it is used directly. The plugin then decides the email context from that object:

- An order ID produces an **order** email, so order shortcodes such as `[order_number]` resolve.
- A product ID produces a **product** email.
- A user ID produces a **user** email.

Choose hooks whose first argument matches the content you want to send. A hook that passes an order ID first is the most reliable choice for order-based emails, because the Order Options and order shortcodes then have something to work with.

### A worked example

Suppose another plugin fires `my_plugin_membership_activated` with a user ID as its first argument when a membership goes live. Add this line to Custom triggers:

```
my_plugin_membership_activated|Membership activated
```

Save, open your welcome email, select **Membership activated** in Triggers, and set the recipient to `%customer%` or a user-oriented address. The email now sends each time that membership hook runs.

### Notes and limits

- The hook must actually fire on your site. A misspelled or non-existent action name is accepted in the field but never triggers anything.
- Only the hook's **first** argument is used to identify the object. Hooks that pass their ID in a later argument will not resolve an object automatically.
- Custom triggers respect the **Delay** field and every Order Options condition, exactly like built-in triggers.

### Ready to wire up your own events?

[Additional Custom Emails & Recipients for WooCommerce](https://wpfactory.com/item/custom-emails-for-woocommerce/) Pro lets you attach custom triggers to unlimited emails, each with its own recipients and content. [Get the plugin](https://wpfactory.com/item/custom-emails-for-woocommerce/) to send an email off any event in your store.

Related articles

- [Understanding Custom Emails: Triggers, Delays, and Scheduling](https://wpfactory.com/docs/custom-email-insights/)
- [Custom Email Triggers Reference](https://wpfactory.com/docs/custom-emails-triggers-reference/)
- [Send a Custom Email from the Order Screen](https://wpfactory.com/docs/send-custom-email-from-order-screen/)
- [Order Targeting: Send Custom Emails Only for Certain Orders](https://wpfactory.com/docs/advanced-admin-order/)
- [Crafting Custom Email Content: Subject, Type, and Body](https://wpfactory.com/docs/crafting-email-content/)
