Skip to content

Instantly share code, notes, and snippets.

@danielbitzer
Created January 3, 2018 18:12
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danielbitzer/d7f86fced8f92382b4395c27c47be768 to your computer and use it in GitHub Desktop.
Save danielbitzer/d7f86fced8f92382b4395c27c47be768 to your computer and use it in GitHub Desktop.
AutomateWoo - Increase expired coupon deletion rate
<?php
// this changes the coupon clean frequency to every 30 mins instead of 4 hours
// max coupon cleaned in a single batch is 200
add_action( 'automatewoo_loaded', function() {
remove_action( 'automatewoo_four_hourly_worker', [ 'AutomateWoo\Coupons', 'schedule_clean_expired' ] );
add_action( 'automatewoo_thirty_minute_worker', [ 'AutomateWoo\Coupons', 'schedule_clean_expired' ] );
});
@0xairdropnoob
Copy link

Verify Github on Galxe. gid:SyQiSgxVNDQnvQacK8cf6R

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment