Skip to content

Commit b0bbf89

Browse files
committed
fix as older versions compatibility
1 parent 305a959 commit b0bbf89

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

inc/media_offload.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ function maybe_reschedule() {
204204
return;
205205
}
206206
self::$instance->logger->add_log( $transfer_type, 'Cron missed, attempt to reschedule.' );
207-
self::get_image_count( $transfer_type, true );
207+
self::get_image_count( $transfer_type, false );
208208
}
209209

210210
/**
@@ -2063,6 +2063,9 @@ public static function schedule_action( $time, $hook, $args ) {
20632063
public static function is_scheduled( $hook ) {
20642064
if ( function_exists( 'as_has_scheduled_action' ) ) {
20652065
return as_has_scheduled_action( $hook );
2066+
} elseif ( function_exists( 'as_next_scheduled_action' ) ) {
2067+
// For older versions of AS.
2068+
return as_next_scheduled_action( $hook ) !== false;
20662069
} else {
20672070
return wp_next_scheduled( $hook ) !== false;
20682071
}

0 commit comments

Comments
 (0)