Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save xlplugins/dba9c50ed181723b69e61a254d9f6d19 to your computer and use it in GitHub Desktop.

Select an option

Save xlplugins/dba9c50ed181723b69e61a254d9f6d19 to your computer and use it in GitHub Desktop.
fk_fb_every_4_minute_cron_interval.php
/**
* Modify WFOCU cron schedule interval from 4 minutes to 20 minutes.
*
* The plugin registers a custom cron schedule 'wfocu_cron_schedule_times' at 4-minute
* intervals. This filter runs at priority 10000 (after WFOCU's own registration) to
* override the interval. The change takes effect on the next execution of the
* 'fk_fb_every_4_minute' event without requiring a manual reschedule.
*/
add_filter( 'cron_schedules', function( $schedules ) {
if ( isset( $schedules['wfocu_cron_schedule_times'] ) ) {
$schedules['wfocu_cron_schedule_times']['interval'] = MINUTE_IN_SECONDS * 20;
$schedules['wfocu_cron_schedule_times']['display'] = __( 'Once Every 20 minutes', 'woofunnels-upstroke-one-click-upsell' );
}
return $schedules;
}, 10000 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment