From b78e1bcbc9a2a6537e694e7d0c8106c77a52beef Mon Sep 17 00:00:00 2001 From: evrifaessa Date: Sun, 20 Nov 2022 22:24:28 +0300 Subject: [PATCH] Added a fallback for the "boxbilling" object. --- src/bb-themes/admin_default/assets/js/fossbilling.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/bb-themes/admin_default/assets/js/fossbilling.js b/src/bb-themes/admin_default/assets/js/fossbilling.js index eefd20b5a..b75347910 100644 --- a/src/bb-themes/admin_default/assets/js/fossbilling.js +++ b/src/bb-themes/admin_default/assets/js/fossbilling.js @@ -387,4 +387,12 @@ const FOSSBilling = { toast.show(); } -}; \ No newline at end of file +}; + +// Fallback for modules that still use the old "boxbilling" object. It will display deprecation warnings in the console and will be removed entirely in the future. +const boxbilling = { + message: (message, type = 'info') => { + console.warn('The "boxbilling" object is deprecated and will be removed in a future release. Use FOSSBilling.message() instead.'); + FOSSBilling.message(message, type); + } +} \ No newline at end of file