• Resolved dinmix

    (@dinmix)


    Hi, is there are way to disable the logging counter? I need the download function but I dont need to log the downloads or the counter. Also, is it safe to clear the download logs from the database?

    Thank you very much

Viewing 1 replies (of 1 total)
  • Plugin Author Teo Alex

    (@altesin)

    Hello @dinmix ,

    Yes, you can disable the detailed download logging, but there are two separate things to consider:1. Download logs and reports

    1. Download logs and reports
    You can stop Download Monitor from recording detailed download logs by adding the following PHP code:

    add_filter( 'dlm_enable_reports', '__return_false' );

    2. Download counter
    The download counter is separate from the download logs. There is currently no setting or filter that completely stops the counter from increasing.

    If you only want to prevent the download count from being displayed, you have two options:

    add_filter( 'dlm_download_count', '__return_zero' );

    Please note that both options only hide the displayed number. The actual counter will still continue to increase in the database.Where to add the PHP code

    You can add the PHP code in either of these ways:

    1. Child theme: Add the code to your child theme’s functions.php file.
    2. PHP snippets plugin: You can also install any WordPress plugin that allows you to add custom PHP snippets. Create a new snippet, paste the code into it, and activate it.

    So, in short, you can disable detailed download logging and hide the displayed download count, but there is currently no supported way to completely stop the download counter from being updated without modifying the plugin’s code.

    Regarding your second question, yes, it is safe to clear the download logs from the database. We recommend creating a database backup first.

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.