From b4edc3761b046f450115920ac2960d86e50b7043 Mon Sep 17 00:00:00 2001 From: Mo Farouk <122031508+fmido88@users.noreply.github.com> Date: Sat, 10 Feb 2024 01:02:56 +0200 Subject: [PATCH] Disable callbacks during upgrade --- lib.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib.php b/lib.php index 65c72b54..6f260fcb 100644 --- a/lib.php +++ b/lib.php @@ -23,8 +23,13 @@ */ defined('MOODLE_INTERNAL') || die(); -global $CFG; -require_once("$CFG->dirroot/enrol/wallet/extendlib.php"); + +// Disable all callbacks during upgrade. +$version = get_config('enrol_wallet', 'version'); +if ($version >= 2024020923) { + global $CFG; + require_once("$CFG->dirroot/enrol/wallet/extendlib.php"); +} use enrol_wallet\form\enrol_form; use enrol_wallet\form\empty_form;