diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..612eaac --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,22 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Listen for XDebug", + "type": "php", + "request": "launch", + "port": 9000 + }, + { + "name": "Launch currently open script", + "type": "php", + "request": "launch", + "program": "${file}", + "cwd": "${fileDirname}", + "port": 9000 + } + ] +} \ No newline at end of file diff --git a/README.md b/README.md index 9ed9d34..699edb4 100755 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Welcome to software license manager 👋 - + [](https://documenter.getpostman.com/view/307939/6tjU1FL?version=latest) [](https://github.com/michelve/software-license-manager/blob/master/LICENSE.md) diff --git a/admin/slm-admin-functions.php b/admin/slm-admin-functions.php index 29a1780..8859b36 100755 --- a/admin/slm-admin-functions.php +++ b/admin/slm-admin-functions.php @@ -4,7 +4,6 @@ die; } - function slm_admin_tools_menu() { @@ -36,12 +35,13 @@ function slm_admin_tools_menu() echo '
'; } if (isset($_POST['slm_clear_log'])) { - global $wpdb; + global $wpdb, $slm_debug_logger; $table = SLM_TBL_LIC_LOG; $slm_log_clean = $wpdb->query("TRUNCATE TABLE $table"); - + $slm_logger = new SLM_Debug_Logger(); + $slm_debug_logger->reset_log_file("log.txt"); + $slm_debug_logger->reset_log_file("log-cron-job.txt"); echo 'Log was cleared succesfully!