| 1 |
# WCPOS Free Plugin |
| 2 |
|
| 3 |
Domain language for the `woocommerce-pos` WordPress plugin — the server-side foundation for WCPOS. Terms here are binding for code, docs, and reviews; architecture reviews and grilling sessions update this file as concepts crystallize. |
| 4 |
|
| 5 |
## Language |
| 6 |
|
| 7 |
### Settings |
| 8 |
|
| 9 |
**Settings**: |
| 10 |
User-configurable intent stored in `woocommerce_pos_settings_*` options and read through the Settings module. Distinct from Plugin State. |
| 11 |
_Avoid_: options, config, preferences |
| 12 |
|
| 13 |
**Settings Section**: |
| 14 |
The unit that owns one settings group end to end: schema, defaults, sanitization, secret redaction, merge strategy, and (when not option-backed) custom read/write behaviour. Nine exist: general, checkout, tax_ids, payment_gateways, tools, visibility, cloud_print, access (role-backed), license (Pro-injected). Classes are named `{Id}_Section`. |
| 15 |
_Avoid_: settings group, settings schema, settings tab |
| 16 |
|
| 17 |
**Section Registry**: |
| 18 |
The seam where Settings Sections are registered. The free plugin registers its nine; Pro and extensions register theirs through it instead of hooking ad-hoc filters. |
| 19 |
_Avoid_: section manager, settings factory |
| 20 |
|
| 21 |
**Plugin State**: |
| 22 |
Machine bookkeeping stored in options but not user intent: site UUID, JWT secret keys, install timestamp, DB version. Owned by the module that uses it (e.g. Auth owns its secret keys), never by the Settings module. |
| 23 |
_Avoid_: settings (for these), internal options |
| 24 |
|
| 25 |
### Sync |
| 26 |
|
| 27 |
**Collection Rule**: |
| 28 |
One POS query behaviour for one collection — the params it claims, the clauses it contributes, the storage it targets — declared once in the Collection Rules module and applied identically on every read lane, so it cannot be wired into only one. |
| 29 |
_Avoid_: query filter, orderby mapping, proxy mirror |
| 30 |
|
| 31 |
**Read Lane**: |
| 32 |
One of the two paths a collection read reaches the client by — the direct lane (`wcpos/v1` controllers) and the proxy lane (`wcpos/v2` → `wc/v3`). Behaviour that exists on one lane only is a parity bug, not a design. |
| 33 |
_Avoid_: v1/v2 API, endpoint version |
| 34 |
|