Date based rules

Date-based rules are a type of AutomateWoo workflow rule. Use them to compare a date available to the workflow, such as a customer’s first paid order date, with a period, a date, selected weekdays, or a date range.

The available comparison types depend on the date field. A date that can only be in the past, such as a customer’s last paid order date, offers past comparisons. A future date, such as a subscription’s next payment date, offers future comparisons.

AutomateWoo evaluates dates in the site timezone configured under Settings > General.

Add a date-based rule

↑ Back to top
  1. Open an AutomateWoo workflow and choose a trigger that makes the date you need available.
  2. In the Rules section, select + Add Rule Group.
  3. Choose a rule whose name ends in Date or Date/Time.
  4. Select a comparison type and enter its value. Relative comparisons accept Hours or Calendar days.
  5. Add more rules with AND, or add another rule group when you need OR logic.

Comparison types

↑ Back to top
ComparisonHow it works
Is in the nextThe date falls within the next number of hours or calendar days.
Is not in the nextThe date is outside the upcoming period. For example, a payment due in 13 hours matches a rule set to Is not in the next 12 hours.
Is in the lastThe date falls within the previous number of hours or calendar days.
Is not in the lastThe date does not fall within the previous number of hours or calendar days.
Is afterThe date is later than the selected date. If the rule offers a time and you enter one, the comparison is against that date and time.
Is beforeThe date is earlier than the selected date. If the rule offers a time and you enter one, the comparison is against that date and time.
Is onThe date matches the selected date. If you enter an optional time, the hour and minute must also match.
Is not onThe date differs from the selected date or, if you enter an optional time, from the selected date and time.
Is on day/s of the weekThe date falls on one of the selected weekdays.
Is in the rangeThe date falls between two selected dates, including both boundary dates.
Is not setThe date field has no value.
Is setThe date field has a value.

Hours count back or forward from the current time. Calendar days count back to the start of the earlier day or forward to the end of the later day in the site timezone. For example, if the rule runs on Monday at 3 p.m., the last 1 Calendar day starts at midnight at the start of Sunday. The last 24 Hours start at 3 p.m. on Sunday.

When a date is not set

↑ Back to top

An empty date matches Is not set, Is not in the next, Is not in the last, and Is not on when those options are available. To require an existing date, add Is set with AND in the same rule group.

Common reasons a date can be empty include the following.

  • A customer’s first or last paid order date is not set if the customer has never paid for an order.
  • A customer’s account-created date is not set for a guest customer.
  • Optional subscription dates may not be set.
  • The workflow’s last run date for a customer is not set until that workflow has run for the customer.

Usage examples

↑ Back to top

Exclude customers who purchased recently

↑ Back to top

In a cart-abandonment workflow, set Customer – Last Paid Order Date to Is not in the last 7 Calendar days. Customers without a paid order also match.

Avoid repeating a workflow too soon

↑ Back to top

Set Workflow – Last Run Date For Customer to Is not in the last 30 Calendar days. Customers the workflow has never run for also match.

Target accounts created during a promotion

↑ Back to top

Set Customer – Account Created Date to Is in the range and enter the first and last days of the promotion. Both dates are included.

Avoid asking for another review too soon

↑ Back to top

Set Customer – Last Review Date to Is not in the last 30 Calendar days to exclude customers who reviewed recently.

Limit a promotion to recent first-time buyers

↑ Back to top

Set Customer – First Paid Order Date to Is in the last 30 Calendar days to include recent first-time buyers.

Before enabling the workflow, test it with a record that should match and one that should be excluded. If results differ from what you expect, check the date on the record, whether the rule uses Hours or Calendar days, and the site timezone under Settings > General.

Questions and support

↑ Back to top

Something missing from this documentation? Still have questions and need assistance?

  • If you have a question about an extension or theme you’d like to purchase, visit our contact page and use the AI Assistant or contact options.
  • If you already purchased this product and need some assistance, get in touch with a Happiness Engineer via our support page and select this product’s name from the Product dropdown.

Related Products

WooCommerce Subscriptions is a WooCommerce extension that lets customers subscribe to your products or...

Offer add-ons like gift wrapping, special messages or other special options for your products.

Use of your personal data
We and our partners process your personal data (such as browsing data, IP Addresses, cookie information, and other unique identifiers) based on your consent and/or our legitimate interest to optimize our website, marketing activities, and your user experience.