=== NorthDuty Connect – Checkout, Form & Uptime Monitoring ===
Contributors: northduty
Tags: monitoring, uptime, woocommerce, checkout, user journeys
Requires at least: 5.8
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.2
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, a button stops working — 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.
* **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 is required to receive the notifications. It works on every NorthDuty plan, including the free one. See NorthDuty's [Terms of Service](https://northduty.com/terms/) and [Privacy Policy](https://northduty.com/privacy/).

== Installation ==

1. Create a free NorthDuty account at [northduty.com](https://northduty.com/) (no card) and add your site as a project.
2. In NorthDuty, open Settings → Run on site changes. On a WordPress site, the "Connect your WordPress site" card has the webhook address and a button to generate the signing secret. (Both are also under "Advanced: webhook & extra pages".)
3. Install and activate NorthDuty Connect, then paste both values under Settings → NorthDuty and save.
4. Click "Send test event". It shows up in NorthDuty under Recent changes.

== 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 NorthDuty account? =

Yes. The plugin only sends notifications; the checks themselves run in NorthDuty. Without an account and a configured webhook address, the plugin sends nothing.

= Do I need a paid NorthDuty plan? =

No. On the free plan, every update the plugin reports gets a health check, and your journey re-runs on up to 3 updates a day (after that, it waits for its daily schedule). Paid plans, from $29/month, re-run every journey on every update and add more journeys, faster schedules and detection that works without a plugin.

= Does it work if my site is behind Cloudflare or a firewall? =

The plugin sends outgoing requests only, so firewalls that filter incoming traffic don't affect it. For NorthDuty's checks to reach your site, a strict bot-protection rule may need to allow NorthDuty's monitoring traffic. NorthDuty reports a blocked check as blocked rather than as a broken site.

= Can I use it on a staging site? =

Yes. Add the staging site to NorthDuty as its own project; it gets its own webhook address and secret, so staging and production are monitored separately.

= 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.

== Screenshots ==

1. A contact-form journey failing at step 6: every step has its own screenshot, so you see exactly where it broke.
2. Journeys suggested from your site, such as sign-in and product search, ready to switch on.
3. Health checks for the same site: HTTP status, DNS, SSL certificate, domain registration and blank-page detection.

== Changelog ==

= 1.0.2 =
* Works on NorthDuty's free plan: every update gets a health check, and your journey re-runs on up to 3 updates a day.
* Settings screen points to the current place in NorthDuty (Settings → Run on site changes) and links to sign-up.
* Readme: screenshots and more FAQs.

= 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.
