=== GoBolt Chat App ===
Contributors: gobolt
Tags: woocommerce, chat, customer support, ai, store management
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.0
Stable tag: 1.7.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Adds GoBolt's merchant dashboard and storefront shopping assistant to WooCommerce.

== Description ==

GoBolt Chat App connects a WooCommerce store to the hosted GoBolt service. It
adds a merchant dashboard, a storefront shopping assistant, product and order
tools, coupon management, and product-highlight playback.

WooCommerce compatibility: requires WooCommerce 9.4 or later and is tested
through WooCommerce 10.9.

Secure product image import requires the PHP cURL extension with
`CURLOPT_RESOLVE` (DNS-pinning) and HTTPS protocol support. The plugin shows an
administrator warning and fails that feature closed when the extension is
unavailable; chat, catalog, orders, and other tools remain usable.

The plugin sends store configuration and the commerce data needed for enabled
features to `https://aigb.gobolt.app`. Administrators explicitly control the
storefront assistant. Optional administrator analytics are disabled by default.

Human-readable JavaScript source corresponding to the bundled administrator and
storefront assets is included in the release under `source/`, together with the
package manifests and build configuration.

Use of the hosted service is subject to:

* Terms of service: https://gobolt.app/terms
* Privacy policy: https://gobolt.app/privacy-policy

== External services and privacy ==

GoBolt is a hosted software service and an Internet connection is required for
its hosted features.

= GoBolt API =

The plugin contacts `https://aigb.gobolt.app` during registration, while an
administrator uses the GoBolt dashboard, when enabled store content is
synchronized, and when a shopper uses the storefront assistant.

Depending on the enabled feature, data sent to GoBolt can include the store URL,
name, administrator contact email, store phone, locale, country, province,
currency, languages, WordPress/WooCommerce/plugin versions, catalog and
inventory data, selected pages/posts/policies, discounts, merchant settings,
chat messages, pseudonymous chat-thread identifiers, and ordinary connection
metadata such as an IP address. Order/customer/birthday data is sent only when a
merchant enables or invokes a feature that needs it. A shopper requesting order
help sends the email address and order number that shopper enters. GoBolt uses
this data to provide synchronization, chat, order assistance, merchant
operations, messaging, billing, and product-highlight features.

The permanent per-store credential is held by WordPress and sent only
server-to-server. Administrator JavaScript receives a short-lived,
store-scoped session token. The storefront stores a random chat-thread
identifier and interface preferences in browser local storage.

Service: https://gobolt.app/

Terms: https://gobolt.app/terms

Privacy policy: https://gobolt.app/privacy-policy

= Cloudflare Turnstile =

The plugin loads Cloudflare Turnstile from
`https://challenges.cloudflare.com` only when bot verification is required,
including protected order-lookup flows. Cloudflare receives browser and
challenge data needed to provide that verification.

Terms: https://www.cloudflare.com/website-terms/

Privacy policy: https://www.cloudflare.com/privacypolicy/

= Billing services =

When an administrator starts a paid checkout, the plugin may load Paddle.js
from `https://cdn.paddle.com` or navigate to a Stripe-hosted checkout at
`https://checkout.stripe.com`. Payment details are entered directly into the
selected billing provider; GoBolt relies on signed provider webhooks before
granting a plan or credits.

Paddle terms: https://www.paddle.com/legal/terms

Paddle privacy policy: https://www.paddle.com/legal/privacy

Stripe terms: https://stripe.com/legal/consumer

Stripe privacy policy: https://stripe.com/privacy

= Optional administrator services =

When GoBolt administrator support is configured, the admin dashboard can load
Intercom from `https://widget.intercom.io`. PostHog product analytics are
disabled by default. A site administrator can opt in with the unticked "Share
usage analytics" checkbox at the end of setup, or later under GoBolt → Settings
→ Behavior, and can turn it off again at any time.
Nothing is loaded or sent unless that option is on. When it is on, the
dashboard sends administrator product-usage events to PostHog (by default
`https://us.i.posthog.com`, using a project token supplied by the GoBolt
service), and also records administrator screen sessions and interaction
heatmaps so we can understand how the dashboard is used and improve it.
Credential values in dashboard URLs are masked before they are sent. Input fields are masked and their contents are never
recorded. These dashboard recordings and heatmaps cover only the administrator
dashboard.

Intercom terms: https://www.intercom.com/legal/terms-and-policies

Intercom privacy policy: https://www.intercom.com/legal/privacy

PostHog terms: https://posthog.com/terms

PostHog privacy policy: https://posthog.com/privacy

= Store Radio listening events =

While Store Radio is switched on, its page sends anonymous listening events to
PostHog, GoBolt's analytics provider (the project and host are supplied by the
GoBolt service), so GoBolt can improve the service. The events are: the
station opened, a clip played, and a product added to the cart from the
station. Each carries only the event name, the platform, the clip's id and its
language. They carry no personal data (no name, email, page address or
referrer) and use no cookies; each page load gets a random identifier that is
never stored. As with any web request, PostHog sees the browser's IP address;
location lookup is turned off for these events and no person profile is built
from them. The page honours browser privacy signals (Global Privacy Control,
Do Not Track) and, on sites that use a consent plugin supporting the WP
Consent API, the shopper's statistics choice.

Terms: https://gobolt.app/terms

Privacy policy: https://gobolt.app/privacy-policy

PostHog terms: https://posthog.com/terms

PostHog privacy policy: https://posthog.com/privacy

== Installation ==

1. Install and activate WooCommerce.
2. Upload the GoBolt release zip from Plugins > Add New > Upload Plugin.
3. Activate GoBolt Chat App.
4. Open the GoBolt menu and complete onboarding.

== Frequently Asked Questions ==

= Does this plugin require WooCommerce? =

Yes. WooCommerce is a declared plugin dependency.

= Does the plugin expose the permanent GoBolt store token in the browser? =

No. The token stays server-side. An authenticated administrator exchanges a
WordPress REST nonce for a short-lived, browser-scoped session token.

= Is analytics enabled by default? =

Administrator dashboard analytics are off until a site administrator opts in.
The Store Radio page sends the anonymous listening events described under
External services and privacy.

== Changelog ==

= 1.7.1 =
* Removes unshipped OpenCart integration code from the shared administrator and storefront assets. WooCommerce remains supported.

= 1.7.0 =
* Store Radio: a station page at /gobolt-radio/ inside your theme that plays every
  live product highlight, with add to cart and the shopper's language. It is off
  until you switch it on in GoBolt (Growth and Max plans).
* Add the [gobolt_radio_launcher] shortcode or the GoBolt Radio launcher widget
  to show a Listen button while the station is on.
* Store Radio sends anonymous listening events (station opened, clip played,
  added to cart) to GoBolt's analytics provider to improve the service,
  honouring the WP Consent API and browser privacy signals.

= 1.6.2 =
* Show exact credit balances and signed support changes without treating unavailable balances as zero.
* Keep current allowance, recorded use and support history distinct across the account and usage views.

= 1.6.1 =
* The chat widget's "Powered by Bolt" link now opens gobolt.app in a new tab
  with referral attribution, as on Shopify (it pointed at the store page).
* Includes the storefront and admin fixes merged since 1.6.0.

= 1.6.0 =
* Preserve useful product answers and shopping context across turns.
* Add supported products to the native cart with verified feedback.
* Improve mobile chat loading, long-message entry, and product images.
* Show merchant knowledge coverage and refresh public catalog relationships.

= 1.5.0 =

* Coupons created from the WhatsApp/Telegram assistant no longer get a
  one-redemption limit nobody asked for: a coupon requested without a usage
  limit is now unlimited, and a stated limit is still honoured exactly.
* Coupon creation accepts an optional request key. If the connection drops
  after the coupon was already saved, the retry returns that same coupon
  instead of creating a second one, and a key reused for different terms is
  refused rather than answered with the wrong coupon.
* Coupon lookups and creation responses now report the plugin version, so the
  GoBolt backend can tell which build a store is running instead of guessing
  from missing fields.

= 1.4.2 =

* WhatsApp/Telegram Channels page: removed the duplicate country code shown
  next to a connected WhatsApp number, corrected phone-number normalization so
  a pasted or full number is parsed the same way as a typed one, and fixed
  connect/QR button text that lost contrast in dark mode.
* Coupons: a coupon lock no longer misreports an unchanged value as lost ownership, so creating a coupon under concurrent requests succeeds instead of failing closed. (the code merged before the 1.4.1 bump but 1.4.1 was never distributed; noted here so the first distributed build carries it)
* Order tracking: sales-history, order, and shipment-status lookups now share
  one merchant-timezone-aware window and one read-authority check across the
  storefront assistant and the WhatsApp/Telegram agent, order history reports
  a truthful count when it is truncated instead of dropping rows silently, and
  a malformed shipment-status response is validated before being shown to a
  shopper instead of surfacing a fatal error.
* WhatsApp/Telegram command examples: added the copy-to-clipboard button
  where it was missing, and it now reports a copy failure truthfully instead
  of claiming success.
* Chat widget appearance: fixed the style picker discarding a merchant's
  uploaded custom icon, and removed the "custom icon position" control, which
  never worked because the backend does not accept it.
* Country flags in the dialing-code pickers now render as real image files
  instead of embedded CSS backgrounds, closing cases the 1.4.1 fix did not
  fully cover.
* Usage & credits: the account usage summary now reads from the same
  ledger-backed model as the backend usage report, so the two agree.
* Performance: the admin dashboard now loads only the active language instead
  of all 14 at once, shrinking the JavaScript it has to load.

= 1.4.1 =

* Fixed country flag icons not rendering in dialing-code pickers (onboarding
  and Store control) — the vendored flag images failed to load whenever an
  SVG's markup contained parentheses (common in more detailed flags), which
  silently broke the underlying CSS.

= 1.4.0 =

* Translated the merchant dashboard, the storefront assistant, and GoBolt
  email into 10 languages, including right-to-left layouts.
* Reworked onboarding: working WhatsApp and Telegram connection steps, a live
  chat and product-highlight preview, and a completion summary.
* Weekly briefing: the delivery channel chosen during onboarding is now saved,
  and the channel switch stays visible after briefings are enabled.
* Product highlights: pick the narrator voice and the name the assistant uses
  for the store, and a failed highlight now reports the real reason instead of
  a generic retry message.
* Audio credits: the card now compares the wallet against the credits added in
  the current billing cycle, so its figures agree with the credit-history and
  usage-history screens.
* Plan changes are described in readable wording instead of internal status
  codes.
* Knowledge: long answers in the training playground no longer time out after
  20 seconds, Sync now is enabled only when a source can actually sync, sync
  status no longer sticks on pending, and adding an entry works again.
* Storefront assistant: internal error text is no longer shown to shoppers,
  the order-tracking verification box no longer goes blank when switching
  tabs, and shoppers who are not signed in are handled correctly.
* Fixed a WhatsApp verification retry that hung with no feedback, a dashboard
  layout reset, and a dashboard crash caused by browser translation and
  extension scripts.
* Product image import no longer requires the optional cURL progress callback.
* WooCommerce and GoBolt now keep the same store time zone.

= 1.3.0 =

* Hardened authentication, remote requests, webhook-backed billing, coupon
  validation, product-highlight credit consistency, and private realtime.
* Added deterministic packaging, security regression suites, and official
  WordPress Plugin Check gating.
