action-scheduler
action-scheduler copied to clipboard
Disable with a constant
So to achieve that you need to use a filter but in the automated tests world this means that you need a WP instance already available.
There is https://github.com/woocommerce/action-scheduler-disable-default-runner that use that filter and let to disable it but it isn't more simple to have a constant that you can disable on the wp-config.php?
Hi @Mte90,
I could certainly see the value in that. I'll mark this as a low priority enhancement and, if you wish, you could submit a PR to add this and we'll be happy to review.
So is not a difficult PR https://github.com/woocommerce/action-scheduler/search?q=action_scheduler_run_queue but what is the name that you prefer for the constant? So I do everything once :-)
I don't believe we currently define or look for any top-level constants (except for some that are defined by WordPress or WP CLI), so there isn't really any precedent to look at, but I would propose:
AS_DISABLE_QUEUE_RUNNERS
What do you think?
PR done :-)