Created
June 17, 2022 16:30
-
-
Save lukecav/f4cf69b02d11624da4752e12ffcbe42c to your computer and use it in GitHub Desktop.
Disable the Action Scheduler default queue runner
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function asdds_disable_default_runner() { | |
if ( class_exists( 'ActionScheduler' ) ) { | |
remove_action( 'action_scheduler_run_queue', array( ActionScheduler::runner(), 'run' ) ); | |
} | |
} | |
// ActionScheduler_QueueRunner::init() is attached to 'init' with priority 1, so we need to run after that | |
add_action( 'init', 'asdds_disable_default_runner', 10 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://github.com/woocommerce/action-scheduler-disable-default-runner
https://woocommerce.com/document/subscriptions-handles-staging-sites/#section-7