PluginProbe
CartFlows – Funnel Builder & Checkout Plugin for WooCommerce / 3.0.1
CartFlows – Funnel Builder & Checkout Plugin for WooCommerce v3.0.1
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 / docs / wiki / Database-Schema.md

Database-Schema.md in CartFlows – Funnel Builder & Checkout Plugin for WooCommerce 3.0.1, at docs/wiki/Database-Schema.md

223 lines 7.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 # Database Schema
2
3 CartFlows uses WordPress's standard database tables — no custom tables are created. Data is stored in `wp_posts`, `wp_postmeta`, `wp_options`, and `wp_term_relationships`.
4
5 ## Custom Post Types
6
7 ### `cartflows_flow` — Funnel/Flow
8
9 A flow is a container that groups related steps into a sales funnel.
10
11 | Column | Value | Description |
12 |--------|-------|-------------|
13 | `post_type` | `cartflows_flow` | Identifies this as a flow |
14 | `post_title` | string | Flow display name |
15 | `post_status` | `publish`/`draft`/`trash` | Flow status |
16 | `post_name` | string | URL slug |
17
18 **Characteristics:**
19 - Not publicly queryable via the frontend URL
20 - Shown in the WordPress admin UI
21 - No archive page
22 - Steps are stored as separate `cartflows_step` posts linked via taxonomy
23
24 ### `cartflows_step` — Funnel Step
25
26 A step is an individual page within a funnel (checkout, optin, landing, thank you, offer).
27
28 | Column | Value | Description |
29 |--------|-------|-------------|
30 | `post_type` | `cartflows_step` | Identifies this as a step |
31 | `post_title` | string | Step display name |
32 | `post_status` | `publish`/`draft` | Step status |
33 | `post_content` | string | Page builder content |
34 | `post_name` | string | URL slug |
35
36 **Characteristics:**
37 - Publicly queryable (has a frontend URL)
38 - Exposed in the REST API
39 - Page content is managed by the active page builder (Elementor, Gutenberg, etc.)
40 - Supports revisions
41
42 ---
43
44 ## Taxonomies
45
46 Two taxonomies are attached to `cartflows_step`:
47
48 ### `cartflows_step_type` — Step Type
49
50 Classifies what type of step this is.
51
52 | Term | Description |
53 |------|-------------|
54 | `landing` | Landing / sales page |
55 | `checkout` | WooCommerce checkout page |
56 | `optin` | Lead capture form |
57 | `thankyou` | Post-purchase thank you page |
58 | `upsell` | Post-purchase upsell offer |
59 | `downsell` | Post-purchase downsell offer |
60
61 ### `cartflows_step_flow` — Step's Parent Flow
62
63 Links a step to its parent flow. The term slug is the parent flow's post ID.
64
65 ### `cartflows_step_page_builder` — Page Builder
66
67 Tracks which page builder manages this step's content.
68
69 | Term | Page Builder |
70 |------|-------------|
71 | `gutenberg` | WordPress block editor |
72 | `elementor` | Elementor |
73 | `beaver-builder` | Beaver Builder |
74 | `divi` | Divi |
75 | `bricks` | Bricks |
76 | `other` | Default / no page builder |
77
78 ### `cartflows_flow_category` — Flow Category
79
80 Categorises flows (used for template library categorisation).
81
82 ---
83
84 ## Post Meta (Flow)
85
86 Stored in `wp_postmeta` with `post_id` pointing to a `cartflows_flow` post.
87
88 ### Core Flow Meta
89
90 | Meta Key | Type | Description |
91 |----------|------|-------------|
92 | `wcf-steps` | array (serialized) | Ordered array of step post IDs in this flow |
93 | `wcf-flow-title` | string | Flow title (may duplicate post_title) |
94 | `wcf-test-mode` | string | `yes`/`no` — test mode enabled |
95
96 ### Flow Design / Theme Meta
97
98 | Meta Key | Type | Description |
99 |----------|------|-------------|
100 | `wcf-gcp-primary-color` | string | Primary brand colour (hex) |
101 | `wcf-gcp-secondary-color` | string | Secondary colour (hex) |
102 | `wcf-gcp-primary-text-color` | string | Primary text colour (hex) |
103 | `wcf-gcp-text-color` | string | Field text colour (hex) |
104 | `wcf-gcp-accent-color` | string | Accent/heading colour (hex) |
105
106 ---
107
108 ## Post Meta (Step)
109
110 Stored in `wp_postmeta` with `post_id` pointing to a `cartflows_step` post.
111
112 ### Core Step Meta
113
114 | Meta Key | Type | Description |
115 |----------|------|-------------|
116 | `wcf-flow-id` | int | Parent flow post ID |
117 | `wcf-step-type` | string | Step type (checkout, optin, landing, thankyou, upsell, downsell) |
118 | `wcf-step-note` | string | Internal developer note for this step |
119 | `wcf-dynamic-css` | string | Generated CSS for this step |
120 | `wcf-dynamic-css-version` | string | CSS cache version |
121
122 ### Checkout Step Meta
123
124 | Meta Key | Type | Description |
125 |----------|------|-------------|
126 | `wcf-checkout-layout` | string | Layout type (e.g., `modern`, `instant`) |
127 | `wcf-custom-checkout-fields` | string | `yes`/`no` — custom fields enabled |
128 | `wcf-enable-product-options` | string | `yes`/`no` — product option selection |
129 | `wcf-order-bump` | array | Order bump product configuration |
130 | `wcf-pre-checkout-offer` | array | Pre-checkout offer settings |
131
132 ### Checkout Field Meta
133
134 | Meta Key Pattern | Description |
135 |-----------------|-------------|
136 | `wcf-{field_name}` | `yes`/`no` — whether the field is enabled |
137 | `wcf-field-width-{field_name}` | `full`/`half` — field width |
138 | `wcf-field-required-{field_name}` | `yes`/`no` — field is required |
139 | `wcf-field-label-{field_name}` | Custom field label text |
140 | `wcf-field-placeholder-{field_name}` | Custom placeholder text |
141
142 ---
143
144 ## Product Post Meta
145
146 CartFlows adds meta to `product` posts (WooCommerce):
147
148 | Meta Key | Type | Description |
149 |----------|------|-------------|
150 | `cartflows_redirect_flow_id` | int | When this product is purchased, redirect to this flow |
151 | `cartflows_add_to_cart_text` | string | Custom "Add to Cart" button text |
152
153 ---
154
155 ## WordPress Options
156
157 Stored in `wp_options`. Key options:
158
159 ### Global Settings
160
161 | Option Name | Type | Description |
162 |-------------|------|-------------|
163 | `_cartflows_common` | array | General settings: default page builder, store checkout config |
164 | `_cartflows_permalink` | array | Permalink structure: step slug, flow slug, permalink mode |
165 | `_cartflows_roles` | array | User role capability assignments |
166
167 ### Integrations
168
169 | Option Name | Type | Description |
170 |-------------|------|-------------|
171 | `_cartflows_facebook` | array | Facebook Pixel ID and tracking settings |
172 | `_cartflows_google_analytics` | array | Google Analytics tracking ID and settings |
173 | `_cartflows_google_auto_address` | array | Google Places API key and settings |
174 | `_cartflows_google_ads` | array | Google Ads conversion ID and settings |
175 | `_cartflows_tiktok` | array | TikTok Pixel settings |
176 | `_cartflows_pinterest` | array | Pinterest Tag settings |
177 | `_cartflows_snapchat` | array | Snapchat Pixel settings |
178
179 ### Reporting & Analytics
180
181 | Option Name | Type | Description |
182 |-------------|------|-------------|
183 | `cartflows_stats_report_emails` | string | `enable`/`disable` email reports |
184 | `cartflows_stats_report_email_ids` | string | Newline-separated report recipient emails |
185 | `cartflows_kb_searches` | array | Last 20 knowledge base search terms |
186 | `cf_analytics_optin` | string | `yes`/`no` — non-sensitive data tracking |
187
188 ### System
189
190 | Option Name | Type | Description |
191 |-------------|------|-------------|
192 | `cartflows-version` | string | Installed CartFlows version |
193 | `cartflows-assets-version` | int | Timestamp for dynamic CSS cache-busting |
194 | `cartflows_permalink_refresh` | bool | Flush rewrite rules on next load |
195 | `cartflows_delete_plugin_data` | string | `yes`/`no` — delete data on uninstall |
196
197 ---
198
199 ## Permalink Structure
200
201 Steps have a custom permalink format controlled by `_cartflows_permalink`:
202
203 ```
204 /{flow-slug}/{step-slug}
205 ```
206
207 Default slugs:
208 - Flow slug base: `wcf` (configurable)
209 - Step slug base: `wcf-step` (configurable)
210
211 Example: `https://example.com/wcf/my-funnel/checkout-step/`
212
213 Permalinks are flushed (via `flush_rewrite_rules()`) when the permalink settings are saved.
214
215 ---
216
217 ## Related Pages
218
219 - [](WordPress-Plugin-StructureWordPress-Plugin-Structure](WordPress-Plugin-Structure](WordPress-Plugin-Structure)
220 - [](Feature-ModulesFeature-Modules](Feature-Modules](Feature-Modules)
221 - [](Architecture-OverviewArchitecture-Overview](Architecture-Overview](Architecture-Overview)
222 - [](WooCommerce-IntegrationWooCommerce-Integration](WooCommerce-Integration](WooCommerce-Integration)
223