Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
WC_Download_Handler::check_download_expiry( WC_Customer_Download $download )
Check if the download has expired.
Description Description
Parameters Parameters
- $download
-
(Required) Download instance.
Source Source
File: includes/class-wc-download-handler.php
private static function check_download_expiry( $download ) { if ( ! is_null( $download->get_access_expires() ) && $download->get_access_expires()->getTimestamp() < strtotime( 'midnight', time() ) ) { self::download_error( __( 'Sorry, this download has expired', 'woocommerce' ), '', 403 ); } }