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 {