Skip to content

Commit

Permalink
Reschedule cron when running wp_cron_run_event
Browse files Browse the repository at this point in the history
If an event is on a schedule, reschedule it instead of simply removing
it.
  • Loading branch information
lipemat committed Oct 3, 2023
1 parent 7f9128d commit 3491a6f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion includes/abstract-testcase.php
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,9 @@ protected function _restore_hooks() {
public static function flush_cache() {
global $wp_object_cache;

wp_cache_flush_runtime();
if ( function_exists( 'wp_cache_supports' ) && wp_cache_supports( 'flush_runtime' ) ) {
wp_cache_flush_runtime();
}

if ( is_object( $wp_object_cache ) && method_exists( $wp_object_cache, '__remoteset' ) ) {
$wp_object_cache->__remoteset();
Expand Down

0 comments on commit 3491a6f

Please sign in to comment.