1.3 Quick Start: Creating Your First Rule

This tutorial will walk you through creating one of the most common and useful automation rules: automatically completing any order that consists solely of virtual products. This is perfect for stores that sell items like digital downloads, services, or memberships.

The rule creation interface uses an intuitive WHEN/IF/THEN structure that makes building automations straightforward and logical.

Step 1: Navigate to the Rules Page

From your WordPress admin dashboard, go to WooCommerce → Order Rules.

Step 2: Add a New Rule

Click the “Add New” button to create a new completion rule.

Step 3: Give Your Rule a Descriptive Name

In the “Rule Name” field, enter a clear and descriptive name. For this example, let’s use:

Auto-Complete Virtual Product Orders

A good name is crucial for identifying which rule was executed when you review the Audit Log later.

You can also add a longer description of the completion rule for internal documentation.

Step 4: Define the Trigger

The trigger is the specific WooCommerce event that will initiate your rule.

  1. In the Rule Builder interface, locate the “WHEN” section (Trigger).
  2. Click “+ Add Trigger” to open the trigger selector.
  3. Select “Order is Processing” from the list. This tells the daemon to check the order’s contents as soon as it has been paid for and is marked as “Processing”.

In the WooCommerce lifecycle (Order Creation → Payment Processing → Status Transitions → Completion), the woocommerce_payment_complete event is the most reliable and timely moment to evaluate completion rules for most stores:

  • Aligns with successful payment confirmation from the gateway
  • Ideal for virtual/digital orders that should complete immediately
  • Minimizes false positives compared to earlier status changes
  • Runs asynchronously via Action Scheduler to avoid checkout latency If your gateway does not fire payment_complete (e.g., bank transfer), consider status-based triggers like On Hold or Processing to match your workflow. See Understanding Triggers for more details on lifecycle-aligned choices.

Step 5: Define the Conditions

Conditions are the criteria that an order must meet for the rule to apply.

  1. In the “IF” section (Conditions), click “+ Add Condition”.
  2. Select “Product Type” from the condition selector.
  3. In the condition settings panel that appears:
    • Check the box for “All products are virtual”.
    • Ensure the box for “All products are downloadable” is unchecked (unless you want to require both).

Your condition is now correctly set to apply only to orders containing exclusively virtual products.

Step 6: Define the Action

The action is what Order Daemon will do once the trigger has fired and all conditions are met.

  1. In the “THEN” section (Actions), under “Primary Action”, click “+ Add Primary Action”.
  2. Select “Change status to ‘Completed'” from the action selector. This is the default action.

Step 7: Save and Enable Your Rule

  1. Click the “Publish” button to save and activate your new rule.

Note, in the free version, only one rule can be active (published) at any time. For unlimited completion rules, check out the pro version.

Your Automation is Live.

You have successfully created your first automation rule.

From now on, any time a customer places an order that contains only virtual products, the Order Daemon will instantly and automatically change its status to “Completed” the moment the order enters the “Processing” state.

To see it in action, place a test order with a virtual product. Afterward, go to WooCommerce → Order Daemon to access the Insight Dashboard. You will see a detailed entry in the log stream showing that your new rule was triggered and successfully completed the order.

Was this article helpful?

  • Loading...
Table of Contents
  • Loading...