From fb3a296fc85e26d41bccf82a7de7053c9a755f9c Mon Sep 17 00:00:00 2001 From: Mykyta Synelnikov Date: Mon, 3 Nov 2025 17:58:53 +0200 Subject: [PATCH] Add debug mode for extensions updater Introduced the `UM_UPDATER_DEBUG` constant to enable debugging for upgrade packages. This facilitates easier troubleshooting and testing during update processes. --- includes/admin/class-extensions-updater.php | 2 ++ ultimate-member.php | 1 + 2 files changed, 3 insertions(+) diff --git a/includes/admin/class-extensions-updater.php b/includes/admin/class-extensions-updater.php index 4fa0bf78..313001c9 100644 --- a/includes/admin/class-extensions-updater.php +++ b/includes/admin/class-extensions-updater.php @@ -47,6 +47,8 @@ class Extensions_Updater { 'complete' => 'um_' . $this->updater_data['slug'] . '_package_complete', ); + $debug = defined( 'UM_UPDATER_DEBUG' ) && UM_UPDATER_DEBUG; + include_once $file_path; /** * IMPORTANT!!!: Last action that we need to do after package is complete. diff --git a/ultimate-member.php b/ultimate-member.php index 74686686..21be3d22 100644 --- a/ultimate-member.php +++ b/ultimate-member.php @@ -36,6 +36,7 @@ define( 'UM_VERSION', $plugin_data['Version'] ); define( 'UM_PLUGIN_NAME', $plugin_data['Name'] ); define( 'UM_WP_FUNCTIONS_VERSION', '6.8.0' ); // Updates every major WordPress release. define( 'UM_LICENSE_REQUEST_DEBUG', false ); // Set true then need to debug the license request. +define( 'UM_UPDATER_DEBUG', false ); // Set true then need to debug the upgrade packages. // define( 'UM_DEV_MODE', true ); require_once 'includes/class-functions.php';