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 / optin / architecture.md

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

18 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 ---
2 module: optin
3 ---
4
5 # optin
6
7 ## Responsibility
8
9 Owns the CartFlows Optin step: it renders a stripped-down WooCommerce checkout (name + email only, no payment) through the `[cartflows_optin]` shortcode, preconfigures the cart with a single free virtual product, generates and caches the step's dynamic CSS, and defines the optin step's admin meta and design settings schema.
10
11 Ownership stops at the WooCommerce checkout pipeline itself — it never renders form fields, validates, or creates the order. It bends Woo's hooks and then hands off to `[woocommerce_checkout]`. Loaded only when WooCommerce is active.
12
13 ## Why it is this way
14
15 An optin step is a checkout with almost everything removed, and WooCommerce offers no supported way to render a partial checkout. The module therefore forces `woocommerce_is_checkout` true, empties the gateway list, and clears six hook stacks with `remove_all_actions()` at a `wp` priority high enough to run after everyone else has registered.
16
17 That approach is why so many of the constraints here are about *timing* rather than API: the priority-1000 teardown and the priority-1 cart configuration are a pair, and the two `is_wc_endpoint_url( 'edit-address' )` bail-outs exist purely because the billing filters registered here are global and would otherwise reshape an unrelated My Account page.
18