get_chatbots(); // Get business information for the first/default chatbot (for global settings) $default_chatbot_id = !empty($chatbots) ? $chatbots[0]['id'] : 0; $business_info = $default_chatbot_id > 0 ? $data_manager->get_business_info($default_chatbot_id) : array(); // Parse business info with defaults $business_name = isset($business_info['business_name']) ? $business_info['business_name'] : get_bloginfo('name'); $tagline = isset($business_info['tagline']) ? $business_info['tagline'] : get_bloginfo('description'); $business_type = isset($business_info['business_type']) ? $business_info['business_type'] : ''; $services = isset($business_info['services']) ? json_decode($business_info['services'], true) : array(); $products = isset($business_info['products']) ? json_decode($business_info['products'], true) : array(); $hours = isset($business_info['hours']) ? json_decode($business_info['hours'], true) : array(); $address = isset($business_info['address']) ? $business_info['address'] : ''; $phone = isset($business_info['phone']) ? $business_info['phone'] : ''; $email = isset($business_info['email']) ? $business_info['email'] : get_option('admin_email'); $website = isset($business_info['website']) ? $business_info['website'] : get_site_url(); $policies = isset($business_info['policies']) ? $business_info['policies'] : ''; // Security tab options $recaptcha_enabled = (bool) get_option('a1ai_recaptcha_enabled', false); $recaptcha_site_key = get_option('a1ai_recaptcha_site_key', ''); $recaptcha_secret_key = get_option('a1ai_recaptcha_secret_key', ''); $spam_heuristic_enabled = (bool) get_option('a1ai_spam_heuristic_enabled', false); $spam_ai_enabled = (bool) get_option('a1ai_spam_ai_enabled', false); ?>