private static function check_downloads_remaining($download) { if (0 >= $download->get_downloads_remaining()) { self::download_error(__('Sorry, you have reached your download limit for this file', 'woocommerce'), '', 403); } }