WC_Helper_Updater::is_fresh_update_data │ private static │ WC 1.0

Whether cached update data is recent enough to use without a new check. The cache is kept for a week so a failed check has something to fall back on, but it's only fresh for 12 hours.

Method of the class: WC_Helper_Updater{}

No Hooks.

Returns

bool.

Usage

$result = WC_Helper_Updater::is_fresh_update_data( $data ): bool;
$data(array) (required)
The cached update data.

WC_Helper_Updater::is_fresh_update_data() code WC 11.3.0

private static function is_fresh_update_data( array $data ): bool {
	return isset( $data['updated'] ) && is_numeric( $data['updated'] ) && (int) $data['updated'] > time() - 12 * HOUR_IN_SECONDS;
}