=== NudgePilot for WooCommerce ===
Contributors: nudgepilot
Tags: woocommerce, conversion, shipping, returns, cart
Requires at least: 6.9
Tested up to: 7.1
Requires PHP: 8.0
Stable tag: 0.8.5
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Shows one short, helpful message to shoppers who seem unsure about shipping, returns or which product to pick, and measures whether it helps.

== Description ==

When a shopper seems unsure, NudgePilot shows them one short message with the facts they are missing, such as your shipping cost and delivery time. It measures whether the message helps by comparing shoppers who see it with shoppers who don't.

= What you get =

* **One short message with your own terms:** your shipping cost, free-shipping minimum, delivery time and same-day cutoff, your returns terms, or a quick comparison of products a shopper viewed. Shoppers only ever see what you enter; NudgePilot never writes or invents facts.
* **Only when it helps:** a simple rule, or Smart timing, an AI model that judges from on-page behavior (never personal details) when a shopper seems unsure.
* **A built-in test:** every visit is put at random into one of three groups (no message, the simple rule, or Smart timing), so Results shows whether messages increase your sales.
* **Made for WooCommerce:** the Cart and Checkout blocks and the classic cart and checkout; copy your shipping details from your WooCommerce shipping zones.
* **Respects cookie consent:** through the WP Consent API (Complianz, CookieYes, Cookiebot and others), with suggested wording for your privacy policy.
* **Every message on every plan:** shipping, returns and product comparison are all included on Free (10,000 visits a month, no payment details). Pro and Scale handle more visits, with a 14-day free trial.

NudgePilot runs on the NudgePilot service (see "External services" below).

Step-by-step setup guide: https://nudgepilot.live/woocommerce

Messages appear in the corner of the page or inside your cart page (the Cart block and the classic cart). The checkout never shows one. Store managers aren't counted, and can preview a message on the store (Settings › Where messages appear).

The script on your store's pages is small (about 5 KB compressed), loads after the page and keeps the same markup for every shopper, so page caches keep working.

== Installation ==

1. Install and activate the plugin. WooCommerce must be active.
2. Go to WooCommerce › NudgePilot and follow the setup guide: connect your store, add your shipping details, and turn NudgePilot on.
3. If your store asks shoppers for cookie consent, install the WP Consent API plugin and a cookie banner that supports it. Otherwise, choose "My store doesn't ask for consent" under Settings › Privacy.

Your store needs a public https address to connect. The full guide, with troubleshooting: https://nudgepilot.live/woocommerce

== Frequently Asked Questions ==

= Does NudgePilot send anything before I connect? =

No. Nothing is sent until you click Connect.

= What happens when I disconnect? =

NudgePilot stops running on your store and deletes its record of your shoppers' visits. Your results are kept for 30 days in case you connect again, then deleted with your store's data.

= What happens when I delete the plugin? =

NudgePilot deletes your store and its results from its service and ends a paid plan straight away. The plugin removes its settings, what it kept on orders and its scheduled tasks from your site.

= What if the plugin stays turned off? =

Turning the plugin off stops NudgePilot on your store at once and keeps your connection. If NudgePilot hears nothing from your store for 90 days, it deletes your store's data, unless you have a paid plan; connecting again then starts fresh.

= I moved my site to a new address, or made a copy on staging. =

NudgePilot pauses on the new address, so a copy can't mix into your live store's results. WooCommerce › NudgePilot explains what to do.

= Do shoppers have to consent? =

By default, NudgePilot runs only for shoppers who accept statistics cookies in your cookie banner. It uses the WP Consent API, so it needs the WP Consent API plugin and a cookie banner that supports it, such as Complianz, CookieYes or Cookiebot. If a shopper says no, or changes their mind, NudgePilot stops and removes what it kept in their browser. Stores that don't need consent for this (for example outside the EU and UK) can choose "My store doesn't ask for consent" under Settings › Privacy; a cookie banner's "no" is still respected. WooCommerce › NudgePilot › Settings › Privacy has suggested wording for your privacy policy, which is also in WordPress's Privacy Policy Guide.

= What do the plans cost? =

Every plan includes every message: shipping, returns and product comparison. The plans differ in how many visits NudgePilot's service handles each month: Free 10,000 (no payment details), Pro 500,000 ($9.99 a month) and Scale 2,500,000 ($39.99 a month). Pro and Scale come with a 14-day free trial the first time. Prices are in US dollars before tax; Paddle, NudgePilot's reseller, shows your price in your currency. Choose, change or cancel under WooCommerce › NudgePilot › Settings › Plan; a cancelled plan runs until the end of the period you paid for. Deleting the plugin ends the paid plan straight away.

= How are sales counted? =

A sale counts when an order is paid (payment complete, or the order is marked Processing or Completed) within 24 hours of the shopper starting checkout, in the classic checkout or the Checkout block. Failed payments don't count. Refunds and cancellations after payment don't undo a sale. The amount is the items' subtotal after discounts, without shipping and tax, in the currency the shopper paid in. Your store sends paid orders to NudgePilot in the background with WooCommerce's Action Scheduler, so checkout never waits.

== External services ==

This plugin connects to the NudgePilot service at https://nudgepilot.live, which decides when a message would help and measures the results.

* When you click Connect in WooCommerce › NudgePilot, the plugin sends your store's address, the plugin's version and a one-time code to nudgepilot.live. The service then calls your site's /wp-json/nudgepilot/v1/verify route to confirm that the plugin runs there, and returns your store's ID and a secret key, which the plugin keeps encrypted on your site.
* While your store is connected, saving settings in WooCommerce › NudgePilot sends nudgepilot.live whether NudgePilot is on, your store's currency, your returns terms and whether product comparison is on. Your shipping details stay on your site. The Home, Results and Settings screens ask nudgepilot.live for your plan, this month's number of visits and your results.
* While NudgePilot is on, your shoppers' browsers send nudgepilot.live, for each visit: a random visit number kept in the browser tab (not a cookie), counts of actions such as cart views, visits to the checkout and to shipping or returns pages, the type of page (product, cart or other), and whether a message was shown. Store managers' visits aren't sent. The products a shopper viewed stay in their browser. Nothing is kept or sent without the shopper's consent to statistics cookies (see "Consent" below), unless you choose "My store doesn't ask for consent".
* When an order that came from a NudgePilot visit is paid, your store's server sends nudgepilot.live, in the background: the visit number, the order's items subtotal after discounts (without shipping and tax) and its currency. No order number, name, email or address is sent. Your store then removes the visit number from the order (and in any case within 48 hours).
* Once a day, and when you open Results, the plugin reads your results from nudgepilot.live and keeps a copy on your site.
* When you choose Pro or Scale in WooCommerce › NudgePilot › Settings › Plan, the plugin asks nudgepilot.live for a checkout, and your browser opens it on nudgepilot.live. Payment, tax and invoices are handled by Paddle (Paddle.com Market Ltd), NudgePilot's reseller; you enter your payment and contact details only on Paddle's checkout, never in WordPress. Changing or cancelling the plan, and opening Paddle's customer portal, go through nudgepilot.live in the same way.
* When you click Disconnect, the plugin tells nudgepilot.live, which stops running for your store and deletes its record of your shoppers' visits.
* When you delete the plugin, it asks nudgepilot.live to delete your store and its results.

Nothing is sent before you click Connect.

Paddle Buyer Terms: https://www.paddle.com/legal/buyer-terms
Paddle Privacy Policy: https://www.paddle.com/legal/privacy
NudgePilot Terms of Service: https://nudgepilot.live/terms
NudgePilot Privacy Policy: https://nudgepilot.live/privacy

== Source code ==

The plugin's JavaScript is built from the TypeScript and React source that ships with it, in the `src` folder:

* `src/admin` builds `assets/admin/nudgepilot-admin.js` and `nudgepilot-admin.css`, the WooCommerce › NudgePilot screens. React and WordPress's own packages aren't bundled: WordPress provides them.
* `src/storefront` and `src/shared` build `assets/js/nudgepilot.js` and `assets/js/nudgepilot-message.js`, the script on store pages and the message it shows.
* `assets/js/nudgepilot-cart-block.js` and `assets/css/nudgepilot.css` aren't built: they are their own source.

The scripts are built with Vite (esbuild) on Node.js 24, as ES2021, and minified. Nothing is loaded from a CDN: every script and style ships in the plugin.

== Screenshots ==

1. The message in the cart: your own shipping terms, shown only to shoppers who seem unsure.
2. Home: turn NudgePilot on and see your messages, results and plan at a glance.
3. The shipping message: copy your details from WooCommerce and see what shoppers see.
4. Results: compare how often shoppers buy with and without messages.
5. Plans: Free, Pro and Scale, with a 14-day free trial.

== Changelog ==

= 0.8.5 =
* Returns messages and product comparison are included on every plan, Free too. Plans differ only in how many visits a month NudgePilot's service handles.

= 0.8.4 =
* Settings › Plan mentions the 14-day free trial only when the store can still get it.

= 0.8.3 =
* The cart message says how much more gets free shipping ("Add €30.00 more…") on slower sites too; before, it could fall back to the store's general shipping terms.
* Results says plainly when Smart timing hasn't checked a visit yet.

= 0.8.2 =
* Needs WordPress 6.9 or later, the oldest version the supported WooCommerce releases (11.0 and 11.1) run on.
* If the site is moved to a PHP version older than 8.0, NudgePilot pauses and says why, instead of stopping the site.
* Store pages do less work: NudgePilot reads one database row on each and no longer opens the connection's secret there.

= 0.8.1 =
* Listing content: description, screenshots, banner and icon; setup guide on nudgepilot.live.
* Settings › Plan no longer says visits count only with statistics cookies when the store doesn't ask for consent.

= 0.8.0 =
* Deleting the plugin also removes its scheduled tasks and anything older versions stored.
* Disconnected stores' results are kept for 30 days, then deleted; stores NudgePilot hasn't heard from in 90 days are deleted too (not with a paid plan).

= 0.7.0 =
* Pro and Scale plans with a 14-day free trial, sold through Paddle: choose, switch, cancel or keep a plan, and manage payment and invoices, from Settings › Plan.

= 0.6.0 =
* Paid orders from NudgePilot visits are counted in your results (classic checkout and the Checkout block).
* Results are kept on your site too, and shown from there when NudgePilot can't be reached.
* Personal data export and erasure include the visit number kept on an order.

= 0.5.0 =
* Shopper consent: NudgePilot follows your cookie banner through the WP Consent API (tested with Complianz and CookieYes), or runs for everyone if your store doesn't ask for consent.
* Suggested privacy policy wording in WordPress's Privacy Policy Guide.

= 0.4.0 =
* Messages on your store: in the corner or inside your cart page (Cart block and classic cart), never on the checkout.
* Store managers aren't counted, and can preview a message on their store.

= 0.3.0 =
* Copy your shipping details from your WooCommerce shipping zones.
* Choose the returns page the returns message links to.
* Choose up to three product attributes to show in product comparisons.

= 0.2.0 =
* WooCommerce › NudgePilot: Home with a setup guide, Messages (shipping, returns and product comparison, with a preview), Results, and Settings (plan, placement, privacy and connection).

= 0.1.0 =
* Connect and disconnect your store.
