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_downloads_remaining( WC_Customer_Download $download )
Check if there are downloads remaining.
Description Description
Parameters Parameters
- $download
-
(Required) Download instance.
Source Source
File: includes/class-wc-download-handler.php
private static function check_downloads_remaining( $download ) { if ( '' !== $download->get_downloads_remaining() && 0 >= $download->get_downloads_remaining() ) { self::download_error( __( 'Sorry, you have reached your download limit for this file', 'woocommerce' ), '', 403 ); } }