From a3653a67910666fffef39077681e8e0f1e2bf7cc Mon Sep 17 00:00:00 2001 From: martin Date: Tue, 5 Dec 2023 16:36:13 +0100 Subject: [PATCH] register_uninstall_hook --- woosms-sms-module-for-woocommerce.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/woosms-sms-module-for-woocommerce.php b/woosms-sms-module-for-woocommerce.php index 668fa0b..0c66f81 100644 --- a/woosms-sms-module-for-woocommerce.php +++ b/woosms-sms-module-for-woocommerce.php @@ -53,6 +53,11 @@ function BulkgateContainerSetup(): void ]); } + function BulkGateUninstallPlugin() + { + Factory::get()->getByClass(Settings::class)->uninstall(); + } + /** * Init BulkGate DI container @@ -85,7 +90,7 @@ function BulkgateContainerSetup(): void /** * Register uninstall scripts */ - register_deactivation_hook(__FILE__, fn () => Factory::get()->getByClass(Settings::class)->uninstall()); + register_uninstall_hook(__FILE__, 'BulkGateUninstallPlugin'); } else {