Order Daemon is designed to be extended. The triggers, conditions, and actions that ship with the plugin are built using exactly the same component API that is available to you. There is no internal-only surface. When you register a custom component, it appears in the Rule Builder alongside the built-ins, behaves identically in rule evaluation, and is logged the same way in the Insight Dashboard.
This makes Order Daemon a foundation for automation rather than a fixed set of features. A plugin integrating with Order Daemon can add components that are entirely unknown to this codebase at install time.
The component model
Every trigger, condition, and action is a registered component. Components declare their type, a unique slug, display metadata (label, description, icon), and a configuration schema that drives the Rule Builder UI automatically. You do not write any Rule Builder UI code. The schema tells the builder what fields to show, and your component receives the saved values at evaluation time.
Triggers declare what WooCommerce or WordPress event they listen to and what order data they pass downstream. Conditions receive that data and return pass or fail. Actions receive the data and perform a side effect.
Three ways to extend
1. Register a custom component
Use the odcm_register_trigger, odcm_register_condition, or odcm_register_action hooks to add your component to the registry. Registration happens at init priority 20, after Order Daemon’s own components are loaded. Your class extends the relevant base class and implements the required interface.
add_action( 'odcm_register_conditions', function( $registry ) {
$registry->add( new My_Plugin_Stock_Condition() );
} );Once registered, the component is available in every Rule Builder dropdown on the site with no further configuration.
2. Hook into rule execution events
Order Daemon fires standard WordPress action and filter hooks at key points in rule evaluation. You can run your own logic before a rule evaluates, after an action fires, or when a rule is skipped due to a condition failure. These hooks are documented in Hooks & Filters Reference.
add_action( 'odcm_after_action_fired', function( $rule, $order, $result ) {
// React to a successful rule execution
}, 10, 3 );This is the right approach when you want to observe or react to rule execution without adding new components to the builder.
3. Extend the audit log
Custom components and integrations can write structured entries to the Order Daemon audit log. This keeps all automation activity for an order in one place, whether it came from a built-in component or your own code. The log extension API is covered in Audit Log Extensions.
The built-in component catalog
The Built-in Component Catalog is the canonical reference for every trigger, condition, and action that ships with Order Daemon. When writing a custom component, use the catalog to check whether something equivalent already exists and to understand the naming and schema conventions the built-ins follow. Consistency with the built-ins makes your component easier for store owners to configure.
Contributing
If you build a component or integration that would be useful to the broader WooCommerce community, it could become a built-in. Order Daemon ships with exactly the architecture described here, so the path from a third-party component to a bundled one is straightforward. See Architecture for the codebase layout and how to get in touch.
Child docs in this section
- Architecture covers the plugin structure, load order, and where to find things in the codebase
- Creating Custom Components is the step-by-step guide for building triggers, conditions, and actions
- Built-in Component Catalog is the full reference for every shipped component
- Hooks & Filters Reference documents every action and filter hook Order Daemon exposes
- Audit Log Extensions covers writing custom log entries
- Security Guards explains the capability checks and nonce handling your components should implement
- Settings Schemas documents the schema format used to define component configuration fields