Sale! Tested Updated High rating Documented

Order Status Rules for WooCommerce

(4 customer reviews)

From: $19.99 / year

Manage WooCommerce order statuses. Beautifully.

$19.99 Single site1 year of updates and support30-day money-back guaranteeBuy
$49.99 Unlimited sites1 year of updates and support30-day money-back guaranteeBuy
Clear

Description

With Order Status Rules for WooCommerce plugin you can schedule automatic WooCommerce order status updates. For example: automatically change order status to cancelled, when 24 hours have passed since order status was set to pending.

Main Features

  • Set order status from.
  • Set order status to.
  • Set time trigger (in seconds, minutes, hours, days or weeks).
  • Optionally set minimum and maximum order amount.
  • Optionally set required payment gateways.
  • Optionally set required products, product categories or product tags.
  • Optionally set required users or user roles.
  • And more…

Order Status Rules Options

Settings are located in “WooCommerce > Settings > Order Status Rules”.

Order Status Rules for WooCommerce - General Settings

Total rules
Sets the number of total order status rules you want to add. Click “Save changes” to see new options.
Default: 1

Rule #X

Enable/Disable
Enables the order status rule.
Default: no
Status from
Order status to change from. Possible values: Pending payment; Processing; On hold; Completed; Cancelled; Refunded; Failed; and all other custom order statuses, if any exist.
Default: Pending payment
Status to
Order status to change to. Possible values: Pending payment; Processing; On hold; Completed; Cancelled; Refunded; Failed; and all other custom order statuses, if any exist.
Default: Cancelled
If you need to add some custom order statuses to your WooCommerce store, we suggest checking our Order Status for WooCommerce plugin.
Time trigger
Time trigger.
Default: 1
Time trigger: Units
Possible values: second(s); minute(s); hour(s); day(s); week(s).
Default: hour(s)
Skip days
Set this if you want to skip some week days, when calculating trigger time (optional).
Default: None
Minimum order amount
Minimum order amount (subtotal). If you want the rule to be applied only for orders with subtotal equal or greater than some value, you can set it here. Ignored if empty.
Default: None
Maximum order amount
Maximum order amount (subtotal). If you want the rule to be applied only for orders with subtotal equal or less than some value, you can set it here. Ignored if empty.
Default: None
Payment gateways
Required payment gateways. If you want the rule to be applied only for orders with selected payment gateways (e.g. “Direct bank transfer” and/or “Check payments”), you can set them here. Ignored if empty.
Default: None
Products
Required products. If you want the rule to be applied only for orders with selected products, you can set them here. Ignored if empty.
Default: None
Product categories
Required product categories. If you want the rule to be applied only for orders with selected product categories, you can set them here. Ignored if empty.
Default: None
Product tags
Required product tags. If you want the rule to be applied only for orders with selected product tags, you can set them here. Ignored if empty.
Default: None
User roles
Required user roles. If you want the rule to be applied only for orders from selected user roles, you can set them here. Ignored if empty.
Default: None
Users
Required users. If you want the rule to be applied only for orders from selected users, you can set them here. Ignored if empty.
Default: None
Admin title (optional)
Set this if you want add a title to the rule (visible to admin only).
Default: None
Please note that plugin must be enabled at the time order gets its initial status. If you open order’s admin edit page, you should see “Order Status History” meta box:

Order Status History – Empty

Order Status Rules for WooCommerce - Order Status History - Empty

Order Status History – Filled

Order Status Rules for WooCommerce - Order Status History - Filled

Advanced Options

Order Status Rules for WooCommerce - Advanced Options

Use WP cron
This will use WordPress crons to process the rules. If you are going to disable this option, make sure you have enabled Allow rules processing via URL option and have set up “real” (i.e. server) cron job instead. Otherwise your only option is to Run all rules now tool manually.
Default: yes
Use WP cron: WP cron interval
Possible values: Once every minute; Once every 15 minutes; Once every 30 minutes; Once hourly; Twice daily; Once daily; Once weekly.
Default: Once hourly
Allow rules processing via URL
This will allow to initiate all rules processing via URL: http://example.com?alg_wc_order_status_rules_process_rules. For example, this could be useful if you are going to disable WP crons and use “real” (i.e. server) cron jobs instead.
Default: no
On empty order status change history
Plugin must be enabled at the time order status change occurs, so there is no order status change history on initial plugin install. This can be solved by using order creation (or modification) date instead (i.e. instead of real status change date). This is ignored for orders with available real status change history. Possible values: Do nothing; Use order date created; Use order date modified.
Default: Use order date modified
Debug
Will add a log to “WooCommerce > Status > Logs”.
Default: no

Compatibility Options

Order Status Rules for WooCommerce - Compatibility Options

"Doctreat" theme
For the “Doctreat – Doctors Directory WordPress Theme” by AmentoTech.
Default: no

Tools

Order Status Rules for WooCommerce - Tools

Run all rules now
Check the box and save changes to run all rules now.
Default: no

"My Account" Options

Order Status Rules for WooCommerce - My Account Options

My Account > Orders
Adds order status history to “My Account > Orders”.
Default: no
Position
Possible values: "Status" column; New column.
Default: "Status" column
Column title
Ignored unless “New column” is selected for the “Position”.
Default: History
Template: Before
Available placeholders: %current_status%.
Default:
%current_status%
Template: Each record
Available placeholders: %record_nr%, %record_date%, %record_time%, %status_from%, %status_to%. → is a HTML code for the right arrow symbol.
Default:
<br>%status_from% &rarr; %status_to%
Template: After
Available placeholders: %current_status%.
Default: None
Reverse status history
Default: yes

4 reviews for Order Status Rules for WooCommerce

  1. Vladimiro Celardo (verified owner)

    Tom is a living legend. I have been manually processing orders for years, I was never able to use the auto-complete code snippets floating around on the web as some of my orders are back orders which need to be manually processed.
    I dropped a comment just hours ago, and within the same day Tom added a stock status conditional rule, allowing me to auto-complete in stock orders, and leave backordered orders alone, or change their status to something separate.
    This man has literally changed my life today. I cannot thank him enough for his fast work!

    • Tom Anbinder

      Thank you, Vladimiro!

  2. Richard P. (verified owner)

    The support was very fast and and resolves all my queries, it’s a excellent plugin for change status order with every configuration you are going to need in your store.

    • Tom Anbinder

      Thank you, Richard!

  3. Gustavo Satsky (verified owner)

    Thanks for the support attention. Tom has been very kind and successfully resolved my queries.

    • Tom Anbinder

      Thank you, Gustavo!

  4. FARES SAADE (verified owner)

    The best support ever.. it took Tom (the plugin developer) few minutes to customize it to the theme.. I am glad and lucky I worked with this guy..

    • Tom Anbinder

      Thank you!

Add a review

Your email address will not be published.

Free version

This plugin is a premium version of free "Order Status Rules for WooCommerce" plugin.

Developers

You can add any custom rule condition with the alg_wc_order_status_rules_do_apply_rule filter.

Example #1: Check if the customer had any previous orders

add_filter( 'alg_wc_order_status_rules_do_apply_rule', function( $do_apply, $order, $rule_id, $args ) {
    /**
     * First we are checking:
     *     a) if it's the rule we need,
     *     b) if the rule's status, time trigger, etc. conditions are fulfilled,
     *     c) if it's not a guest's order.
     */
    if ( 1 == $rule_id && $do_apply && ( $user_id = $order->get_user_id() ) ) {
        /**
         * Now we check if the current user had any previous orders.
         * @see https://github.com/woocommerce/woocommerce/wiki/wc_get_orders-and-WC_Order_Query
         */
        $_orders = wc_get_orders( array(
            'customer_id'  => $user_id,                         // from the same user only
            'date_created' => '<' . $order->get_date_created(), // older orders only
            'limit'        => 1,                                // one order is enough
        ) );
        /**
         * Finally we set the rule to be applied only to orders from new customers.
         * If we'd need to apply the rule only for old customers instead, we'd use:
         *     return ( ! empty( $_orders ) );
         */
        return ( empty( $_orders ) );
    }
    return $do_apply;
}, 10, 4 );

Example #2: Check if the customer has purchased this product in any of his previous orders

add_filter( 'alg_wc_order_status_rules_do_apply_rule', function( $do_apply, $order, $rule_id, $args ) {
    /**
     * First we are checking:
     *     a) if it's the rule we need,
     *     b) if the rule's status, time trigger, etc. conditions are fulfilled,
     *     c) if it's not a guest's order.
     */
    if ( 1 == $rule_id && $do_apply && ( $user_id = $order->get_user_id() ) ) {
        /**
         * Now we get all user's previous orders.
         * @see https://github.com/woocommerce/woocommerce/wiki/wc_get_orders-and-WC_Order_Query
         */
        $_orders = wc_get_orders( array(
            'customer_id'  => $user_id,                         // from the same user only
            'status'       => array( 'wc-completed' ),          // completed orders only
            'date_created' => '<' . $order->get_date_created(), // older orders only
            'limit'        => -1,                               // no limit
        ) );
        /**
         * Go through all the products in the current order.
         */
        foreach ( $order->get_items() as $item ) {
            $product_id = ( ! empty( $item['variation_id'] ) ? $item['variation_id'] : $item['product_id'] );
            /**
             * Go through all the other orders.
             */
            foreach ( $_orders as $_order ) {
                /**
                 * Go through all the products in each order.
                 */
                foreach ( $_order->get_items() as $_item ) {
                    $_product_id = ( ! empty( $_item['variation_id'] ) ? $_item['variation_id'] : $_item['product_id'] );
                    if ( $product_id === $_product_id ) {
                        /**
                         * We found a match - the rule can be applied.
                         */
                        return true;
                    }
                }
            }
        }
        /**
         * We didn't find a match - the rule will not be applied.
         */
        return false;
    }
    return $do_apply;
}, 10, 4 );

Changelog

2.8.1 - 21/04/2022

  • Fix - Rule - Conditions - Coupons - Fixed.
  • Dev - Rule - Conditions - Coupons - "No coupons" option added.

2.8.0 - 20/04/2022

  • Dev - Rule - Conditions - "Coupons" options added.
  • Dev - Rule - Conditions - "Paying customer" options added.
  • Dev - Admin settings descriptions updated.
  • Dev - Code refactoring.

2.7.2 - 15/04/2022

  • Fix - Admin settings - Users - "Guest" user was removed by mistake in v2.6.1. This is fixed now.
  • Dev - Code refactoring.

2.7.1 - 14/04/2022

  • Fix - Advanced - Disabled conditions - "Billing countries" and "Shipping countries" options could not be disabled. This is fixed now.

2.7.0 - 14/04/2022

  • Dev - Rule - Conditions - "Product stock status" options added.
  • Dev - Rule - Conditions - "Billing countries" and "Shipping countries" options added.
  • Dev - Rule - Conditions - "All products in the order must match the selection (vs at least one product)" options added to "Products", "Product categories" and "Product tags" conditions. Defaults to no.

2.6.1 - 13/04/2022

  • Dev - Admin settings - Users - Using AJAX now.
  • Dev - Code refactoring.
  • WC tested up to: 6.4.

2.6.0 - 08/04/2022

  • Dev - Advanced - "Disabled conditions" option added.
  • Dev - Code refactoring.
  • WC tested up to: 6.3.

2.5.1 - 26/01/2022

  • Dev - Advanced - "Orders sorting" options added.
  • Tested up to: 5.9.
  • WC tested up to: 6.1.

2.5.0 - 17/01/2022

  • Dev - Conditions - Products - Admin settings are using AJAX now.
  • Dev - Code refactoring.
  • WC tested up to: 6.0.

2.4.1 - 14/12/2021

  • Dev - Rule - Conditions - "Date created before" and "Date created after" options added.

2.4.0 - 09/12/2021

  • Dev - Rule - Conditions - Order meta - "Multiple meta values" option added (i.e. multiple values are now allowed in the "Meta value" option, as a comma-separated list).
  • Dev - Rule - Skip days - Algorithm improved.
  • Dev - Order Status History - "No order status rules are scheduled to be applied..." message added.
  • Dev - Code refactoring.
  • WC tested up to: 5.9.

2.3.0 - 27/10/2021

  • Dev - Advanced - Periodical Processing - "Action Scheduler" options added.
  • Dev - Advanced - "Rules processing hooks" option added (defaults to Order status changed). Can be filtered with the alg_wc_order_status_rules_hooks filter.
  • Dev - Advanced - Admin settings rearranged: "Periodical Processing Options", "Order Status History Options" subsections added. Settings descriptions updated.

2.2.0 - 22/10/2021

  • Fix - Admin settings - The issue when "Total rules" option has just been changed, but number of rule settings tabs doesn't reflect it, is fixed now.
  • Dev - Triggering order status rules processing on any order status change now (i.e. rules with zero time triggers will be processed immediately now).

2.1.0 - 21/10/2021

  • Dev - Rule - "Shipping methods" option added.
  • Dev - Rule - "Minimum order quantity" and "Maximum order quantity" options added.
  • Dev - Advanced - "On non-matching order status" option added.
  • Dev - Safe-checks added when retrieving order's payment gateway.
  • Dev - Admin "Rule" settings restyled ("Conditions" subsection added).
  • Dev - Code refactoring.
  • WC tested up to: 5.8.

2.0.0 - 06/09/2021

  • Dev - Admin settings rearranged. Now each order status rule has its own settings section. Tools moved from the "Advanced" section to the "General" section.
  • Dev - Rule - "Order meta" options added.
  • Dev - Optional alg_wc_order_status_rules_process_rules_redirect URL param added.
  • Dev - Developers - alg_wc_order_status_rules_do_apply_rule filter added.
  • Dev - Developers - alg_wc_order_status_after_save_settings filter renamed to alg_wc_order_status_rules_after_save_settings.

1.9.0 - 25/08/2021

  • Dev - Rule - "User roles" option added.
  • Dev - Rule - "Users" option added.
  • Dev - Rule - Minimum/Maximum order amount - Decimal values are allowed in settings now (step set to 0.000001).
  • WC tested up to: 5.6.

1.8.1 - 11/08/2021

  • Dev - Rule - "Minimum order amount" and "Maximum order amount" options added.
  • Dev - Rule - Admin settings - "Select all" and "Deselect all" buttons added to all "multiselect" options.

1.8.0 - 02/08/2021

  • Dev - Rule - Time trigger - It's possible to set the value to zero now.
  • Dev - Advanced & Tools - "My Account > Orders" options added.
  • Dev - Advanced & Tools - On empty order status change history - Defaults to "Use order date modified" now.
  • Dev - Save status change - Hook priority set to 10 now (was PHP_INT_MAX).
  • Dev - Admin settings descriptions updated.
  • Dev - Code refactoring.

1.7.0 - 29/07/2021

  • Fix - PHP error fixed. Was occurring when creating a new order by admin with "On empty order status change history" option set to "Use order date ...".
  • Dev - Advanced - Compatibility Options - "Doctreat" option added.
  • Dev - Debug - Now adding to the log if rules was processed manually (i.e. via "Tools > Run all rules now").
  • Dev - Plugin is initialized on plugins_loaded action now.
  • Dev - Code refactoring.
  • Tested up to: 5.8.
  • WC tested up to: 5.5.

1.6.1 - 13/05/2021

  • Fix - "PHP Parse error" fixed.

1.6.0 - 11/05/2021

  • Dev - Rule - "Products" option added.
  • Dev - Rule - "Product categories" option added.
  • Dev - Rule - "Product tags" option added.
  • Dev - Order Status History - Descriptions updated in the meta box, e.g. rule title added.
  • Dev - Code refactoring.

1.5.0 - 20/04/2021

  • Dev - Rule - "Payment gateways" option added.
  • Dev - Admin settings restyled: new "Advanced & Tools" section added.
  • Dev - Minor code refactoring.
  • Tested up to: 5.7.
  • WC tested up to: 5.2.

1.4.0 - 26/02/2021

  • Dev - Advanced - Use WP cron - "WP cron interval" option added (defaults to "Once Hourly").
  • Dev - Advanced - "On empty order status change history" option added.
  • Dev - Rule - Time trigger - "Unit" option added (defaults to "hour(s)").
  • Dev - Rule - Time trigger - Defaults to 1 now.
  • Dev - Advanced - "Debug" option added.
  • Dev - Localization - load_plugin_textdomain() moved to the init hook.
  • Dev - Admin descriptions updated.
  • Dev - Code refactoring.
  • Tested up to: 5.6.
  • WC tested up to: 5.0.

1.3.1 - 17/09/2020

  • Dev - Allow rules processing via URL - Hook priority increased.

1.3.0 - 15/09/2020

  • Dev - Advanced - "Use WP cron" option added (defaults to yes).
  • Dev - Advanced - "Allow rules processing via URL" option added (defaults to no). This is an alternative to WP crons (i.e. allows using "real" (i.e. server) cron jobs instead).
  • WC tested up to: 4.5.
  • Tested up to: 5.5.

1.2.0 - 27/03/2020

  • Fix - "Reset settings" admin notice fixed.
  • Dev - Tools - "Run all rules now" tool added.
  • Dev - "Next cron event is scheduled on ..." info added to admin settings.
  • Dev - Code refactoring.
  • Dev - Admin settings descriptions updated.
  • WC tested up to: 4.0.
  • Tested up to: 5.3.

1.1.0 - 11/07/2019

  • Dev - Admin settings descriptions updated. "Your settings have been reset" notice added.
  • Dev - "Total rules" default value changed to 1.
  • Dev - Rule - "Admin title (optional)" option added.
  • Dev - Rule - "Enable/Disable" default value changed to no.
  • Dev - Code refactoring.
  • Plugin URI updated.
  • Tested up to: 5.2.
  • WC tested up to: 3.6.

1.0.1 - 07/06/2018

  • Fix - Break added in process_rules() function, so multiple status updates wouldn't happen at once.
  • Dev - "Skip days" rules options added.

1.0.0 - 16/05/2018

  • Initial Release.

Installation and Updates

  • Buy the plugin 🙂
  • Download plugin’s zip to your computer (you will receive an email with download link, or you can always download the plugin from your account).
  • Go to “Admin Dashboard > Plugins > Add New > Upload Plugin” and browse for downloaded zip file.
  • If plugin is successfully installed – you should see it added to the Plugins list.
  • To keep WPFactory items up to date, please install WPFactory Helper plugin and enter your site key.

Refunds

We want to ensure that you are 100% happy with your purchase, so if you feel the product(s) you purchased are not the best fit for your requirements and you attempted to resolve issues with product's author, we are offering 30 day money back guarantee refund policy.