PluginProbe
CartFlows – Funnel Builder & Checkout Plugin for WooCommerce / 3.3.0
CartFlows – Funnel Builder & Checkout Plugin for WooCommerce v3.3.0
3.3.0 3.2.1 3.2.0 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.1 trunk 1.0.4 1.1.0 1.1.0.1 1.1.1 1.1.10 1.1.11 1.1.12 1.1.13 1.1.14 1.1.15 1.1.16 1.1.17 1.1.18 1.1.19 1.1.2 All 162 releases
cartflows / modules / checkout / architecture.md

architecture.md in CartFlows – Funnel Builder & Checkout Plugin for WooCommerce 3.3.0, at modules/checkout/architecture.md

18 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 ---
2 module: checkout
3 ---
4
5 # checkout
6
7 ## Responsibility
8
9 Owns the CartFlows checkout step: the `[cartflows_checkout]` shortcode and its simple / modern / instant layout templates, the rewiring of WooCommerce's checkout hooks (field definitions, coupon field, shipping section, order-review table, order button), the checkout-specific AJAX endpoints, stamping `_wcf_checkout_id` / `_wcf_flow_id` onto the order, and the "global checkout" override that hijacks WooCommerce's own checkout page.
10
11 Ownership stops at the WooCommerce cart/session/order objects themselves — it reads and re-decorates them — at flow/step storage, and at the admin editor UI, for which it only supplies field arrays via `cartflows_admin_checkout_*` filters.
12
13 ## Why it is this way
14
15 The module's real behaviour is not in its call graph. It is in hook registration *timing*: WooCommerce bakes checkout field definitions on first call to `get_checkout_fields()`, which can happen before `wp`, so two filters here are registered directly in constructors rather than on hooks. Deferring them to `init` or `wp` silently drops all field customization.
16
17 The rest follows the same pattern — wrapper divs opened and closed across four hooks at hand-tuned priorities, a cross-tab cart restore driven by cookie plus transient, and post-meta-cached CSS with version-only invalidation. Each constraint exists because a simpler version lost a race.
18