=== Smartcode Live Chat ===
Contributors: alextrejo
Plugin URI: https://smartcode.net/live-chat/
Author URI: https://smartcode.net
Tags: live chat, chat, customer support, agent, real-time chat
Requires at least: 6.2
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Connect with your visitors in real time. A lightweight, privacy-friendly live chat plugin built natively for WordPress.

== Description ==

Smartcode Live Chat puts a live chat widget on your WordPress site in minutes — no third-party accounts, no monthly SaaS fees, and no visitor data sent to servers you don't control. Everything runs on your own hosting, in your own database.

When a visitor starts a chat, your agents are notified instantly. They accept the conversation from the WordPress admin bar or dashboard, reply in a real-time popup window, and the visitor sees responses as they're typed.

= For Visitors =

* Clean, unobtrusive chat bubble — bottom-left or bottom-right
* Customizable welcome message and primary color to match your brand
* Real-time queue position ("You are next!" or "3 chats before you")
* Typing indicator so visitors know the agent is responding
* Star rating at the end of every chat
* Transcript sent to their email on request
* Chat stays open as visitors browse between pages on your site
* Offline contact form when no agents are available

= For Agents =

* Toggle online/offline from the WordPress admin bar — available on any admin page and on the front end while logged in
* Accept the next waiting customer with one click
* Real-time chat popup window with typing indicator
* See the customer's name, email, and how long they've been waiting
* View and search their own chat history, with ratings and transcripts

= For Managers =

* Live queue view with wait times
* Online agents dashboard
* Full chat history with filters by agent, date range, and rating
* Daily Report — chats per day, per-agent stats (chats handled, average first response time, average duration, abandoned chats)
* Chat Overview report for any date range — totals, completion rate, abandonment rate, and a star rating breakdown

= Technical =

* All data stored in your own WordPress database — zero external dependencies
* Works with any WordPress theme
* Translation-ready — ships with a Spanish (es_ES) translation
* Developer-friendly, with 25+ action and filter hooks for custom integrations (`smartchat_customer_created`, `smartchat_chat_ended`, `smartchat_rating_saved`, and more)

= How It Works =

1. Install and activate — you're redirected to a setup guide automatically
2. Create users with the Chat Agent or Chat Manager role
3. Customize the welcome message, color, and widget position in Settings
4. Agents log in, click "Go Online" in the admin bar, and start accepting chats

That's it — your visitors will see the chat bubble immediately.

= Privacy & Data =

Smartcode Live Chat stores visitor data (name, email, IP address, and chat messages) in your own WordPress database. No data is transmitted to the plugin author or any third party — you're in full control.

If you use Smartcode Live Chat to collect personal data from EU visitors, make sure your privacy policy reflects this, as required by GDPR.

== Installation ==

1. Upload the `smartcode-live-chat` folder to the `/wp-content/plugins/` directory, or install directly through the WordPress plugin screen
2. Activate the plugin through the **Plugins** screen
3. Follow the setup guide that appears automatically after activation
4. Assign the **Chat Agent** or **Chat Manager** role to your support staff
5. Go to **Smart Chat → Settings** to customize the widget

== Frequently Asked Questions ==

= Does this require an account or subscription? =
No. Smartcode Live Chat runs entirely on your WordPress hosting. There are no external accounts or recurring fees.

= How many agents and managers can I have? =
Unlimited Chat Agents and Chat Managers.

= Will it slow down my site? =
The chat widget only loads on the pages you enable it for. Polling uses a lightweight endpoint that bypasses the full WordPress bootstrap, keeping server load low even during active chats.

= Can agents use it while browsing the front end of the site? =
Yes. Agents can toggle online/offline and accept new chats from the WordPress admin bar, which is visible on both wp-admin and the public-facing site while they're logged in.

= What happens when no agents are online? =
Visitors see a configurable offline message and can leave a message through a contact form, which is emailed to the addresses you configure in Settings.

= Is it GDPR compliant? =
Smartcode Live Chat stores data only in your own database and sends nothing to third parties. Whether your specific use is GDPR-compliant depends on your setup, your privacy policy, and how you handle the data you collect.

= Can I integrate it with my CRM or email list? =
Yes. The `smartchat_customer_created` action fires every time a new visitor starts a chat, passing their name, email, and phone number, so you can push contacts to your CRM, email marketing tool, or any other service.

= Can I translate it? =
Yes. The plugin is translation-ready and ships with a Spanish (es_ES) translation. Use the included `.pot` file with Poedit or a similar tool to add more languages.

= What are the requirements? =
WordPress 6.2 or higher and PHP 7.4 or higher. No additional plugins required.

== Screenshots ==

1. Front end — Contact form when no agent is online
2. Front end — Start a new chat conversation
3. Front end — Shows user position in queue
4. Front end — Active Chat Conversation
5. Front end — Current chat has ended
6. Agent dashboard — My Chats view with filters, sorting, and ratings
7. Chat Queue — live queue with customer details and wait times
8. Agents Status — Shows agent online/offline status
9. Settings — color picker, messages, position, and page targeting
10. Daily Report — per-agent stats for chats handled that day
11. Chat History — all chats stats with date range and rating breakdown
12. Chat Overview — aggregate stats for a date range, with rating breakdown
13. Chat Transcript — Full details for a given chat
14. Agent chat popup — real-time conversation window with typing indicator

== Privacy ==

Smartcode Live Chat stores chat information (visitor name, email, phone, IP address, and messages) in your own WordPress database so your staff can provide live chat support, review chat history, and send requested transcripts. This data is not shared with any third party.

== Changelog ==

= 1.0.0 =
* Initial release.
