| 1 |
--- |
| 2 |
module: flow |
| 3 |
--- |
| 4 |
|
| 5 |
# flow |
| 6 |
|
| 7 |
## Responsibility |
| 8 |
|
| 9 |
Owns the two CartFlows custom post types (`cartflows_flow`, `cartflows_step`), their two taxonomies, the step URL/rewrite layer, and the two front-end page templates that render a step. |
| 10 |
|
| 11 |
Ownership stops at rendering the step shell — step *content* (checkout, optin, thank-you logic), settings storage, and the admin funnel UI live outside this module. It only exposes the abstract `Cartflows_Step_Meta_Base` contract for them. |
| 12 |
|
| 13 |
## Why it is this way |
| 14 |
|
| 15 |
The module is small, but nearly every non-obvious line is defensive scar tissue whose reason lives outside the code. Removing the permalink base means claiming a site-wide catch-all rewrite rule, and the five bail conditions guarding it each close a specific reported bug rather than expressing a general rule. |
| 16 |
|
| 17 |
Hook order is require order here: every class self-instantiates at include time with hook registration in its constructor, so there is no way to load a class without registering its hooks. |
| 18 |
|