Created
June 8, 2026 15:06
-
-
Save xlplugins/dba9c50ed181723b69e61a254d9f6d19 to your computer and use it in GitHub Desktop.
fk_fb_every_4_minute_cron_interval.php
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
| /** | |
| * 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