=== NorthDuty Connect – Checkout, Form & Uptime Monitoring ===
Contributors: northduty
Tags: monitoring, uptime, woocommerce, checkout, visual regression
Requires at least: 5.8
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Re-runs your NorthDuty checks the moment a plugin, theme, or core update lands — a broken checkout or form is caught in minutes, not by a customer.

== Description ==

Most WordPress breakage follows an update. A plugin auto-updates overnight, the checkout hook changes, the layout shifts — and the site keeps returning HTTP 200 the whole time, so uptime monitoring sees nothing.

NorthDuty Connect closes that gap. It notifies [NorthDuty](https://northduty.com/) the moment something on your site changes, and NorthDuty immediately re-runs the checks that matter instead of waiting for the next scheduled slot:

* **Real-browser journeys** — your checkout, login, signup, and contact-form flows, run step by step, with the failing step named and screenshotted.
* **Visual change detection** — pixel diffs of your key pages against the previous baseline, so you see exactly what an update changed.
* **Website health checks** — uptime, SSL, DNS, blank pages, JavaScript errors, and the API endpoints your pages depend on.

The plugin itself stays deliberately tiny: it listens for update and content events and sends a small signed notification. All monitoring runs on NorthDuty's infrastructure — nothing here slows your site, adds cron jobs, or stores visitor data.

**What triggers a notification**

* Plugin, theme, and core updates — including automatic background updates
* Plugin activation and deactivation, and theme switches
* Published content changes: posts, pages, and WooCommerce products (drafts, autosaves, and revisions are ignored)

**See it in action**

We keep a real WooCommerce store that we break on purpose, so you can watch a monitored checkout fail and get caught: [northduty.com/demo](https://northduty.com/demo/).

== External services ==

This plugin sends event notifications to NorthDuty (northduty.com), a website monitoring service, **only after you configure a deploy hook URL on the settings screen**. Until then it sends nothing.

Each notification contains: the event type (for example `plugin.updated` or `page.published`), your site URL, the changed item's permalink and ID where relevant, and the plugin version. Notifications are HMAC-signed with the secret you configure. No visitor data, user accounts, or content bodies are ever sent.

A NorthDuty account (free tier available) is required to receive the notifications. See NorthDuty's [Terms of Service](https://northduty.com/terms/) and [Privacy Policy](https://northduty.com/privacy/).

== Installation ==

1. Create a NorthDuty account at [northduty.com](https://northduty.com/) (free, no card) and add your site as a project.
2. In NorthDuty, open Project → Settings → Deploy detection and copy the deploy hook URL and signing secret.
3. Install and activate NorthDuty Connect, then paste both values under Settings → NorthDuty.
4. Click "Send test event" — you should see the delivery confirmed on both sides.

== Frequently Asked Questions ==

= Does this plugin slow my site down? =

No. Notifications are sent asynchronously with a short timeout and no retries, and nothing runs on page views by visitors. The monitoring itself happens entirely on NorthDuty's servers, from the outside.

= Does it work with WooCommerce? =

Yes — that's the main use case. Product changes trigger re-checks, and NorthDuty runs your actual cart and checkout flow in a real browser on a schedule. The plugin works on any WordPress site, WooCommerce or not.

= Do I need a paid NorthDuty plan? =

No. The free tier includes monitoring with a daily journey; paid plans add more journeys, faster schedules, and more sites.

= What happens if NorthDuty is unreachable? =

Nothing visible: the notification is dropped and your site carries on. NorthDuty's scheduled checks still run regardless — update-triggered re-checks are an acceleration, not a dependency.

== Changelog ==

= 1.0.1 =
* Renamed all functions, options, and constants to the longer `ndconnect_` / `NDCONNECT_` prefix to avoid conflicts with other plugins.

= 1.0.0 =
* Initial release: update, activation, theme-switch, and content-change notifications with HMAC-signed delivery and a settings-screen test button.
