=== Cartdini – Checkout Field Editor for WooCommerce ===
Tags: woocommerce, checkout, checkout fields, checkout editor, checkout manager
Requires at least: 6.7
Tested up to: 7.1
Requires PHP: 8.0
Stable tag: 1.7.9
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Configure custom checkout fields in Classic Checkout and Checkout Blocks.

== Description ==
Cartdini Free adds nine checkout field types: text, select, checkbox, textarea, email, telephone, number, radio and URL. All nine work in Classic Checkout and Checkout Blocks. Place questions with order information, contact details or both billing and shipping addresses. Configure labels, required answers, display destinations, text limits, number ranges and steps; reorder or duplicate fields without writing code.

The editor identifies your checkout implementation and offers simple workflow starters. Basic field settings appear first; wording, validation, answer storage and advanced controls have separate expandable sections. It previews field structure, explains configuration errors and provides a test-checkout checklist. A preview helps you prepare; complete a test checkout to check your theme and other extensions.

For Classic checkout, change labels, placeholders and positions for supported billing, shipping and order fields. Essential address and email fields keep WooCommerce visibility and validation. The six existing optional-field controls still allow visibility and requirement changes. Reset individual overrides to native defaults.

For Checkout Blocks, control Company, Phone and Address line 2 through WooCommerce's shared address settings. Change labels and order for ten shared address fields, or customize the default Place Order button text. Save these settings separately from custom fields. These shared native settings are not part of custom-field imports, templates or recovery history. Address labels/order also apply to Classic checkout; explicit Classic overrides take precedence. WooCommerce retains country-specific requirements, hidden fields, validation and supported inputs. Contact email, address placeholders and checkout section content remain controlled by WooCommerce and the native checkout editor. Payment methods and other extensions can supply their own button text.

Uses WooCommerce order CRUD, its native additional-fields API and registered Checkout Blocks with Store API validation. No telemetry or external service calls. Up to 100 custom fields per configuration. WooCommerce 9.9+ is required. Existing data is retained on deactivation or deletion.

Cartdini Pro is a separate add-on for conditional questions, date and time inputs, multiple-choice groups and reusable configurations. It is not included or required for the Free features described above. Some Pro workflows have additional checkout requirements; review the Pro documentation before purchase. Free includes an optional Free/Pro comparison and five local interactive examples for conditional questions, private files, paid extras, repeatable groups and reusable setups. Optional price guidance opens only when you expand Add a price to this choice. Other suggestions appear when you open their related sections, including conditional settings and reusable setups. The sidebar provides one optional Pro overview link. Field examples use your current draft labels and options; sample answers and prices are held only in page memory and never applied to checkout. More answer types opens examples for files, date/time preferences, multiple selections and repeatable groups. The workflow page explains business, gift and product questions. Suggestions can be dismissed or restored for this browser, site and administrator. Examples do not change checkout settings or upload files.

== Local editor recovery ==
Cartdini keeps an unfinished editor configuration in this browser tab, scoped to the current site and signed-in administrator. It stores field settings and, separately, native Blocks settings; it does not store preview answers, shopper information, file contents or license credentials. Recovery is available for 24 hours. Closing the tab or clearing browser storage can remove the copy. Expired or unreadable copies can be cleared in the editor. Browser storage may be unavailable; the editor explains when recovery cannot be saved.

Resume only loads a draft. It checks the saved configuration revision again and never publishes automatically. Changed saved settings cannot be overwritten by a stale recovery copy. Custom fields and native Blocks settings retain their separate save actions. A remembered Pro task is optional, local and does not install anything. Hidden workflow suggestions are remembered in this browser per site and administrator; Explore Pro workflows opens them again. No draft or preference data is transmitted to Cartdini.


A pending configuration change can retain one bounded recovery record until its history is finalized. Unchanged saves and failed attempts do not consume older history entries. If settings were saved but history is still pending, the editor says so: reload before retrying. Unrecognized recovery records are preserved and stop further configuration changes; contact support rather than deleting them. These records contain field configuration, not shopper answers. Deactivation and deletion retain this configuration recovery data.

== Installation ==

Current matched release: Free 1.7.9 and Pro 1.7.9.

1. Install and activate WooCommerce 9.9 or newer.
2. Upload this ZIP through Plugins > Add New > Upload Plugin.
3. Activate Cartdini.
4. Open WooCommerce > Cartdini, configure and save fields.
5. Test complete checkout flows before production.

To upgrade an existing installation, back up the site, then upload this ZIP and choose Replace current with uploaded. Saved fields, settings and order answers are retained. If you use Pro, update Free first, then update Cartdini Pro to 1.7.9. Older incompatible add-ons pause safely until updated; their saved definitions remain retained during the update. Test your saved configurations and complete checkout flows on staging before updating the live store.

Configurations that use the expanded 1.3.0 format are saved separately. Cartdini preserves the previous compatible configuration and a recovery copy. An older plugin pair uses that older configuration; it cannot use the new controls. If an older version changes settings, the editor asks you to review both copies before choosing one. Back up the whole site before a downgrade, including orders and customer data.

== Frequently Asked Questions ==
= Does activation change my checkout? =
A new installation enables no sample fields. After you save your configuration, it applies while Cartdini is active. Reactivating the plugin resumes the saved configuration.
= Does it support Checkout Blocks? =
Yes. All nine Free custom field types support Checkout Blocks. Company, Phone and Address line 2 use shared WooCommerce visibility and requirement controls. Ten shared address labels/order and the default Place Order button text can also be edited. Address placeholders and contact email remain native controls; Classic has additional text overrides.
= Does uninstall delete order data? =
No. Deactivating or deleting Cartdini retains settings and saved answers. While Cartdini and WooCommerce are active, WordPress personal-data exports include Cartdini answers stored in customer accounts and matching orders. Confirmed erasure requests remove account answers; order erasure follows the store's WooCommerce retention settings. Removing a field from the editor does not erase historical answers.

== Privacy ==
Checkout answers are stored in the store's WordPress/WooCommerce database, with orders and, for supported contact/address fields, customer accounts. Display settings control where answers appear on orders and supported emails; they do not delete the answers. Cartdini Free does not send data to Cartdini or another external service. Store owners should request only necessary information and explain its purpose, recipients and retention in their privacy policy. Suggested text is available in WordPress Settings > Privacy.

== Source code ==
All executable PHP, JavaScript and CSS source is included in this plugin. The shipped assets are the maintained readable source; no compilation step or external library download is required. JavaScript translations use WordPress wp-i18n.

== Pro setup ==
The local setup view distinguishes absent, inactive and incompatible Pro installations. With the required permissions, it opens WordPress's native ZIP upload screen or the current site's Plugins screen. Use WordPress's Activate Plugin or Activate control to activate Pro, then use the separate Return to Cartdini link. The return link does not activate Pro. WordPress handles package installation, compatibility checks and activation errors. Browser draft recovery must succeed before leaving with unfinished work. After returning, review and resume any recovered draft, then continue your task and save explicitly. Activation does not publish the draft. Network installation screens require a manual return to the originating site; inaccessible network screens use a manual administrator handoff. This setup view performs no purchase, remote download, network activation or license connection.

== Workspace appearance ==
On first use, the editor keeps WordPress navigation visible. Choose Full screen when you want a wider workspace. Full screen and Exit full screen remember your choice in this browser for the current site and signed-in administrator, and reuse it on later visits. Exit full screen restores WordPress navigation; Back to WordPress leaves the editor. Clearing browser storage removes the saved preference. If storage is unavailable, WordPress navigation stays visible initially and the layout toggle still works for the current page. Layout controls do not save checkout settings. Locally bundled fonts make no external request. Without JavaScript, the existing editor requirement notice and WordPress navigation remain available.

== Changelog ==

= 1.7.9 =
* Correct the remaining upgrade instructions to name the current matched Free and Pro pair. Plugin behavior and compatibility requirements are unchanged.


= 1.7.8 =
* Align Free and Pro release numbers and update guidance. Existing features, settings and compatibility requirements are unchanged.


= 1.7.6 =
* Preserve recovery history across unchanged saves, failed writes and interrupted history finalization.
* Load Checkout Blocks translations through the canonical script URL and use the administrator language for editor requests.
* Use catalogue-safe script filenames while retaining existing WordPress handles.


= 1.7.5 =
* Keep WordPress navigation visible by default; retain fullscreen as an explicit, remembered choice.
* Put reusable-setup Pro information behind an optional disclosure and remove its duplicate overview prompt.
* Improve contrast for the optional Pro example numbers.

= 1.7.4 =
* Clarify native WordPress Pro activation and the separate return link.
* Document the remembered workspace preference and browser-storage fallback.


= 1.7.3 =
* Keep WordPress native Pro activation controls and provide a separate Return to Cartdini link.
* Preserve unfinished editor work before opening the Plugins screen.
* Remember the full-screen workspace choice in this browser for each administrator and site.


= 1.7.2 =
* Clarify extra questions, existing checkout fields and the two independent save areas.
* Guide manual checkout review and optionally inspect saved answer presence on a selected order.
* Keep reviews local to the current tab and invalidate them after settings changes.


= 1.7.0 =
Compact the shared workspace and improve editing readability. Make price exploration deliberate, use selected draft fields in local examples, and provide state-aware Pro setup through the native WordPress installer and explicit activation. Preserve drafts, checkout behavior and signed updates.


= 1.6.1 =
Show relevant Pro benefits beside compatible editor tasks, with dismissible suggestions, matching local examples and explicit task continuation. Preserve unsaved fields, expanded controls and keyboard focus when returning. Keep checkout behavior, settings validation and the signed updater unchanged.


= 1.6.0 =
Redesign the shared Free/Pro editor with sidebar navigation, a full-width layout, local typography and responsive editing panels. Give Pro discovery its own page with five visual interactive examples and expandable setup actions. Preserve drafts, checkout behavior, saved settings and the private updater.


= 1.5.2 =
Add an optional Free/Pro comparison and five interactive workflow illustrations in the shared editor. Explain paid extras and repeatable groups alongside conditions, uploads and reusable setups. Examples remain local and do not change checkout settings. Matched Pro update preserves existing checkout behavior and the private updater.


= 1.5.1 =
Escape licence failure messages and validate upload rate-limit IP input in Pro. Matched Free release; existing checkout behavior and saved settings are preserved.

= 1.5.0 =
Keep unfinished custom-field and native Blocks editor drafts in the current browser tab with explicit resume, revision checks and expiry. Add task-specific Pro explanations with remembered dismissal and voluntary continuation after manual installation. Clarify independent save actions and real checkout testing; retain all existing Free field capabilities.


= 1.4.1 =
Coordinate the matched Pro upload-recovery release and remove the duplicate optional Author URI metadata. Existing Free field editing, validation and configuration formats remain unchanged.


= 1.4.0 =
Simplify the editor with workflow starters, basics-first field settings, expandable advanced controls and clearer compatibility guidance. Add shared checkout address labels and ordering plus default Blocks Place Order button text, preserving country validation and native checkout content. Support the matched Pro Blocks upload and repeatable-group extensions. Preserve existing settings, saved answers and the 1.3.0 configuration recovery format.

= 1.3.0 =
Expand Free to nine input types across Classic and Checkout Blocks, adding number, radio and URL to Free and extending textarea, email and telephone to Blocks. Add text and number limits with server-side validation. Expand safe Classic core-field text and ordering controls while preserving essential requirements and country validation. Add synchronized WooCommerce address controls for Blocks. Preserve older configurations separately when new formats are used and provide an explicit conflict-recovery review. Support the matched Pro condition and advanced-input extensions.


= 1.2.1 =
Include saved customer answers in personal-data export and erasure, including answers for removed fields. Include account-owned orders when billing and account emails differ. Persist and verify order-answer erasure before anonymization so failed deletion remains retryable. Add a separate paginated cleanup of Cartdini order data without changing WooCommerce order identity. Preserve WooCommerce order-retention choices and unrelated metadata. Add suggested privacy-policy text, narrow checkout request handling, improve interface translations and clarify the separate Pro add-on.

= 1.2.0 =
Preserve and safely pause the matched Pro add-on's method rules, repeatable groups, upload settings and fee definitions during upgrades or deactivation. Add generic extension validation, display and editor hooks while retaining the existing independent Free field features. Update both editions together, Free first.

= 1.1.0 =
Retain category, shopper-role and opt-in product-family rule definitions for the matched Pro add-on. Preserve paused definitions and use a versioned extension contract so an older add-on cannot interpret the new rules. Free field types remain unchanged. Update both editions together, Free first.


= 1.0.1 =
Keep the Free editor and checkout features independent. Move Pro workflows into the separate matched Pro add-on, preserve saved settings and order answers through upgrades, and pause incompatible add-on versions safely. Improve readable source and translation support. Update both editions together, Free first.


= 1.0.0 =
25 September 2026. First stable release, paired with Cartdini Pro 1.0.0. Retain the Free field editor, Classic and Checkout Blocks support, display controls and saved data from RC11. Use cartdini.com for current documentation and downloads. No additional field types or workflows are introduced by this version change.

= 0.1.0-rc.11 =
Clear hidden checkout answers from the authenticated returning shopper's persistent profile as well as the session and new order; retain historical orders.
24 September 2026. Add shared editor support for guided Pro workflows, product/final-total rules and reviewed transfers. Add contextual Preview Pro controls. Free checkout field capabilities remain unchanged. Pair with Pro RC8; see the release guide for compatibility boundaries and completed verification.

= 0.1.0-rc.10 =
* Move Classic textarea, email and telephone fields into Free.
* Add separate answer-display controls for admin orders, customer orders, admin emails and customer emails without deleting stored answers.
* Preserve paused Pro definitions when saving unrelated Free edits after Pro deactivation.
* Apply text length limits only to text-based fields; fix valid date and number rejection.
* Add Classic radio condition sources with Pro RC7.
* Restrict Blocks condition sources to select/checkbox for consistent native validation. Conditional contact fields require WooCommerce 10.1+. Unsupported definitions remain saved and are explained in the editor.


= 0.1.0-rc.9 =
* Add Pro match-all / match-any groups of up to five field-to-field rules in Classic and Checkout Blocks. Existing single rules remain supported.
* Add an interactive condition tester, dependency feedback and import comparison before loading a draft.
* Clarify checkout detection, supported controls, required answers and order/email storage.
* Apply group visibility consistently during validation and order/customer snapshot handling; hidden answers cannot block checkout or enter the new order snapshot.
* Use Cartdini Pro 0.1.0-rc.6 for the optional in-dashboard updater. Six extra Pro types remain Classic-only.


= 0.1.0-rc.8 =
* Preserve WooCommerce requirement and placeholder defaults when editing only a Classic core-field label. Explicit existing overrides remain unchanged.
* Restore keyboard focus to the edited core field and improve narrow-screen editor controls.
* Compatible with Cartdini Pro 0.1.0-rc.5.

= 0.1.0-rc.7 =
* Keep the most recently selected import when files finish loading out of order.
* Align multilingual and emoji answer length checks with native browser limits without requiring mbstring.


= 0.1.0-rc.6 =
15 September 2026. Preserve valid rules when reordering or editing sources, update references when renaming new fields, bound duplicate capacity and labels, preserve keyboard focus, and recover from timed-out editor requests. Compatible with Pro RC5.
= 0.1.0-rc.5 =
14 September 2026. Align editor UTF-8 byte validation with PHP and add template replacement/deletion controls with revision checks. Use alongside Pro RC5.

= 0.1.0-rc.4 =
13 September 2026. Prevent Classic field-name collisions, preserve UTF-8 text, allow decimal number inputs, normalize text conditions and detect failed saves. Use atomic, owner-checked settings locks.

= 0.1.0-rc.3 =
13 September 2026. Fix conditional Checkout Blocks schemas on WooCommerce 9.9 and later, including missing checkbox and text values. Remove legacy Classic address copies during saving, export and erase historical copies, and clear stale answers and display snapshots when retrying checkout. Update Free even when using Pro.
= 0.1.0-rc.2 =
13 September 2026. Validate imported and restored drafts before rendering, escape preview identifiers, preserve the current draft when validation fails, and prevent edits during a pending save. Update Free even when Pro is installed because both editions use this editor. Pro license connection remains optional and explicitly authorized.
= 0.1.0-rc.1 =
Launch review candidate with corruption recovery, stricter input validation and security regression coverage. Not submitted to WordPress.org. Brand and domain remain provisional.
