Common issues and debugging techniques when extending or integrating with Order Daemon.
CLI commands not found
Symptom: wp odcm commands return “command not found.”
Fix: CLI commands are Pro-only. Ensure the Pro plugin is installed and active:
wp plugin list --field=name,status | grep -E 'order-daemon|completion'Rules not firing
- Check the rule is enabled:
wp odcm rule list --status=active - Confirm the trigger event actually occurred (e.g., payment gateway fired, status changed correctly).
- Inspect conditions – all must pass. Check the Insight Dashboard timeline for the order.
- Examine audit logs:
wp odcm log list --order-id=<id> --type=rule_execution --format=json - Simplify: remove conditions one by one to find which one is blocking.
Permission denied errors
Ensure the user has manage_woocommerce capability. Verify programmatically:
if (!current_user_can('manage_woocommerce')) {
// Access denied
}For REST 403 errors: if your rule payload includes a Pro component and Pro is not active, the API returns 403 – that’s an entitlement issue, not a permissions issue.
Custom component not appearing in the Rule Builder
- Confirm the hook fired: add
error_log('odcm_register_conditions fired')inside your callback temporarily. - Check
get_id()returns a unique string with no special characters. - Ensure your plugin loads before
odcm_register_conditionsfires (hook atinitpriority ≤ 10). - If using namespaces, verify autoloading includes your class.
Audit log analysis
# Recent logs
wp odcm log list --limit=50 --format=json
# Filter by order and type
wp odcm log list --order-id=123 --type=error --format=json
# Webhook-specific
wp odcm log list --type=webhook --format=json
# View a specific entry
wp odcm log view --id=456 --format=jsonHealth checks
# Full health check
wp odcm health check --format=json
# Performance category
wp odcm health check --category=performance --format=table
# API/REST category
wp odcm health check --category=apiRules behave differently in staging vs production
Export and compare configurations:
wp odcm config export --format=json --output=staging-config.json
# Compare with production export
wp odcm config diff --local=reference-config.jsonKeep plugin versions, WP, and WooCommerce versions identical across environments.
What’s next
- CLI and automation – Full CLI command reference
- Creating custom rule components – Component development guide
- Audit log extensions – Structured logging reference
- REST API overview – REST API reference