• Hello! Great plugin.
    I’m getting error messages when using it:
    Notice: Use of undefined constant DC_ALLOWED_DOWNLOADS – assumed ‘DC_ALLOWED_DOWNLOADS’.

    I believe this is due to PHP 7. I think I could fix it by modifying wp-download-condes.php but hoping you might be able to do a quick update onto wordpress or pointing me in the right direction as I’m not a programmer.

    Many thanks

    Joel

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter stringfamily

    (@stringfamily)

    BTW your “donate to this plugin” link on your plugin page does not work.

    I would love to know, too. And yes, it seems to be due to PHP 7 (which is far from being ‘the future’). So far, the error messages result in a broken backend, so I couldn’t use the plugin at all ?? .

    I’ve solved the issue. Lines 32-37 of wp-download-codes.php should be the following:

    define( “DC_MAX_ATTEMPTS”, 3 );
    define( “DC_ALLOWED_DOWNLOADS”, 3 );
    define( “DC_FILE_TYPES”, ‘zip, mp3’ );
    define( “DC_CODE_CHARS”, ‘ABCDEFGHIJKLMNPQRSTUVWXYZ123456789’ );
    define( “DC_HEADER_CONTENT_TYPE”, ‘Default (MIME Type)’);

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Use of undefined constant’ is closed to new replies.