=== Shipping Contract Guard for WooCommerce ===
Tags: woocommerce, shipping, testing, monitoring, qa
Requires at least: 6.5
Tested up to: 7.0
Requires PHP: 8.1
Stable tag: 1.9.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Catch broken WooCommerce shipping rules before customers do, without creating test orders.

== Description ==

Shipping Contract Guard checks whether the shipping options and prices your store promises still work.

Start with one product, one destination, and one expected shipping result. When the plugin finds a supported rule, it recommends three invented cart totals: just below the boundary, exactly at it, and just above it. You see what WooCommerce returns before you approve the check. Every later run compares the current result with your approved promise, so a changed result cannot silently become normal.

The dashboard gives you one clear status: **Everything works**, **Problem found**, or **Could not verify**. When something differs, it explains the shopper impact and the next thing to check. The plugin does this without creating a checkout, customer, or order.

Local mode is free and requires no account:

* protect supported WooCommerce core Flat Rate, Free Shipping, and Local Pickup boundaries;
* save an exact shipping option and price returned by an enabled method after reviewing how the check will run;
* run invented carts without creating a checkout, customer, or order;
* distinguish **Everything works**, **Problem found**, and **Could not verify**;
* review what is covered, recent store changes, and which approved checks may be affected;
* keep up to 90 days of local check history and export JSON, CSV, or a readable assurance report;
* preview turning one supported WooCommerce shipping option on or off, run every approved check, and roll back automatically if needed;
* save one passing setup and restore it later; or
* activate a time-limited recovery plan and confirm when the original setup works again.

Operator is an optional EUR 29/month service for one store. It adds scheduled checks, checks after changes, missed-run supervision, email alerts, a named incident owner, and verified recovery. It sends only the limited evidence described below. Returning from checkout does not start paid service. Operator starts only after Stripe confirms the subscription and the plugin receives current service authorization.

= Deliberate limits =

Coverage has limits. Unsupported methods, unsafe scenarios, incomplete calculations, and unclear evidence remain **Could not verify**. Shipping Contract Guard does not claim that every checkout path is covered or that an earlier settings change caused a failure.

Core suggestions read only supported WooCommerce settings. For other enabled methods, a saved check uses only the shipping options and prices WooCommerce returns. The plugin never reads carrier credentials or private provider settings. Running an approved check may cause the shipping method to request its normal quote for the invented cart and destination.

The plugin does not create orders, submit checkout, process payments, buy labels, contact shoppers, or grant remote control over shipping. After you preview and approve the action, it can turn one supported WooCommerce Flat Rate, Free Shipping, or Local Pickup option on or off. It cannot change prices, thresholds, destinations, zone order, products, coupons, provider settings, orders, payments, or labels.

== Installation ==

1. Install and activate WooCommerce.
2. Install and activate Shipping Contract Guard.
3. Open **WooCommerce > Shipping Contract Guard**.
4. Choose **Preview recommended checks** when a supported rule is detected. Otherwise open **Set up your first protected rule**.
5. Review the invented carts, expected shipping options, and prices.
6. Choose **Save and run first check**.

Planning, coverage, recovery, and agency tools stay inside the Advanced sections. You do not need them for the first check.

Deployment tooling may run `wp shipping-contract-guard verify`. Exit 0 means safe, 2 means blocked, 3 means the evidence could not decide, and setup or execution errors use exit 1.

== Screenshots ==

1. See a named shipping problem, its shopper impact, and the next thing to check.
2. Review the recommended totals and expected shipping result before saving anything.
3. Give an Operator incident a clear owner while technical references stay out of the way.
4. Confirm that the same protected shipping promise passes again after recovery.
== External services ==

= Configured shipping-rate services =

When a manager explicitly approves a public-result preview or later check, WooCommerce calls the enabled shipping methods for that synthetic cart. A configured method may send the invented destination, measurements, or product attributes needed for its ordinary rate quote to its own provider. Shipping Contract Guard does not inspect that provider's settings or credentials. Review the provider's privacy terms before approving the calculation.

= Optional Shipping Contract Guard Operator =

The plugin does not contact the Shipping Contract Guard service until a WooCommerce manager accepts the disclosure shown in the plugin. Starting Operator creates a private signing key and a checkout reference tied to the site, then opens Stripe-hosted checkout. The private signing key never goes to Stripe. Returning from checkout does not start the service; a verified Stripe subscription or invoice event is required.

After pairing, the plugin contacts `https://api.shippingcontractguard.com` to connect or disconnect the site, refresh its signed authorization, configure the selected schedule and alert email, send the limited check results listed below, retrieve the current monitoring state, and update an incident handoff submitted by a manager.

Transfers can contain internal identifiers for the site, saved promise, run, and check; a public signing key; timestamps and one-time request values; cryptographic fingerprints of the shipping configuration; result and completeness states; supported boundary and shipping-method types; hashed method identities; limited cart amounts and currency; error codes; and a limited description of relevant configuration changes. A submitted incident can also contain an acknowledgement, an operational owner label, and a short note. Do not put customer data, credentials, or secrets in those fields.

The connector excludes products, full destinations, customers, orders, payment details, merchant payment-processor data, and carrier credentials. The service retains evidence according to the subscribed plan, initially 90 days. Disconnecting stops new paid work and data transfer. An organization owner can export data or request deletion. A deletion request can be canceled for 24 hours; afterward, the service removes the organization's records but keeps a minimal record that prevents an old request from being reused.

Privacy policy: https://shippingcontractguard.com/privacy.html

Terms: https://shippingcontractguard.com/terms.html

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

== Privacy ==

Local data includes approved shipping promises, invented-cart results, cryptographic fingerprints and limited facts about settings changes, run times, local incident decisions, and optional service state. Completed local runs are retained for up to 90 days and 500 records. Deactivation preserves data. Uninstall preserves data unless an administrator explicitly enables delete-on-uninstall.

The plugin adds suggested text to **Settings > Privacy**. Use invented test products and destinations; never enter customer data, credentials, or secrets. A privacy-safe diagnostic download contains only versions, schema and scheduler state, connection presence, and aggregate latest-run counts. Optional WooCommerce logging is off by default and records only an admin action name plus success or error outcome.

== Frequently Asked Questions ==

= Does local verification require an account? =

No. Creating and approving checks, running them manually, viewing local history, using diagnostics, and exporting results all work without an account or Shipping Contract Guard service request.

= Does this read private carrier settings? =

No. Core suggestions use WooCommerce core settings. A public-result promise records only the shipping method identities and prices returned by WooCommerce after you approve the check.

= Does this test checkout or payment? =

No. It asks WooCommerce for shipping results for an invented cart. It does not open or submit checkout, and it creates no order. Stripe is contacted only when a manager chooses the optional Operator subscription.

= What does Could not verify mean? =

The method, scenario, or observation was unsupported, unsafe, ambiguous, or incomplete. It is never counted as working. See https://shippingcontractguard.com/support.html for the next check for each reason family.

= Is High-Performance Order Storage supported? =

Yes. The plugin declares HPOS compatibility and does not use WooCommerce order storage for its synthetic checks.

= Are Cart and Checkout blocks supported? =

Yes. Current Cart and Checkout blocks are covered by our browser tests. For WooCommerce 8.2, we test classic checkout only because merely opening its block checkout creates a draft order; our tests must never create orders.

== Changelog ==

= 1.9.0 =

* Makes the first protected promise a clear recommendation with one product, one location, and three boundary totals.
* Keeps custom setup available under a plain “Customize” control.
* Leads each result with the protected promise, its scope, the consequence, and one next check.
* Adds test coverage for approved shipping results returned by WooCommerce.

= 1.8.1 =

* Routed the downloadable assurance report's self-contained CSS through the WordPress style registration, enqueue, and inline-style APIs.
* Prepared every plugin-owned SQL table identifier with WordPress's `%i` placeholder, including retention, explicit cleanup, and opt-in uninstall queries.

= 1.8.0 =

* Simplified the primary manager navigation and moved planning, coverage, and guarded-change workflows behind Advanced sections.
* Added privacy-safe Site Health information, a diagnostic download, opt-in bounded WooCommerce logging, and direct documentation/support links.
* Added a reviewed on/off change for one supported WooCommerce shipping option, a saved passing setup, and a time-limited recovery plan.
* Kept these recovery tools local and free. Operator remains optional and cannot change prices, thresholds, destinations, zone order, provider settings, orders, payments, or labels.

= 1.7.2 =

* Added persistent manager navigation, task-first setup, clearer Operator activation evidence, and accessible responsive controls.

See `CHANGELOG.md` in the source repository for the complete private development history.
