diff --git a/admin_integrations.php b/admin_integrations.php index ae52cf6..5f015db 100644 --- a/admin_integrations.php +++ b/admin_integrations.php @@ -16,6 +16,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { 'wablas_domain' => trim($_POST['wablas_domain'] ?? ''), 'wablas_api_token' => trim($_POST['wablas_api_token'] ?? ''), 'wablas_secret_key' => trim($_POST['wablas_secret_key'] ?? ''), + 'whatsapp_enabled' => isset($_POST['whatsapp_enabled']) ? '1' : '0', 'smtp_host' => trim($_POST['smtp_host'] ?? ''), 'smtp_port' => trim($_POST['smtp_port'] ?? ''), 'smtp_secure' => trim($_POST['smtp_secure'] ?? ''), @@ -42,6 +43,7 @@ $thawaniEnv = $settings['thawani_environment'] ?? 'test'; $wablasDomain = $settings['wablas_domain'] ?? ''; $wablasToken = $settings['wablas_api_token'] ?? ''; $wablasSecret = $settings['wablas_secret_key'] ?? ''; +$whatsappEnabled = $settings['whatsapp_enabled'] ?? '0'; $smtpHost = $settings['smtp_host'] ?? ''; $smtpPort = $settings['smtp_port'] ?? '587'; $smtpSecure = $settings['smtp_secure'] ?? 'tls'; @@ -115,6 +117,13 @@ render_header('Integrations', 'admin', true);

Connect Wablas to automatically send WhatsApp notifications to Shippers and Truck Owners.

+
+
+ > + +
+
+
diff --git a/includes/NotificationService.php b/includes/NotificationService.php index 0bbe892..9886416 100644 --- a/includes/NotificationService.php +++ b/includes/NotificationService.php @@ -1,6 +1,7 @@