=== Velnai for WooCommerce ===
Contributors: ranatamure
Tags: woocommerce, abandoned cart, orders, crm, chatbot
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.3
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Connect your WooCommerce store to Velnai. Sync orders and products, recover abandoned carts, and let your AI agent place orders for customers.

== Description ==

Velnai for WooCommerce links your store to your Velnai workspace in one step. Once connected, Velnai can:

* See new orders and order updates, and run your messaging automations on them.
* Recover abandoned carts. The plugin captures the customer's phone at checkout, so if they don't finish, your team can reach out.
* Read your products and order details inside a chat.
* Place an order for a customer when they confirm it.

You connect with a one-time code from your Velnai dashboard. The plugin sets up the API key and webhooks for you, so there is nothing to copy by hand.

This plugin is an interface to Velnai, a separate customer-messaging and CRM service. A Velnai account is required. See the "External services" section below for exactly what data is shared.

== Installation ==

1. Install and activate the plugin (WooCommerce must already be active).
2. In WordPress admin, go to Settings, then Velnai.
3. In Velnai, open Integrations, choose WooCommerce, and generate a connect code.
4. Paste the code into the plugin and click Connect to Velnai.

== External services ==

This plugin connects your store to Velnai (https://velnai.com), a customer-messaging and CRM service, so your team and AI agents can act on store activity. It is an opt-in connection: nothing is sent until you paste a connect code from your Velnai account and click Connect.

What is sent, and when:

* On connect: your store URL and a WooCommerce REST API key that the plugin creates are sent to Velnai, so Velnai can read your store and register order webhooks.
* Products: on connect, and whenever a product is added, changed, or removed, basic product data (id, name, SKU, price, stock status, image URL, and link) is sent so agents can look up products.
* Orders: when an order is created or updated, WooCommerce sends the order to Velnai through a webhook the plugin registers. This includes customer name, email, phone, address, items, and totals.
* Abandoned carts: when a shopper enters their email or phone at checkout but does not complete the order, the plugin sends that contact's name, email, phone, country, cart items, and total so your team can follow up.

All data is sent over HTTPS to Velnai's servers at https://backend.velnai.com.

Because order and cart data can include personal information (name, email, phone, address), please make sure your own store privacy policy tells shoppers that this information is shared with Velnai for order handling and follow-up.

By using this plugin you agree to Velnai's Terms of Use (https://velnai.com/terms) and Privacy Policy (https://velnai.com/privacy).

To stop all data sharing, click Disconnect on the plugin's settings page (Settings, then Velnai), or deactivate the plugin.

== Frequently Asked Questions ==

= What data does the plugin send to Velnai? =

Your store URL, your products, your orders, and abandoned-cart contacts. Order and abandoned-cart data can include the customer's name, email, phone, and address. See the "External services" section for the full list and when each is sent.

= Do I need a Velnai account? =

Yes. The plugin is an interface to the Velnai service. You connect it with a one-time code from your Velnai dashboard.

= How do I disconnect and stop syncing? =

Open Settings, then Velnai, and click Disconnect. You can also deactivate the plugin. Deleting the plugin removes its data from your store.

= Does this work with a heavily customized or block-based checkout? =

Order, product, and AI features work on any store. Abandoned-cart capture reads the checkout email and phone fields, so a standard WooCommerce checkout works best. Very customized or headless checkouts may need extra setup.

== Changelog ==

= 1.0.3 =
* Moved the admin settings-page CSS and the disconnect confirmation into properly enqueued asset files (no inline style or script blocks).

= 1.0.2 =
* Plugin Check cleanups: tested up to WordPress 7.0, prefixed uninstall variables, and tightened the custom-table queries.

= 1.0.1 =
* Added a connection status panel, a manual "Sync products" button with a last-synced time, and a connection test.
* Documented the external Velnai service and the data it receives.

= 1.0.0 =
* First release: connect with a code, order and product sync, abandoned-cart capture, and AI order placement.
