function send_booking_to_gohighlevel($contact_form) { // GoHighLevel API Configuration $ghl_api_key = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJsb2NhdGlvbl9pZCI6ImZrWVBBSjJ4ckdLZG5uMGR1VnY2IiwidmVyc2lvbiI6MSwiaWF0IjoxNzQ4NjMxODUyNjI0LCJzdWIiOiJIN2JRMXB5YXNXUDJzaFpUeFF1WSJ9.FHvZYxxySOJa4WmzhQCstyWdpaFM3pTaVSr-Ko8XbfE'; $ghl_location_id = 'fkYPAJ2xrGKdnn0duVv6'; $ghl_api_url = 'https://services.leadconnectorhq.com/contacts/'; // Extract form fields using correct Contact Form 7 field names $submission = WPCF7_Submission::get_instance(); if ($submission) { $posted_data = $submission->get_posted_data(); // Extract all booking form fields $full_name = isset($posted_data['full-name']) ? sanitize_text_field($posted_data['full-name']) : ''; $email = isset($posted_data['email']) ? sanitize_email($posted_data['email']) : ''; $phone = isset($posted_data['phone']) ? sanitize_text_field($posted_data['phone']) : ''; $service_type = isset($posted_data['service-type']) ? sanitize_text_field($posted_data['service-type']) : ''; $pickup_location = isset($posted_data['pickup-location']) ? sanitize_text_field($posted_data['pickup-location']) : ''; $destination = isset($posted_data['destination']) ? sanitize_text_field($posted_data['destination']) : ''; $pickup_date = isset($posted_data['pickup-date']) ? sanitize_text_field($posted_data['pickup-date']) : ''; $pickup_time = isset($posted_data['pickup-time']) ? sanitize_text_field($posted_data['pickup-time']) : ''; $hours = isset($posted_data['hours']) ? sanitize_text_field($posted_data['hours']) : ''; $passengers = isset($posted_data['passengers']) ? sanitize_text_field($posted_data['passengers']) : ''; $additional_info = isset($posted_data['additional-info']) ? sanitize_textarea_field($posted_data['additional-info']) : ''; // Split name into first and last $name_parts = explode(' ', $full_name, 2); $first_name = isset($name_parts[0]) ? $name_parts[0] : ''; $last_name = isset($name_parts[1]) ? $name_parts[1] : ''; // Prepare contact data for GoHighLevel $contact_data = array( 'firstName' => $first_name, 'lastName' => $last_name, 'email' => $email, 'phone' => $phone, 'locationId' => $ghl_location_id, 'tags' => array('limo-booking', 'website-lead', 'booking-form'), 'customFields' => array( array('key' => 'service_type', 'field_value' => $service_type), array('key' => 'pickup_location', 'field_value' => $pickup_location), array('key' => 'destination', 'field_value' => $destination), array('key' => 'pickup_date', 'field_value' => $pickup_date), array('key' => 'pickup_time', 'field_value' => $pickup_time), array('key' => 'hours', 'field_value' => $hours), array('key' => 'passengers', 'field_value' => $passengers), array('key' => 'additional_info', 'field_value' => $additional_info) ) ); // Send data to GoHighLevel API $response = wp_remote_post($ghl_api_url, array( 'headers' => array( 'Authorization' => 'Bearer ' . $ghl_api_key, 'Content-Type' => 'application/json', 'Accept' => 'application/json' ), 'body' => json_encode($contact_data), 'timeout' => 30 )); // Log for debugging if (is_wp_error($response)) { error_log('GHL Webhook Error: ' . $response->get_error_message()); } else { error_log('GHL Webhook Success: Contact created for ' . $email); } } } } }}} XML Sitemap

XML Sitemap Index

This XML sitemap is used by search engines which follow the XML sitemap standard. This file contains links to sub-sitemaps, follow them to see the actual sitemap content.

This file was dynamically generated using the WordPress content management system and XML Sitemap Generator for Google by Auctollo.

URL of sub-sitemapLast modified (GMT)
https://iconiclimoservice.com/sitemap-misc.html2025-08-05T03:54:50+00:00