=== WatsBridge – Chat Button ===
Contributors: watsbridge
Tags: whatsapp, chat button, click to chat, floating button, woocommerce
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.3.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Add a lightweight WhatsApp chat button with display rules, customization options, and local interaction analytics.

== Description ==

WatsBridge – Chat Button adds a lightweight, customizable WhatsApp chat button to your WordPress site.

It helps visitors contact you faster from desktop and mobile, while giving site owners practical control over where and how the button appears.

Unlike basic click-to-chat buttons, WatsBridge – Chat Button includes targeting rules, local interaction analytics, WooCommerce-aware visibility options, and optional cart opportunity insights when WooCommerce is active.

The plugin is designed as a clean, privacy-conscious first step toward professional WhatsApp communication for WordPress and WooCommerce stores.

= Key features =

* Add a floating WhatsApp chat button to your site
* Customize button label, color, size, border radius, position and shadow
* Choose where the button appears using page targeting rules
* Show or hide the button on desktop and mobile
* Add a display delay before the button appears
* Configure WooCommerce-aware visibility when WooCommerce is installed
* Track local button interactions inside WordPress
* View useful local analytics to understand engagement
* Estimate WooCommerce cart opportunity insights when relevant
* Keep the plugin usable even when WooCommerce is not installed
* Open the configured WhatsApp destination directly, with click tracking independent of navigation

= Built for WordPress site owners =

WatsBridge – Chat Button is suitable for service businesses, local companies, online stores, consultants, agencies, and WooCommerce merchants who want a simple way to start conversations through WhatsApp.

= WooCommerce support =

When WooCommerce is installed, the plugin can adapt its visibility and insights to store-related pages and cart activity.

When WooCommerce is not installed, WooCommerce-specific analytics are hidden and the plugin remains focused on the WhatsApp button, targeting rules, and local interaction analytics.

= Privacy-conscious local analytics =

The Button and direct WhatsApp link work without analytics consent. Local impression, click, cart insight, recovery, and Button order attribution start only after explicit Statistics consent through Complianz or a supported WordPress Consent API manager. Without a supported consent manager, analytics remain disabled. Revoking consent stops new tracking and expires the Button cookie. The plugin adds no consent banner.

Cookie: watschat_sid. Provider: WatsBridge – Chat Button. Category: Statistics. Purpose: maintain a pseudonymous local analytics session for Button interaction metrics and WooCommerce attribution after consent. Expiration: 30 days. Attributes: Secure, HttpOnly, SameSite=Lax, Path=/. The Button itself shares no data with an external analytics provider.

Interaction events and cart records remain in plugin-owned WordPress tables for 90 days, conversion records for 180 days, and private operational event codes for 30 days. WordPress cron removes expired records in bounded batches. Upgrade removes the former public uploads/watschat.log file; uninstall removes plugin-owned state.

= Not affiliated with WhatsApp or Meta =

This plugin is not affiliated with, endorsed by, or sponsored by WhatsApp LLC or Meta Platforms, Inc. WhatsApp is a trademark of its respective owner.

== Installation ==

1. Upload the plugin ZIP file through Plugins > Add New > Upload Plugin.
2. Activate the plugin.
3. Open WatsBridge > WhatsApp Button.
4. Add your WhatsApp number and optional prefilled message, then save your settings.
5. Adjust display rules, appearance and analytics options as needed.

== Frequently Asked Questions ==

= Does it require WooCommerce? =

No. WooCommerce is optional. If WooCommerce is not installed, store-specific insights are hidden and the plugin remains focused on the chat button and local interaction analytics.

= Does it require a WatsBridge account or Gateway connection? =

No. The free Button works with a configured WhatsApp number. It does not require an account, Gateway pairing, or the WatsBridge CRM.

= Does the plugin send WhatsApp messages automatically? =

No. A visitor click opens the configured WhatsApp chat in their browser. The plugin does not send automatic WhatsApp messages.

= Is this an official WhatsApp or Meta plugin? =

No. WatsBridge – Chat Button is not affiliated with, endorsed by, or sponsored by WhatsApp LLC or Meta Platforms, Inc.

= Where are analytics stored? =

After explicit Statistics consent, interaction analytics are stored locally in plugin-owned WordPress database tables. Without consent, the Button remains functional and records no WatsBridge interaction analytics.

== Screenshots ==

1. Floating chat button on a website.
2. Button customization settings.
3. Display rules builder.
4. Local analytics dashboard.
5. WooCommerce-aware insights when WooCommerce is active.

== Changelog ==

= 1.3.0 =
* Open WhatsApp directly from the configured number and message, without a local click redirect URL or Gateway requirement.
* Canonicalize old click redirect URLs to the clean site URL without trusting their stored payloads.
* Keep local impression and click analytics while sending click events independently of navigation and omitting phone, message, destination and referrer from new event payloads.
* Add administrator-only WatsBridge discovery links that are hidden when WatsBridge CRM is active.

= 1.2.46 =
* WordPress.org submission hardening.
* Improved plugin description and readme structure.
* Reduced promotional admin navigation.
* Added explicit textdomain loading.
* Improved local analytics attribute escaping.
* Added WhatsApp redirect host allowlisting for safe redirects.
* Improved uninstall cleanup for plugin-owned data.

= 1.2.45 =
* Production hardening and WooCommerce-aware analytics improvements.

== Upgrade Notice ==

= 1.3.0 =
Existing Button settings and rules are retained. The free Button opens WhatsApp directly without Gateway configuration.

= 1.2.46 =
WordPress.org submission hardening and documentation improvements.
