private static function check_download_expiry($download)
{
if ($download->get_access_expires() > 0 && $download->get_access_expires() < strtotime('midnight', current_time('timestamp'))) {
self::download_error(__('Sorry, this download has expired', 'woocommerce'), '', 403);
}
}