=== neb – AI sales assistant ===
Contributors: onedai
Tags: chat, woocommerce, sales assistant, customer questions, live chat
Requires at least: 5.8
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

neb answers your shoppers' questions in a chat, in real time, from what your own pages say. Works with or without WooCommerce.

== Description ==

neb is an AI sales assistant by OneDai. It sits on every page of your store and answers shoppers' questions in a chat, from what your store's own pages say: product pages, size charts, care labels, delivery and returns pages, FAQs. It answers in the shopper's language and works at any hour.

What neb will not do:

* Invent facts that are not on your pages. When the page is silent it says "I don't know" and tells your team what was asked.
* Promise discounts or codes you never created.
* Give medical, legal or financial advice. It sends those questions to a professional.
* Speak for other shops or price-match.
* Edit orders. It points the shopper to your team.

Every morning you get a report of the conversations: what shoppers asked, and what your pages could not answer.

This plugin adds the neb chat to your site. Click "Connect to neb", sign in to neb (or create an account) and confirm: the plugin is set up for you. No keys to copy, no API keys to create.

**With WooCommerce**, product pages also pass the product's id, name and link to neb, and you can choose to show the chat on product pages only. Once connected, the plugin sends your product catalog to neb (names, prices, stock, options, descriptions) and keeps it up to date when you edit a product, so neb answers from current prices and stock.

**Without WooCommerce** the chat works on any WordPress site, on every page.

= Pricing =

Starter is $50/month with a 7-day free trial. Pro is $250/month, for larger stores.

== External services ==

This plugin connects your site to the neb service run by OneDai, which is what makes the chat work. It contacts neb only after an administrator clicks "Connect to neb" or saves a store key.

* Connecting: "Connect to neb" sends the administrator's browser to the neb dashboard (app.neb-app.com) with this site's address and the address to come back to. neb sends back a one-time code, which the plugin exchanges with neb's API (neb-app.com) for the store key and a private sync token. The token is stored in this site's database and is never shown in pages.
* Catalog sync (WooCommerce, only while connected): the plugin sends published, visible products to neb's API: name, link, prices, currency, stock status, SKU, categories, tags, attributes, variations, short and full description. This happens right after connecting, about a minute after a product is edited, trashed or deleted, and once a day. No customer, order or user data is sent. "Disconnect" stops it and removes the sent products on the neb side.
* The chat: on pages where the chat is shown, the browser loads the neb widget script from neb's servers and passes your store key, the page address, the page type, the site language and, on WooCommerce product pages, the product's id, name and link. When a shopper writes in the chat, their messages are sent to neb so it can answer.
* The plugin sets no cookies and does no tracking. The chat keeps a random visitor id in the shopper's browser storage so a conversation survives page loads.

Terms of service: (link to be added before release)
Privacy policy: (link to be added before release)

== Installation ==

1. In WordPress: Plugins → Add New → Upload Plugin, choose `neb.zip`, Install, then Activate.
2. Go to Settings → neb and click "Connect to neb".
3. Sign in to neb (or create your account), confirm, and you are back in WordPress with everything set up.

The chat button now appears on your site, in the corner you chose. Prefer not to connect? Paste the store key from your neb dashboard into Settings → neb and save instead.

Choosing "Product pages only" shows the chat only on WooCommerce product pages.

== Frequently Asked Questions ==

= Where do I find my store key? =

You don't need to: "Connect to neb" fills it in. It is also on the Install page of your neb dashboard, if you prefer to paste it.

= What does the product sync send? =

Published, visible products only: name, link, prices, currency, stock status, SKU, categories, tags, attributes, variations and descriptions. Developers can change or skip a product with the `neb_product_payload` filter (return null to leave it out).

= Does it slow my site down? =

The plugin adds one small script that loads asynchronously in the footer, so it does not block your page from showing. The chat itself loads after that.

= Does it work without WooCommerce? =

Yes. On a site without WooCommerce, show it on all pages.

= Can I hide it on certain pages? =

Developers can use the `neb_enabled` filter: return false to skip neb on the current request. The `neb_config` filter changes the data handed to the chat.

= What happens when I delete the plugin? =

Its settings (`neb_settings`, `neb_connection`, `neb_sync_queue`, `neb_sync_state`) and scheduled events are removed on every site of a multisite network, and neb is asked to revoke the sync token and drop the products it received.

== Changelog ==

= 1.1.0 =
* "Connect to neb": one button signs you in (or up) at neb and sets the plugin up. No store key to copy.
* WooCommerce catalog sync without REST API keys: full sync on connect and daily, product edits sent within a minute, removals mirrored.
* Status, "Sync products now" and "Disconnect" on Settings → neb.
* Declares WP Consent API compatibility (no cookies, no tracking).
* Uninstall also removes the connection, the sync queue and scheduled events, and revokes the token on neb's side.

= 1.0.0 =
* First release: Settings → neb (store key, position, all pages or product pages only, widget URL override), async footer loader, WooCommerce product context.

== Upgrade Notice ==

= 1.1.0 =
Adds "Connect to neb" and the automatic WooCommerce product sync. Your saved store key keeps working.

= 1.0.0 =
First release.
