Download should expire at midnight Fixes #7269

This commit is contained in:
Mike Jolley 2015-02-03 10:57:28 +00:00
parent a3828bb1f9
commit 086d0195ce
1 changed files with 1 additions and 1 deletions

View File

@ -116,7 +116,7 @@ class WC_Download_Handler {
* @access private
*/
private static function check_download_expiry( $download_data ) {
if ( $download_data->access_expires > 0 && strtotime( $download_data->access_expires ) < current_time( 'timestamp' ) ) {
if ( $download_data->access_expires > 0 && strtotime( $download_data->access_expires ) < strtotime( 'midnight', current_time( 'timestamp' ) ) ) {
self::download_error( __( 'Sorry, this download has expired', 'woocommerce' ), '', 403 );
}
}