=== NINJA Checkout Fields ===
Contributors: sstucl
Tags: woocommerce, checkout, checkout fields, field manager, woocommerce checkout
Requires at least: 6.8
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Manage WooCommerce checkout fields without touching code — enable/disable, relabel, reorder, and set placeholders from one screen.

== Description ==

Every WooCommerce store has a checkout page, but the default field set rarely fits every business. NINJA Checkout Fields gives shop managers a clean admin screen (under WooCommerce → Checkout Fields) where they can:

* **Enable or disable** any standard checkout field (Billing, Shipping, Additional/Order).
* **Mark fields as required or optional** — override WooCommerce's defaults to fit your workflow.
* **Rename the label** shown to the customer, without editing template files or child themes.
* **Set a placeholder** (hint text inside the input) per field.
* **Reorder fields** with simple priority numbers or ▲/▼ buttons — lower priority = earlier on the form.
* **Live preview** that shows the derived checkout layout — exactly what your customers will see — updating as you edit.

Everything is saved in a single WordPress option. No database tables, no rewrite rules, and no external requests for managing your checkout (the only opt-in exception is the "NINJA Updates" email subscription described below). Activate, configure, done.

**Protected fields:** `billing_country` and `billing_email` can never be disabled because WooCommerce requires them to complete order processing. The plugin enforces this server-side regardless of what the admin UI sends.

**Reset:** One click restores the full WooCommerce default field set.

== WooCommerce integration ==

NINJA Checkout Fields declares HPOS (High-Performance Order Storage / Custom Order Tables) compatibility and uses the standard `woocommerce_checkout_fields` filter so it's compatible with any WooCommerce version that exposes that filter (8.0+). It does not modify database tables, templates, or core files.

== Stay updated (optional) ==

The admin screen has an optional "NINJA Updates" card: tick the consent box and enter your email to hear about plugin updates and new NINJA modules. It is entirely opt-in — nothing is sent unless you submit that form — and you can unsubscribe at any time with one click. This is the only feature that ever contacts an external service.

== Installation ==

1. Go to **Plugins → Add New**, search for "NINJA Checkout Fields", and click **Install Now** — or upload the ZIP under **Add New → Upload Plugin**.
2. Click **Activate**.
3. Open **WooCommerce → Checkout Fields** in the admin menu.
4. Enable, disable, relabel, reorder, and set placeholders as needed.
5. Click **Save Changes**. Your checkout updates immediately.

WooCommerce must be installed and active. If it is not, the plugin shows an admin notice and does nothing else.

== Frequently Asked Questions ==

= Can I disable the billing email or country? =
No — and that's deliberate. WooCommerce cannot process an order without those two fields. The plugin protects them server-side; the UI makes it clear they're required.

= Will this break my existing orders or customer data? =
No. The plugin only affects the checkout form presented to new customers. Existing orders are untouched. Overrides are stored as a single WordPress option, so you can reset at any time.

= Does it work with HPOS (High-Performance Order Storage)? =
Yes. HPOS compatibility is declared and the plugin does not read order data at all.

= Does it make any external requests? =
Not unless you ask it to. All checkout-field management runs entirely inside your WordPress install. The single exception is the optional "NINJA Updates" card: only if you tick its consent box and submit your email does the plugin contact ninja.si to register your subscription. Leave it alone and nothing is ever sent.

= What happens if I deactivate the plugin? =
The `woocommerce_checkout_fields` filter is no longer applied, so the default WooCommerce fields come back immediately. Your saved configuration is preserved and restored when you reactivate.

== Screenshots ==

1. Field manager — at-a-glance KPI cards plus per-field controls (Enabled, Required, Label, Placeholder, Priority) for the Billing, Shipping, and Additional sections.
2. Live preview — the derived checkout field list in priority order, exactly what customers will see, with one-click Save and Reset to WooCommerce Defaults.

== Changelog ==

= 1.0.0 =
* Initial release: enable/disable, required, label, placeholder, and priority controls for all standard WooCommerce checkout fields; HPOS compatibility; Reset to defaults action.

== Upgrade Notice ==

= 1.0.0 =
First release.
