Product Icon

Auto Complete Orders for WooCommerce

Automatically move your orders to completed status based on various conditions like order duration, user roles, product in cart, product type and more.

WP Cron Infinite Loop

On a client site, discovered the AF_Autocomplete_Cron_Orders class will create an infinite loop in cron creation. A client site had 80k+ crons created when this issue was discovered.

The ___contstruct() method calls `add_action(‘wp’, array( $this, ‘af_aco_create_cron_shedule_hook’ ));`

The af_aco_create_cron_shedule_hook method improperly checks for the existence of wp_next_scheduled(‘af_aco_cron_schedule_event’), and if it doesn’t exist, creates a new cron under the name `af_aco_cron_schedule`

This results in duplicate and infinite creations of a the cron af_aco_cron_schedule every time the `wp` hook is loaded.

The fix would be to adjust `!wp_next_scheduled(‘af_aco_cron_schedule_event’)` to instead check the proper cron label: `!wp_next_scheduled(‘af_aco_cron_schedule’)`

Original/current source addify-auto-complete-orders/include/class-af-autocomplete-cron-orders.php::114

public function af_aco_create_cron_shedule_hook() {

if (!wp_next_scheduled(‘af_aco_cron_schedule’)) {

wp_schedule_event(time(), ‘af_aco_cron_schedule_event’, ‘af_aco_auto_com_schedule’);
}
}

Author

sierraplugins

Current Status

Open

Last updated: February 23, 2026

1 comment

Log in to comment on this feature request.

  1. Addify says:
    Product developer February 24, 2026 9:13 am

    Hello,

    Thank you for bringing this to our attention, and we sincerely apologize for the inconvenience you experienced.

    We’re pleased to inform you that the issue has now been resolved, and a new version has been released. Please upgrade to the latest version at your convenience.

    If you encounter any further issues or need assistance, feel free to reach out to our support team using the following link.

    https://woocommerce.com/my-account/create-a-ticket/

    Thank you for your patience and support.

    Team Addify