=== TechnicalHimanshu ChatConnect ===
Contributors: technicalhimanshu
Tags: whatsapp chat, whatsapp support, floating chat, live chat, whatsapp button
Requires at least: 5.8
Tested up to: 7.1
Stable tag: 1.1.3
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Lightweight floating WhatsApp chat support plugin with smart pre-filled messages, welcome messages, business hours, and responsive popup design.

== Description ==

TechnicalHimanshu ChatConnect is a lightweight WhatsApp chat plugin for WordPress that adds a floating chat button with a customizable popup form and smart message builder. It allows visitors to contact you instantly via WhatsApp with structured messages including name, email, order ID, message, and page URL.

It allows users to send structured messages directly to WhatsApp with dynamic fields such as name, email, order ID, message, and page URL.

The plugin also includes an optional automated welcome message that appears after a configurable delay and can be displayed according to the selected frequency.

The plugin focuses on simplicity, clean UI, smart message formatting, and responsive interaction. It automatically removes empty fields from generated messages and maintains proper formatting before opening WhatsApp.

It is ideal for customer support, sales inquiries, lead generation, and fast communication without requiring any external API.

No external API, no third-party tracking, and no data collection.

== Why TechnicalHimanshu ChatConnect? ==

Unlike other chat plugins, ChatConnect focuses on clean UI, smart message formatting, lightweight performance, and zero API dependency. It provides flexible control over chat behavior, welcome messages, business hours, form fields, and message formatting.

== Features ==

- Floating WhatsApp chat button with customizable popup form
- Direct WhatsApp click-to-chat integration using wa.me
- Smart message builder with dynamic placeholders
- Automatically removes empty fields for clean messages
- Optional automated welcome message
- Configurable welcome message display delay from 1 to 60 seconds
- Welcome message frequency control
- Every page load, once per session, once per day, or once every 7 days
- Welcome message can be clicked to open the chat popup
- Continuous WhatsApp icon attention animation while the welcome message is displayed
- Business hours with online/offline status indicator
- Timezone-aware chat availability with accurate local time
- Support for overnight and cross-midnight business hours
- Mobile and desktop button customization options
- Left or right chat button positioning
- Custom chat icon support
- Page-level display control
- Homepage, posts, pages, and products display rules
- Customizable form fields
- Name, email, order ID, and message fields
- Smart message inclusion controls
- Optional page URL inclusion in WhatsApp messages
- ESC key support to close the popup
- Click outside the popup to close
- Keyboard support for opening and closing the chat
- Responsive popup design for mobile and desktop
- Lightweight, fast, and optimized performance
- CSS isolation to reduce theme and plugin conflicts
- No WhatsApp API or external service dependency


== Welcome Message ==

ChatConnect can display an optional welcome message above the floating WhatsApp button to encourage visitors to start a conversation.

The welcome message can be enabled or disabled from the ChatConnect admin settings.

You can configure:

- Welcome message text
- Display delay from 1 to 60 seconds
- Display frequency
- Every page load
- Once per browser session
- Once per day
- Once every 7 days

When the welcome message is displayed, the WhatsApp icon can use a subtle attention animation to attract the visitor's attention.

Clicking the welcome message opens the WhatsApp chat popup.

The welcome message does not include a dismiss button. Visitors can simply click the message to open the chat popup or continue browsing.


== Message Template Variables ==

You can use the following variables in your message template:

- {name}
- {email}
- {order_id}
- {message}
- {page_url}


== Example Template ==

Hello Support Team

Name: {name}
Email: {email}
Order ID: {order_id}

Message:
{message}

Page URL:
{page_url}


== Use Cases ==

- Customer support via WhatsApp
- WooCommerce order queries
- Lead generation and quick contact
- Sales and inquiry handling
- Product-related support
- Direct communication without forms
- Quick visitor-to-WhatsApp communication


== Installation ==

1. Upload the plugin files to the `/wp-content/plugins/technicalhimanshu-chatconnect` directory, or install via the WordPress plugin screen.
2. Activate the plugin through the 'Plugins' screen in WordPress.
3. Go to **ChatConnect** menu in the WordPress admin.
4. Enter your WhatsApp number and configure the chat settings.
5. Configure the welcome message, business hours, form fields, and message template as required.
6. Save changes.
7. Visit your website and test the floating WhatsApp button and popup.


== Frequently Asked Questions ==

= Does this plugin require WhatsApp API? =

No. ChatConnect uses the WhatsApp click-to-chat feature through `wa.me`. No WhatsApp API or external API account is required.

= Can I customize the message format? =

Yes. You can fully customize the WhatsApp message template using placeholders such as `{name}`, `{email}`, `{order_id}`, `{message}`, and `{page_url}`.

= Can I enable a welcome message? =

Yes. You can enable or disable the welcome message from the ChatConnect settings.

= Can I control when the welcome message appears? =

Yes. You can configure the welcome message delay from 1 to 60 seconds and choose how frequently it can appear.

Available frequency options are every page load, once per browser session, once per day, or once every 7 days.

= Can visitors dismiss the welcome message? =

No. The welcome message does not include a dismiss button. Visitors can click the welcome message to open the chat popup.

= Does the welcome message open the WhatsApp chat? =

Yes. Clicking the welcome message opens the ChatConnect popup.

= Does it work on mobile devices? =

Yes. ChatConnect is responsive and includes separate mobile customization options for the floating button.

= Can I customize the chat button position? =

Yes. You can position the floating button on either the left or right side and configure its size, bottom spacing, and side spacing.

= Can I control chat availability? =

Yes. Business hours can be enabled to show an online or away status based on the configured start time, end time, and timezone.

= Does it support overnight business hours? =

Yes. ChatConnect supports business hours that cross midnight, such as 10:00 PM to 6:00 AM.

= Can I select a custom chat icon? =

Yes. You can upload or select a custom chat icon using the WordPress Media Library.

= Does it slow down my website? =

ChatConnect is designed to be lightweight and loads its frontend assets only when the plugin is enabled and the configured display rules allow the chat to appear.

= Does ChatConnect collect visitor data? =

No. ChatConnect does not use third-party tracking, does not require an external API, and does not collect visitor information on an external server.


== Screenshots ==

1. Floating chat button and welcome message on frontend
2. WhatsApp chat popup and online support form
3. WhatsApp chat popup and offline support form
4. ChatConnect admin settings panel
5. General Settings
6. Display Rules Settings
7. Welcome Message Settings
8. Form Fields Settings
9. Message Settings
10. Business Hours and Timezone Settings
11. Desktop Button Settings
12. Mobile Button Settings
13. Message Template Customization and live Preview


== Changelog ==

= 1.1.3 =

* Added configurable welcome message display frequency.
* Added welcome message frequency options: every page load, once per session, once per day, and once every 7 days.
* Added configurable welcome message display delay from 1 to 60 seconds.
* Added optional automated welcome message to encourage visitor engagement.
* Added continuous WhatsApp icon attention animation while the welcome message is displayed.
* Improved welcome message positioning for left and right chat button layouts.
* Improved welcome message behavior when opening the chat popup.
* Removed the welcome message dismiss button and related dismiss functionality.
* Improved popup accessibility with keyboard interaction support.
* Improved business hours status handling and timezone-aware calculations.
* Improved WhatsApp number validation and click-to-chat URL generation.
* Improved frontend popup interaction and stability.
* Minor frontend UI, UX, and performance improvements.
* Verified compatibility with WordPress 7.1.

= 1.1.2 =

* Tested compatibility with WordPress 7.0.
* Verified compatibility using Plugin Check.
* Minor stability and maintenance improvements.

= 1.1.1 =

* Added ESC key support to close popup quickly.
* Added click outside popup to close functionality.
* Improved popup interaction and animation smoothness.
* Updated plugin icon, banner, and branding assets.
* Minor UI and UX refinements.

= 1.1.0 =

* Added full CSS isolation wrapper to prevent theme and plugin conflicts.
* Improved timezone handling with accurate local time display based on selected timezone.
* Replaced fixed IST display with dynamic GMT offset (e.g., GMT+3, GMT+5:30).
* Improved business hours logic including overnight (cross-midnight) support.
* Enhanced WhatsApp number validation and input handling.
* Optimized frontend performance with DOM caching and reduced reflows.
* Improved popup UI/UX and mobile responsiveness.
* Added smooth scrolling inside popup for better user experience.
* Added Settings quick link in plugin action row.
* Added Support link in plugin meta row.
* Strengthened input sanitization and overall security.
* Minor UI and layout refinements.

= 1.0.0 =

* Initial release.
* Floating chat button with popup form.
* WhatsApp integration.
* Smart message builder.
* Business hours feature.
* Mobile and desktop customization.


== Upgrade Notice ==

= 1.1.3 =

Added configurable welcome messages with delay and frequency controls, improved popup accessibility and interaction, removed welcome message dismiss functionality, improved business hours and WhatsApp handling, and verified compatibility with WordPress 7.1.

= 1.1.2 =

Compatibility update for WordPress 7.0 with Plugin Check verification.

= 1.1.1 =

Improved popup interaction and animation smoothness. Updated plugin icon, banner, and branding assets.

= 1.1.0 =

Improved UI isolation, added timezone-aware business hours, performance optimizations, and enhanced WhatsApp validation.

= 1.0.0 =

Initial release of TechnicalHimanshu ChatConnect.