Skip to content

Instantly share code, notes, and snippets.

@danielbitzer
Created May 30, 2018 04:29
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danielbitzer/600b7f07f9950ef3ae2c1a82b0f182df to your computer and use it in GitHub Desktop.
Save danielbitzer/600b7f07f9950ef3ae2c1a82b0f182df to your computer and use it in GitHub Desktop.
[AutomateWoo] Run AutomateWoo events every 5 minutes instead of every minute
<?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