Created
May 30, 2018 04:29
-
-
Save danielbitzer/600b7f07f9950ef3ae2c1a82b0f182df to your computer and use it in GitHub Desktop.
[AutomateWoo] Run AutomateWoo events every 5 minutes instead of every minute
This file contains hidden or 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
<?php | |
// Run AutomateWoo events every 5 minutes instead of every minute | |
add_action( 'automatewoo_loaded', function() { | |
remove_action( 'automatewoo_events_worker', [ 'AutomateWoo\Cron', 'before_worker' ], 1 ); | |
remove_action( 'automatewoo_events_worker', [ 'AutomateWoo\Events', 'run_due_events' ] ); | |
add_action( 'automatewoo_five_minute_worker', [ 'AutomateWoo\Events', 'run_due_events' ] ); | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment