=== NativeSync Chat ===
Contributors: nativesync
Tags: chat, translation, multilingual, live chat, customer support
Requires at least: 5.0
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 1.0.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Real-time 2-way translation chat widget. Customers chat in their language, you read in yours.

== Description ==

**NativeSync Chat** adds a lightweight live chat widget to your WordPress site with **real-time automatic translation**. Your customers can write in any language — you'll see every message translated to your language in your dashboard. When you reply, they see your message in their language.

Perfect for international e-commerce stores, multilingual support teams, and businesses serving customers who speak different languages.

= Key Features =

* **2-Way Real-Time Translation** — Messages are translated instantly in both directions.
* **Lightweight Widget** — Under 50KB, loads asynchronously, zero impact on page speed.
* **No Login Required for Customers** — Visitors simply type and chat.
* **Dashboard for Replies** — View and reply to all conversations from the NativeSync web dashboard.
* **Online/Offline Mode** — Set custom offline messages when you're away.
* **Mobile Friendly** — Responsive chat bubble works on all devices.
* **Telegram Notifications** — Get notified of new chats via Telegram bot (optional).

= Plans =

* **Free Plan** — 100 translated messages per month, NativeSync branding on widget.
* **Pro Plan ($29/month)** — Unlimited messages, white-label (no branding), priority support.

= How It Works =

1. Install and activate the plugin.
2. Register a free account at [NativeSync Dashboard](https://nativesync.chat).
3. Copy your **Shop ID** from the Dashboard Settings page.
4. Paste the Shop ID in **Settings → NativeSync Chat** in your WordPress admin.
5. Done! A chat bubble appears on your site.

= External Service (Important) =

This plugin relies on the **NativeSync SaaS platform** to function. When the plugin is active and a Shop ID is configured, the following external connections are made:

1. **Widget JavaScript** is loaded from `https://nativesync.chat/widget.min.js` on every frontend page where the widget is active. This script renders the chat interface.
2. **Chat messages** are sent to and received from the Supabase backend at `https://idjchdeiictepcijokzy.supabase.co` for real-time messaging and translation.
3. **Translation** is performed by the DeepL API on the server side (via Supabase Edge Functions). No direct connection to DeepL is made from the visitor's browser.

**No data is collected or transmitted until the site administrator configures a valid Shop ID.**

By using this plugin, you agree to the NativeSync:

* [Terms of Service](https://nativesync.chat/terms)
* [Privacy Policy](https://nativesync.chat/privacy)

== Installation ==

1. Upload the `nativesync-chat` folder to the `/wp-content/plugins/` directory, or install directly from the WordPress Plugin Directory.
2. Activate the plugin through the **Plugins** menu in WordPress.
3. Go to **Settings → NativeSync Chat**.
4. Register at [nativesync.chat](https://nativesync.chat) if you haven't already.
5. Copy your Shop ID from the dashboard and paste it into the plugin settings.
6. Click **Save Settings**.

== Frequently Asked Questions ==

= Do I need a NativeSync account? =

Yes. The plugin requires a free NativeSync account to function. You can register at [nativesync.chat](https://nativesync.chat).

= What languages are supported? =

NativeSync supports all languages available through the DeepL translation API, including English, Vietnamese, Chinese, Japanese, Korean, French, German, Spanish, Portuguese, and many more.

= Is there a free plan? =

Yes! The free plan includes 100 translated messages per month. The chat widget will display "Powered by NativeSync Chat" branding. If you need more messages or want white-label (no branding), upgrade to the Pro plan for $29/month.

= Why does the free plan show a "Powered by NativeSync" badge? =

The badge helps support the development of NativeSync Chat and keeps the free plan available. On WordPress, the badge is **only shown if the site administrator explicitly opts in** via the checkbox in **Settings → NativeSync Chat**. On Shopify, the badge is shown for Free plan users and hidden for Pro plan users.

= What happens when I reach the free plan limit? =

When the 100-message monthly limit is reached, new messages will be blocked until the next billing cycle (1st of each month). Visitors will see a friendly notice that the chat service has reached its limit.

= Does this plugin slow down my website? =

No. The widget script is loaded asynchronously (deferred) and is under 50KB. It has zero impact on your Core Web Vitals or page load speed.

= Where is the data stored? =

All chat data is stored on Supabase (hosted on AWS). Messages are encrypted in transit. See our [Privacy Policy](https://nativesync.chat/privacy) for details.

= Can I use this on multiple WordPress sites? =

Each WordPress site needs its own Shop ID. You can create multiple shops from the same NativeSync account.

= How do I cancel the Pro plan? =

You can cancel your Pro subscription directly from the NativeSync Dashboard under **Settings → Plan & Billing**. Your Pro access continues until the end of the current billing period.

== Screenshots ==

1. Chat widget on a WordPress site — customers see it as a floating bubble.
2. Plugin settings page — simply paste your Shop ID.
3. NativeSync Dashboard — view and reply to translated conversations.

== Changelog ==

= 1.0.2 =
* Fixed: Guideline 10 compliance — "Powered by" badge now requires explicit opt-in via checkbox in plugin settings.
* Added: Attribution checkbox in Settings (default: unchecked). Badge only appears if admin explicitly enables it.
* Removed: Automatic Free Plan branding notice that did not meet WordPress guidelines.
* Updated: Widget script to support WordPress opt-in badge control via `data-show-badge` attribute.

= 1.0.1 =
* Fixed: Prefixed all function names, constants, and options with `natich_` / `NATICH_` per WordPress Plugin Directory guidelines.
* Added: Free Plan branding notice in the settings page for Guideline 10 compliance.
* Added: Option migration from previous prefix (`nsc_`) to new prefix (`natich_`).

= 1.0.0 =
* Initial release.
* Real-time 2-way translation chat widget.
* Free plan: 100 messages/month.
* Pro plan: unlimited messages, white-label.
* Settings page with Shop ID configuration.
* Automatic widget injection via wp_enqueue_script().

== Upgrade Notice ==

= 1.0.2 =
Guideline 10 compliance: "Powered by" badge now requires explicit opt-in. Update recommended.

= 1.0.1 =
Important update: All internal names are now properly prefixed per WordPress guidelines. Your Shop ID setting will be automatically migrated.

= 1.0.0 =
First release of NativeSync Chat. Install to add real-time translation chat to your WordPress site.
