File with password lock is not limited by stock

Viewing 4 posts - 1 through 4 (of 4 total)
#63983

Hi,
I have created a download and protected it with password. According to the documentation the stock limit should limit the amount of download. I have set the limit to 1 but I can download the file as many times a I want.
See attachment for reference
Please advise
Thank you

#63990

Shahriar
Moderator

Hi, We will fix the issue in next release of WPDM. For now, you can add the following code in /download-manager/libs/class.Apply.php after line 374,

if( $package['quota'] > 0 && $package['quota'] <= $package['download_count'] ){
                wpdm_download_data("stock-limit.txt", __("Download limit exceeded.",'download-manager'));
                die();
}

https://www.evernote.com/l/AUcxmibQSYFJD4zRhe4mh4ByVjCWD_xOFL0B/image.png

#63994

Hi,
I have added those lines of code but the site is crashing after doing that.

#64058

Shafayet
Moderator

Actually, the stock limit is working fine, the download count doesn’t increase, when you click on download button multiple times in the same session, like repeated click on same download link.

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘File with password lock is not limited by stock’ is closed to new replies.