• Resolved visnucarr

    (@visnucarr)


    Hello! I’m trying to stop or delete the process “woocommerce_cleanup_draft_orders” from woocommerce. This delete all Draft orders every 24 hours, but I’d rather do this manually.

    I can find the process under Scheduled Actions, but for some reason, it doesn’t show up at all in Cron Manager area itself. (Many other WooCom hooks do.)

    Can this plugin be used to pause or delete the task permanently? I can “delete” the task from Scheduled Actions, but this simply resets the 24 hour timer and not the process itself. Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Kuba Mikita

    (@kubitomakita)

    Looks like they’re adding that cron job back to the system, when it’s not there. And they’re using Action Scheduler instead of regular cron, for most of the background jobs.

    Using a code snippet seems to be the best option to control this:

    add_filter('pre_update_option_woocommerce_cleanup_draft_orders_interval', '__return_false');
    Thread Starter visnucarr

    (@visnucarr)

    Okay, i’ve tried this code, but am I supposed to see the effect instantly? or only next time the process fires? Regardless of what code I add, or how much I cancel it, clear cache etc, the process simply resets in action scheduler to 24hrs. It never truly deletes it.

    • This reply was modified 1 year, 2 months ago by visnucarr.
    Plugin Author Kuba Mikita

    (@kubitomakita)

    I’m not sure if the action will stay there or not. I’d suggest asking on the WooCommerce forums to know exactly how does that work and how to prevent it from removing the drafts

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Pause/Delete woocommerce_cleanup_draft_orders?’ is closed to new replies.