WordPress at Your Fingertips
function is not described

WC_Download_Handler::check_downloads_remaining() private WC 1.0

Check if there are downloads remaining.

{} It's a method of the class: WC_Download_Handler{}

No Hooks.

Return

null. Nothing.

Usage

$result = WC_Download_Handler::check_downloads_remaining( $download );
$download(WC_Customer_Download) (required)
Download instance.

Code of WC_Download_Handler::check_downloads_remaining() WC 5.7.1

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 );
	}
}