PluginProbe
CartFlows – Funnel Builder & Checkout Plugin for WooCommerce / 3.2.0
CartFlows – Funnel Builder & Checkout Plugin for WooCommerce v3.2.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 / admin-core / inc / global-settings.php

global-settings.php in CartFlows – Funnel Builder & Checkout Plugin for WooCommerce 3.2.0, at admin-core/inc/global-settings.php

1,522 lines 52.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * CartFlows Global Data.
4 *
5 * @package CartFlows
6 */
7
8 namespace CartflowsAdmin\AdminCore\Inc;
9
10 // Exit if accessed directly.
11 if ( ! defined( 'ABSPATH' ) ) {
12 exit;
13 }
14
15 /**
16 * Class flowMeta.
17 */
18 class GlobalSettings {
19
20
21 /**
22 * Get flow meta options.
23 */
24 public static function get_global_settings_fields() {
25 global $wp_roles;
26
27 $origin = get_site_url();
28
29 // Get all user roles.
30 $all_roles_tmp = $wp_roles->roles;
31 $all_roles = array();
32
33 foreach ( $all_roles_tmp as $role_name => $dispaly_name ) {
34 if ( 'administrator' !== $role_name ) {
35 $all_roles[ $role_name ] = array(
36 'role_name' => $dispaly_name['name'],
37 'fields' => array(
38 'roles-structure' => array(
39 'type' => 'select_card',
40 'display_radio' => false,
41 'name' => '_cartflows_roles[' . $role_name . ']',
42 'options' => array(
43 array(
44 'value' => 'no_access',
45 'label' => __( 'No Access', 'cartflows' ),
46 ),
47 array(
48 'value' => 'access_to_cartflows',
49 'label' => __( 'Full Access', 'cartflows' ),
50 'tooltip' => __( 'Allow full access to all settings to customize everything.', 'cartflows' ),
51 ),
52 array(
53 'value' => 'access_to_flows_and_step',
54 'label' => __( 'Limited Access', 'cartflows' ),
55 'tooltip' => __( 'Allow limited access to create, edit, delete, or import flows and steps.', 'cartflows' ),
56 ),
57 ),
58 ),
59 ),
60 );
61 }
62 }
63
64 $settings = array(
65 'general' => array(
66 'title' => '',
67 'description' => __( 'Configure global defaults that apply across every funnel and step.', 'cartflows' ),
68 'fields' => array(
69 'page_builder' => array(
70 'type' => 'select_card',
71 'name' => '_cartflows_common[default_page_builder]',
72 'label' => __( 'Show Ready Templates for', 'cartflows' ),
73 /* translators: %1$1s: link html start, %2$12: link html end*/
74 'desc' => sprintf( __( 'Please choose your preferred page builder from the list so you will only see templates that are made using that page builder. %1$sLearn More >>%2$s', 'cartflows' ), '<a href="' . esc_url( \Cartflows_Helper::get_kb_doc_link( 'https://cartflows.com/docs/import-cartflows-templates-for-flows-steps/' ) ) . '" target="_blank">', '</a>' ),
75 'options' => array(
76 array(
77 'value' => 'gutenberg',
78 'label' => __( 'Block Editor', 'cartflows' ),
79 'image' => esc_url_raw( CARTFLOWS_URL . 'admin-core/assets/images/page-builders/block-editor.png' ),
80 ),
81 array(
82 'value' => 'elementor',
83 'label' => __( 'Elementor', 'cartflows' ),
84 'image' => esc_url_raw( CARTFLOWS_URL . 'admin-core/assets/images/page-builders/elementor.svg' ),
85 ),
86 array(
87 'value' => 'bricks-builder',
88 'label' => __( 'Bricks', 'cartflows' ),
89 'image' => esc_url_raw( CARTFLOWS_URL . 'admin-core/assets/images/page-builders/bricks.png' ),
90 ),
91 array(
92 'value' => 'beaver-builder',
93 'label' => __( 'Beaver', 'cartflows' ),
94 'image' => esc_url_raw( CARTFLOWS_URL . 'admin-core/assets/images/page-builders/beaver-builder.svg' ),
95 ),
96 array(
97 'value' => 'other',
98 'label' => __( 'Other', 'cartflows' ),
99 'image' => esc_url_raw( CARTFLOWS_URL . 'admin-core/assets/images/page-builders/other.svg' ),
100 ),
101 ),
102
103 ),
104 'page_builder_seperator' => array(
105 'type' => 'separator',
106 ),
107 'override_global_checkout' => array(
108 'type' => 'toggle',
109 'backComp' => true,
110 'name' => '_cartflows_common[override_global_checkout]',
111 'label' => __( 'Override Store Checkout', 'cartflows' ),
112 /* translators: %1$1s: link html start, %2$12: link html end*/
113 'desc' => sprintf( __( 'For more information about the Store Checkout settings please %1$sclick here%2$s.', 'cartflows' ), '<a href="' . esc_url( \Cartflows_Helper::get_kb_doc_link( 'https://cartflows.com/docs/store-checkout/' ) ) . '" target="_blank">', '</a>' ),
114 ),
115 'override_store_order_pay' => array(
116 'type' => 'toggle',
117 'backComp' => true,
118 'name' => '_cartflows_common[override_store_order_pay]',
119 'label' => __( 'Override Order Pay Page', 'cartflows' ),
120 'desc' => __( 'Enable this to apply your Store Checkout design to the order-pay page, providing a unified checkout experience when customers pay for pending orders.', 'cartflows' ),
121 'conditions' => array(
122 'fields' => array(
123 array(
124 'name' => '_cartflows_common[override_global_checkout]',
125 'operator' => '===',
126 'value' => 'enable',
127 ),
128 ),
129 ),
130 ),
131 'global_checkout_seperator' => array(
132 'type' => 'separator',
133 ),
134 'search_engine' => array(
135 'type' => 'toggle',
136 'name' => '_cartflows_common[disallow_indexing]',
137 'label' => __( 'Disallow search engine from indexing funnels.', 'cartflows' ),
138 'backComp' => true,
139 'desc' => __( 'Prevent search engines from including funnels in their search results.', 'cartflows' ),
140 ),
141 'search_engine_seperator' => array(
142 'type' => 'separator',
143 ),
144 ),
145 ),
146 'permalink' => array(
147 'title' => '',
148 'description' => __( 'Define how CartFlows URLs are structured on the front end.', 'cartflows' ),
149 'fields' => array(
150 'perma-structure' => array(
151 'type' => 'select_card',
152 'layout' => 'vertical',
153 'name' => '_cartflows_permalink[permalink_structure]',
154 'options' => array(
155 array(
156 'value' => '',
157 'label' => __( 'Default Permalinks', 'cartflows' ),
158 'desc' => __( 'Default WordPress Permalink', 'cartflows' ),
159 ),
160 array(
161 'value' => '/cartflows_flow/%flowname%/cartflows_step',
162 'label' => __( 'Funnel and Step Slug', 'cartflows' ),
163 'desc' => $origin . '/' . CARTFLOWS_FLOW_PERMALINK_SLUG . '/%flowname%/' . CARTFLOWS_STEP_PERMALINK_SLUG . '/%stepname%/',
164 ),
165 array(
166 'value' => '/cartflows_flow/%flowname%',
167 'label' => __( 'Funnel Slug', 'cartflows' ),
168 'desc' => $origin . '/' . CARTFLOWS_FLOW_PERMALINK_SLUG . '/%flowname%/%stepname%/',
169 ),
170 array(
171 'value' => '/%flowname%/cartflows_step',
172 'label' => __( 'Step Slug', 'cartflows' ),
173 'desc' => $origin . '/%flowname%/' . CARTFLOWS_STEP_PERMALINK_SLUG . '/%stepname%/',
174 ),
175 ),
176 ),
177 'perma-separator' => array(
178 'type' => 'separator',
179 ),
180 'perma-heading' => array(
181 'type' => 'heading',
182 'label' => __( 'Post Type Permalink Base', 'cartflows' ),
183 ),
184 'perma-step-base' => array(
185 'type' => 'text',
186 'label' => __( 'Step Base', 'cartflows' ),
187 'name' => '_cartflows_permalink[permalink]',
188 'class' => 'input-field',
189 ),
190 'perma-flow-base' => array(
191 'type' => 'text',
192 'label' => __( 'Funnel Base', 'cartflows' ),
193 'name' => '_cartflows_permalink[permalink_flow_base]',
194 'class' => 'input-field',
195 ),
196 ),
197 ),
198 'facebook-pixel' => array(
199 'title' => '',
200 'fields' => array(
201 'enable-fb-pixel' => array(
202 'type' => 'toggle',
203 'label' => __( 'Enable For CartFlows Pages', 'cartflows' ),
204 'name' => '_cartflows_facebook[facebook_pixel_tracking]',
205 'backComp' => true,
206 ),
207 'fb-pixel-separator' => array(
208 'type' => 'separator',
209 'conditions' => array(
210 'fields' => array(
211 array(
212 'name' => '_cartflows_facebook[facebook_pixel_tracking]',
213 'operator' => '===',
214 'value' => 'enable',
215 ),
216 ),
217 ),
218 ),
219 'enable-fb-pixel-for-site' => array(
220 'type' => 'toggle',
221 'label' => __( 'Enable for the whole site', 'cartflows' ),
222 'name' => '_cartflows_facebook[facebook_pixel_tracking_for_site]',
223 'desc' => __( 'If checked, page view and view content event will also be triggered for other pages/posts of site.', 'cartflows' ),
224 'conditions' => array(
225 'fields' => array(
226 array(
227 'name' => '_cartflows_facebook[facebook_pixel_tracking]',
228 'operator' => '===',
229 'value' => 'enable',
230 ),
231 ),
232 ),
233 'backComp' => true,
234 ),
235 'fb-pixel-for-site-separator' => array(
236 'type' => 'separator',
237 'conditions' => array(
238 'fields' => array(
239 array(
240 'name' => '_cartflows_facebook[facebook_pixel_tracking]',
241 'operator' => '===',
242 'value' => 'enable',
243 ),
244 ),
245 ),
246 ),
247 'pixel-id' => array(
248 'type' => 'text',
249 'label' => __( 'Enter Facebook pixel ID', 'cartflows' ),
250 'name' => '_cartflows_facebook[facebook_pixel_id]',
251 'class' => 'input-field',
252 'conditions' => array(
253 'fields' => array(
254 array(
255 'name' => '_cartflows_facebook[facebook_pixel_tracking]',
256 'operator' => '===',
257 'value' => 'enable',
258 ),
259 ),
260 ),
261 ),
262 'pixel-id-separator' => array(
263 'type' => 'separator',
264 'conditions' => array(
265 'fields' => array(
266 array(
267 'name' => '_cartflows_facebook[facebook_pixel_tracking]',
268 'operator' => '===',
269 'value' => 'enable',
270 ),
271 ),
272 ),
273 ),
274 'pixel-event-heading' => array(
275 'type' => 'heading',
276 'label' => __( 'Facebook Pixel Events', 'cartflows' ),
277 'conditions' => array(
278 'fields' => array(
279 array(
280 'name' => '_cartflows_facebook[facebook_pixel_tracking]',
281 'operator' => '===',
282 'value' => 'enable',
283 ),
284 ),
285 ),
286 ),
287
288 'pixel-event-view-content' => array(
289 'type' => 'checkbox',
290 'label' => __( 'View Content', 'cartflows' ),
291 'name' => '_cartflows_facebook[facebook_pixel_view_content]',
292 'conditions' => array(
293 'fields' => array(
294 array(
295 'name' => '_cartflows_facebook[facebook_pixel_tracking]',
296 'operator' => '===',
297 'value' => 'enable',
298 ),
299 ),
300 ),
301 'backComp' => true,
302 ),
303
304 'pixel-event-ini-checkout' => array(
305 'type' => 'checkbox',
306 'label' => __( 'Initiate Checkout', 'cartflows' ),
307 'name' => '_cartflows_facebook[facebook_pixel_initiate_checkout]',
308 'conditions' => array(
309 'fields' => array(
310 array(
311 'name' => '_cartflows_facebook[facebook_pixel_tracking]',
312 'operator' => '===',
313 'value' => 'enable',
314 ),
315 ),
316 ),
317 'backComp' => true,
318 ),
319
320 'pixel-event-payment-info' => array(
321 'type' => 'checkbox',
322 'label' => __( 'Add Payment Info', 'cartflows' ),
323 'name' => '_cartflows_facebook[facebook_pixel_add_payment_info]',
324 'conditions' => array(
325 'fields' => array(
326 array(
327 'name' => '_cartflows_facebook[facebook_pixel_tracking]',
328 'operator' => '===',
329 'value' => 'enable',
330 ),
331 ),
332 ),
333 'backComp' => true,
334 'is_pro' => true,
335 ),
336
337 'pixel-event-purchase-complete' => array(
338 'type' => 'checkbox',
339 'label' => __( 'Purchase Complete', 'cartflows' ),
340 'name' => '_cartflows_facebook[facebook_pixel_purchase_complete]',
341 'conditions' => array(
342 'fields' => array(
343 array(
344 'name' => '_cartflows_facebook[facebook_pixel_tracking]',
345 'operator' => '===',
346 'value' => 'enable',
347 ),
348 ),
349 ),
350 'backComp' => true,
351 ),
352
353 'pixel-event-lead-info' => array(
354 'type' => 'checkbox',
355 'label' => __( 'Optin Lead', 'cartflows' ),
356 'name' => '_cartflows_facebook[facebook_pixel_optin_lead]',
357 'conditions' => array(
358 'fields' => array(
359 array(
360 'name' => '_cartflows_facebook[facebook_pixel_tracking]',
361 'operator' => '===',
362 'value' => 'enable',
363 ),
364 ),
365 ),
366 'backComp' => true,
367 'tooltip' => __( 'This event will trigger when someone subscribes or signs up on the opt-in page.', 'cartflows' ),
368 'is_pro' => true,
369 ),
370
371 'pixel-not-work-doc' => array(
372 'type' => 'doc',
373 'label' => '',
374 'name' => 'pixel-not-work-doc',
375 /* translators: %1$1s: link html start, %2$12: link html end*/
376 'content' => sprintf( __( 'Facebook Pixel not working correctly? %1$1s Click here %2$2s to know more.', 'cartflows' ), '<a href="' . esc_url( \Cartflows_Helper::get_kb_doc_link( 'https://cartflows.com/docs/facebook-pixel-support/' ) ) . '" target="_blank">', '</a>' ),
377 'conditions' => array(
378 'fields' => array(
379 array(
380 'name' => '_cartflows_facebook[facebook_pixel_tracking]',
381 'operator' => '===',
382 'value' => 'enable',
383 ),
384 ),
385 ),
386 ),
387 ),
388 ),
389 'ga-analytics' => array(
390 'title' => '',
391 'fields' => array(
392 'enable-ga-analytics' => array(
393 'type' => 'toggle',
394 'label' => __( 'Enable For CartFlows Pages', 'cartflows' ),
395 'name' => '_cartflows_google_analytics[enable_google_analytics]',
396 'backComp' => true,
397 ),
398 'ga-analytics-separator' => array(
399 'type' => 'separator',
400 'conditions' => array(
401 'fields' => array(
402 array(
403 'name' => '_cartflows_google_analytics[enable_google_analytics]',
404 'operator' => '===',
405 'value' => 'enable',
406 ),
407 ),
408 ),
409 ),
410 'enable-ga-analytics-for-site' => array(
411 'type' => 'toggle',
412 'label' => __( 'Enable for the whole site', 'cartflows' ),
413 'name' => '_cartflows_google_analytics[enable_google_analytics_for_site]',
414 'desc' => __( 'If checked, page view event will also be triggered for other pages/posts of site.', 'cartflows' ),
415 'conditions' => array(
416 'fields' => array(
417 array(
418 'name' => '_cartflows_google_analytics[enable_google_analytics]',
419 'operator' => '===',
420 'value' => 'enable',
421 ),
422 ),
423 ),
424 'backComp' => true,
425 ),
426 'ga-analytics-for-site-separator' => array(
427 'type' => 'separator',
428 'conditions' => array(
429 'fields' => array(
430 array(
431 'name' => '_cartflows_google_analytics[enable_google_analytics]',
432 'operator' => '===',
433 'value' => 'enable',
434 ),
435 ),
436 ),
437 ),
438 'ga-id' => array(
439 'type' => 'text',
440 'label' => __( 'Enter Google Analytics ID', 'cartflows' ),
441 'name' => '_cartflows_google_analytics[google_analytics_id]',
442 'class' => 'input-field',
443 /* translators: %1$1s: link html start, %2$12: link html end*/
444 'desc' => sprintf( __( 'Log into your %1$1s google analytics account %2$2s to find your ID. e.g. G-XXXXX or UA-XXXXX-X', 'cartflows' ), '<a href="https://analytics.google.com/" target="_blank">', '</a>' ),
445 'conditions' => array(
446 'fields' => array(
447 array(
448 'name' => '_cartflows_google_analytics[enable_google_analytics]',
449 'operator' => '===',
450 'value' => 'enable',
451 ),
452 ),
453 ),
454 ),
455 'ga-id-separator' => array(
456 'type' => 'separator',
457 'conditions' => array(
458 'fields' => array(
459 array(
460 'name' => '_cartflows_google_analytics[enable_google_analytics]',
461 'operator' => '===',
462 'value' => 'enable',
463 ),
464 ),
465 ),
466 ),
467 'ga-event-heading' => array(
468 'type' => 'heading',
469 'label' => __( 'Google Analytics Events', 'cartflows' ),
470 'conditions' => array(
471 'fields' => array(
472 array(
473 'name' => '_cartflows_google_analytics[enable_google_analytics]',
474 'operator' => '===',
475 'value' => 'enable',
476 ),
477 ),
478 ),
479 ),
480 'ga-event-ini-checkout' => array(
481 'type' => 'checkbox',
482 'label' => __( 'Begin Checkout', 'cartflows' ),
483 'name' => '_cartflows_google_analytics[enable_begin_checkout]',
484 'conditions' => array(
485 'fields' => array(
486 array(
487 'name' => '_cartflows_google_analytics[enable_google_analytics]',
488 'operator' => '===',
489 'value' => 'enable',
490 ),
491 ),
492 ),
493 'backComp' => true,
494 ),
495
496 'ga-event-add-to-cart' => array(
497 'type' => 'checkbox',
498 'label' => __( 'Add To Cart', 'cartflows' ),
499 'name' => '_cartflows_google_analytics[enable_add_to_cart]',
500 'conditions' => array(
501 'fields' => array(
502 array(
503 'name' => '_cartflows_google_analytics[enable_google_analytics]',
504 'operator' => '===',
505 'value' => 'enable',
506 ),
507 ),
508 ),
509 'backComp' => true,
510 ),
511 'ga-event-payment-info' => array(
512 'type' => 'checkbox',
513 'label' => __( 'Add Payment Info', 'cartflows' ),
514 'name' => '_cartflows_google_analytics[enable_add_payment_info]',
515 'conditions' => array(
516 'fields' => array(
517 array(
518 'name' => '_cartflows_google_analytics[enable_google_analytics]',
519 'operator' => '===',
520 'value' => 'enable',
521 ),
522 ),
523 ),
524 'backComp' => true,
525 'is_pro' => true,
526 ),
527 'ga-event-purchase-complete' => array(
528 'type' => 'checkbox',
529 'label' => __( 'Purchase', 'cartflows' ),
530 'name' => '_cartflows_google_analytics[enable_purchase_event]',
531 'conditions' => array(
532 'fields' => array(
533 array(
534 'name' => '_cartflows_google_analytics[enable_google_analytics]',
535 'operator' => '===',
536 'value' => 'enable',
537 ),
538 ),
539 ),
540 'backComp' => true,
541 ),
542
543 'ga-event-lead-info' => array(
544 'type' => 'checkbox',
545 'label' => __( 'Optin Lead', 'cartflows' ),
546 'name' => '_cartflows_google_analytics[enable_optin_lead]',
547 'conditions' => array(
548 'fields' => array(
549 array(
550 'name' => '_cartflows_google_analytics[enable_google_analytics]',
551 'operator' => '===',
552 'value' => 'enable',
553 ),
554 ),
555 ),
556 'backComp' => true,
557 'tooltip' => __( 'This event will trigger when someone subscribes or signs up on the opt-in page.', 'cartflows' ),
558 'is_pro' => true,
559 ),
560
561 'ga-not-work-doc' => array(
562 'type' => 'doc',
563 'label' => '',
564 'name' => 'ga-not-work-doc',
565 /* translators: %1$1s: link html start, %2$12: link html end*/
566 'content' => sprintf( __( 'Google Analytics not working correctly? %1$1s Click here %2$2s to know more.', 'cartflows' ), '<a href="' . esc_url( \Cartflows_Helper::get_kb_doc_link( 'https://cartflows.com/docs/troubleshooting-google-analytics-tracking-issues/' ) ) . '" target="_blank">', '</a>' ),
567 'conditions' => array(
568 'fields' => array(
569 array(
570 'name' => '_cartflows_google_analytics[enable_google_analytics]',
571 'operator' => '===',
572 'value' => 'enable',
573 ),
574 ),
575 ),
576 ),
577 ),
578 ),
579 'g-address-autocomplete' => array(
580 'title' => '',
581 'fields' => array(
582 'g-api-key' => array(
583 'type' => 'password',
584 'label' => __( 'Enter Google Map API key', 'cartflows' ),
585 'name' => '_cartflows_google_auto_address[google_map_api_key]',
586 'class' => 'input-field',
587 'icon' => 'dashicons dashicons-visibility',
588 'afterIcon' => 'dashicons dashicons-hidden',
589 'iconclick' => 'show_field_value',
590 /* translators: %1$1s: link html start, %2$12: link html end*/
591 'desc' => sprintf( __( 'Check this %1$1s article %2$2s to setup and find an API key.', 'cartflows' ), '<a href="' . esc_url( \Cartflows_Helper::get_kb_doc_link( 'https://cartflows.com/docs/enabling-google-address-autocompletes/' ) ) . '" target="_blank">', '</a>' ),
592 ),
593 ),
594 ),
595 'tiktok-pixel' => array(
596 'title' => '',
597 'fields' => array(
598 'enable-tiktok-pixel' => array(
599 'type' => 'toggle',
600 'label' => __( 'Enable For CartFlows Pages', 'cartflows' ),
601 'name' => '_cartflows_tiktok[tiktok_pixel_tracking]',
602 'backComp' => true,
603 ),
604 'tiktok-pixel-separator' => array(
605 'type' => 'separator',
606 'conditions' => array(
607 'fields' => array(
608 array(
609 'name' => '_cartflows_tiktok[tiktok_pixel_tracking]',
610 'operator' => '===',
611 'value' => 'enable',
612 ),
613 ),
614 ),
615 ),
616 'enable-tiktok-pixel-for-site' => array(
617 'type' => 'toggle',
618 'label' => __( 'Enable for the whole site', 'cartflows' ),
619 'name' => '_cartflows_tiktok[tiktok_pixel_tracking_for_site]',
620 'desc' => __( 'If checked, PageView event will also be triggered for other pages/posts of site.', 'cartflows' ),
621 'conditions' => array(
622 'fields' => array(
623 array(
624 'name' => '_cartflows_tiktok[tiktok_pixel_tracking]',
625 'operator' => '===',
626 'value' => 'enable',
627 ),
628 ),
629 ),
630 'backComp' => true,
631 ),
632 'tiktok-pixel-for-site-separator' => array(
633 'type' => 'separator',
634 'conditions' => array(
635 'fields' => array(
636 array(
637 'name' => '_cartflows_tiktok[tiktok_pixel_tracking]',
638 'operator' => '===',
639 'value' => 'enable',
640 ),
641 ),
642 ),
643 ),
644 'tiktok-id' => array(
645 'type' => 'text',
646 'label' => __( 'Enter TikTok ID', 'cartflows' ),
647 'name' => '_cartflows_tiktok[tiktok_pixel_id]',
648 'class' => 'input-field',
649 /* translators: %1$1s: link html start, %2$12: link html end*/
650 'desc' => sprintf( __( 'Log into your %1$1s TikTok business account %2$2s to find your ID.', 'cartflows' ), '<a href="https://ads.tiktok.com/" target="_blank">', '</a>' ),
651 'conditions' => array(
652 'fields' => array(
653 array(
654 'name' => '_cartflows_tiktok[tiktok_pixel_tracking]',
655 'operator' => '===',
656 'value' => 'enable',
657 ),
658 ),
659 ),
660 ),
661 'tiktok-id-separator' => array(
662 'type' => 'separator',
663 'conditions' => array(
664 'fields' => array(
665 array(
666 'name' => '_cartflows_tiktok[tiktok_pixel_tracking]',
667 'operator' => '===',
668 'value' => 'enable',
669 ),
670 ),
671 ),
672 ),
673 'tiktok-event-heading' => array(
674 'type' => 'heading',
675 'label' => __( 'TikTok Events', 'cartflows' ),
676 'conditions' => array(
677 'fields' => array(
678 array(
679 'name' => '_cartflows_tiktok[tiktok_pixel_tracking]',
680 'operator' => '===',
681 'value' => 'enable',
682 ),
683 ),
684 ),
685 ),
686 'tiktok-event-begin-checkout' => array(
687 'type' => 'checkbox',
688 'label' => __( 'Begin Checkout', 'cartflows' ),
689 'name' => '_cartflows_tiktok[enable_tiktok_begin_checkout]',
690 'conditions' => array(
691 'fields' => array(
692 array(
693 'name' => '_cartflows_tiktok[tiktok_pixel_tracking]',
694 'operator' => '===',
695 'value' => 'enable',
696 ),
697 ),
698 ),
699 'backComp' => true,
700 ),
701
702 'tiktok-event-add-to-cart' => array(
703 'type' => 'checkbox',
704 'label' => __( 'Add To Cart', 'cartflows' ),
705 'name' => '_cartflows_tiktok[enable_tiktok_add_to_cart]',
706 'conditions' => array(
707 'fields' => array(
708 array(
709 'name' => '_cartflows_tiktok[tiktok_pixel_tracking]',
710 'operator' => '===',
711 'value' => 'enable',
712 ),
713 ),
714 ),
715 'backComp' => true,
716 ),
717 'tiktok-event-view-content' => array(
718 'type' => 'checkbox',
719 'label' => __( 'View Content', 'cartflows' ),
720 'name' => '_cartflows_tiktok[enable_tiktok_view_content]',
721 'conditions' => array(
722 'fields' => array(
723 array(
724 'name' => '_cartflows_tiktok[tiktok_pixel_tracking]',
725 'operator' => '===',
726 'value' => 'enable',
727 ),
728 ),
729 ),
730 'backComp' => true,
731 ),
732 'tiktok-event-payment-info' => array(
733 'type' => 'checkbox',
734 'label' => __( 'Add Payment Info', 'cartflows' ),
735 'name' => '_cartflows_tiktok[enable_tiktok_add_payment_info]',
736 'conditions' => array(
737 'fields' => array(
738 array(
739 'name' => '_cartflows_tiktok[tiktok_pixel_tracking]',
740 'operator' => '===',
741 'value' => 'enable',
742 ),
743 ),
744 ),
745 'backComp' => true,
746 'is_pro' => true,
747 ),
748 'tiktok-event-purchase-complete' => array(
749 'type' => 'checkbox',
750 'label' => __( 'Purchase', 'cartflows' ),
751 'name' => '_cartflows_tiktok[enable_tiktok_purchase_event]',
752 'conditions' => array(
753 'fields' => array(
754 array(
755 'name' => '_cartflows_tiktok[tiktok_pixel_tracking]',
756 'operator' => '===',
757 'value' => 'enable',
758 ),
759 ),
760 ),
761 'backComp' => true,
762 ),
763
764 'tiktok-event-lead-info' => array(
765 'type' => 'checkbox',
766 'label' => __( 'Optin Lead', 'cartflows' ),
767 'name' => '_cartflows_tiktok[enable_tiktok_optin_lead]',
768 'conditions' => array(
769 'fields' => array(
770 array(
771 'name' => '_cartflows_tiktok[tiktok_pixel_tracking]',
772 'operator' => '===',
773 'value' => 'enable',
774 ),
775 ),
776 ),
777 'backComp' => true,
778 'tooltip' => __( 'Optin Lead event will be triggered for optin page.', 'cartflows' ),
779 'is_pro' => true,
780 ),
781 ),
782 ),
783 'snapchat-pixel' => array(
784 'title' => '',
785 'fields' => array(
786 'enable-snapchat-pixel' => array(
787 'type' => 'toggle',
788 'label' => __( 'Enable for CartFlows pages', 'cartflows' ),
789 'name' => '_cartflows_snapchat[snapchat_pixel_tracking]',
790 'backComp' => true,
791 ),
792 'snapchat-pixel-separator' => array(
793 'type' => 'separator',
794 'conditions' => array(
795 'fields' => array(
796 array(
797 'name' => '_cartflows_snapchat[snapchat_pixel_tracking]',
798 'operator' => '===',
799 'value' => 'enable',
800 ),
801 ),
802 ),
803 ),
804 'enable-snapchat-pixel-for-site' => array(
805 'type' => 'toggle',
806 'label' => __( 'Enable for the whole site', 'cartflows' ),
807 'name' => '_cartflows_snapchat[snapchat_pixel_tracking_for_site]',
808 'desc' => __( 'If checked, PageView event will also be triggered for other pages/posts of site.', 'cartflows' ),
809 'conditions' => array(
810 'fields' => array(
811 array(
812 'name' => '_cartflows_snapchat[snapchat_pixel_tracking]',
813 'operator' => '===',
814 'value' => 'enable',
815 ),
816 ),
817 ),
818 'backComp' => true,
819 ),
820 'snapchat-pixel-for-site-separator' => array(
821 'type' => 'separator',
822 'conditions' => array(
823 'fields' => array(
824 array(
825 'name' => '_cartflows_snapchat[snapchat_pixel_tracking]',
826 'operator' => '===',
827 'value' => 'enable',
828 ),
829 ),
830 ),
831 ),
832 'snapchat-id' => array(
833 'type' => 'text',
834 'label' => __( 'Enter Snapchat pixel ID', 'cartflows' ),
835 'name' => '_cartflows_snapchat[snapchat_pixel_id]',
836 'class' => 'input-field',
837 /* translators: %1$1s: link html start, %2$12: link html end*/
838 'desc' => sprintf( __( 'Log into your %1$1s Snapchat business account %2$2s to find your ID.', 'cartflows' ), '<a href="https://ads.snapchat.com/" target="_blank">', '</a>' ),
839 'conditions' => array(
840 'fields' => array(
841 array(
842 'name' => '_cartflows_snapchat[snapchat_pixel_tracking]',
843 'operator' => '===',
844 'value' => 'enable',
845 ),
846 ),
847 ),
848 ),
849 'snapchat-id-separator' => array(
850 'type' => 'separator',
851 'conditions' => array(
852 'fields' => array(
853 array(
854 'name' => '_cartflows_snapchat[snapchat_pixel_tracking]',
855 'operator' => '===',
856 'value' => 'enable',
857 ),
858 ),
859 ),
860 ),
861 'snapchat-event-heading' => array(
862 'type' => 'heading',
863 'label' => __( 'Snapchat Events', 'cartflows' ),
864 'conditions' => array(
865 'fields' => array(
866 array(
867 'name' => '_cartflows_snapchat[snapchat_pixel_tracking]',
868 'operator' => '===',
869 'value' => 'enable',
870 ),
871 ),
872 ),
873 ),
874 'snapchat-event-begin-checkout' => array(
875 'type' => 'checkbox',
876 'label' => __( 'Begin Checkout', 'cartflows' ),
877 'name' => '_cartflows_snapchat[enable_snapchat_begin_checkout]',
878 'conditions' => array(
879 'fields' => array(
880 array(
881 'name' => '_cartflows_snapchat[snapchat_pixel_tracking]',
882 'operator' => '===',
883 'value' => 'enable',
884 ),
885 ),
886 ),
887 'backComp' => true,
888 ),
889 'snapchat-event-add-to-cart' => array(
890 'type' => 'checkbox',
891 'label' => __( 'Add To Cart', 'cartflows' ),
892 'name' => '_cartflows_snapchat[enable_snapchat_add_to_cart]',
893 'conditions' => array(
894 'fields' => array(
895 array(
896 'name' => '_cartflows_snapchat[snapchat_pixel_tracking]',
897 'operator' => '===',
898 'value' => 'enable',
899 ),
900 ),
901 ),
902 'backComp' => true,
903 ),
904 'snapchat-event-view-content' => array(
905 'type' => 'checkbox',
906 'label' => __( 'View Content', 'cartflows' ),
907 'name' => '_cartflows_snapchat[enable_snapchat_view_content]',
908 'conditions' => array(
909 'fields' => array(
910 array(
911 'name' => '_cartflows_snapchat[snapchat_pixel_tracking]',
912 'operator' => '===',
913 'value' => 'enable',
914 ),
915 ),
916 ),
917 'backComp' => true,
918 ),
919 'snapchat-event-purchase-complete' => array(
920 'type' => 'checkbox',
921 'label' => __( 'Purchase', 'cartflows' ),
922 'name' => '_cartflows_snapchat[enable_snapchat_purchase_event]',
923 'conditions' => array(
924 'fields' => array(
925 array(
926 'name' => '_cartflows_snapchat[snapchat_pixel_tracking]',
927 'operator' => '===',
928 'value' => 'enable',
929 ),
930 ),
931 ),
932 'backComp' => true,
933 ),
934 'snapchat-event-subscribe' => array(
935 'type' => 'checkbox',
936 'label' => __( 'Subscribe', 'cartflows' ),
937 'name' => '_cartflows_snapchat[enable_snapchat_subscribe_event]',
938 'conditions' => array(
939 'fields' => array(
940 array(
941 'name' => '_cartflows_snapchat[snapchat_pixel_tracking]',
942 'operator' => '===',
943 'value' => 'enable',
944 ),
945 ),
946 ),
947 'backComp' => true,
948 'tooltip' => __( 'This option is only available for products that are part of a subscription.', 'cartflows' ),
949 ),
950 'snapchat-event-lead-info' => array(
951 'type' => 'checkbox',
952 'label' => __( 'Optin Lead', 'cartflows' ),
953 'name' => '_cartflows_snapchat[enable_snapchat_optin_lead]',
954 'conditions' => array(
955 'fields' => array(
956 array(
957 'name' => '_cartflows_snapchat[snapchat_pixel_tracking]',
958 'operator' => '===',
959 'value' => 'enable',
960 ),
961 ),
962 ),
963 'backComp' => true,
964 'tooltip' => __( 'Optin Lead event will be triggered for optin page.', 'cartflows' ),
965 'is_pro' => true,
966 ),
967 ),
968 ),
969 'google-ads' => array(
970 'title' => '',
971 'fields' => array(
972 'enable-google-ads' => array(
973 'type' => 'toggle',
974 'label' => __( 'Enable For CartFlows Pages', 'cartflows' ),
975 'name' => '_cartflows_google_ads[google_ads_tracking]',
976 'backComp' => true,
977 ),
978 'google-ads-separator' => array(
979 'type' => 'separator',
980 'conditions' => array(
981 'fields' => array(
982 array(
983 'name' => '_cartflows_google_ads[google_ads_tracking]',
984 'operator' => '===',
985 'value' => 'enable',
986 ),
987 ),
988 ),
989 ),
990 'enable-google-ads-for-site' => array(
991 'type' => 'toggle',
992 'label' => __( 'Enable for the whole site', 'cartflows' ),
993 'name' => '_cartflows_google_ads[google_ads_for_site]',
994 'desc' => __( 'If checked, PageView event will also be triggered for other pages/posts of site.', 'cartflows' ),
995 'conditions' => array(
996 'fields' => array(
997 array(
998 'name' => '_cartflows_google_ads[google_ads_tracking]',
999 'operator' => '===',
1000 'value' => 'enable',
1001 ),
1002 ),
1003 ),
1004 'backComp' => true,
1005 ),
1006 'google-ads-for-site-separator' => array(
1007 'type' => 'separator',
1008 'conditions' => array(
1009 'fields' => array(
1010 array(
1011 'name' => '_cartflows_google_ads[google_ads_tracking]',
1012 'operator' => '===',
1013 'value' => 'enable',
1014 ),
1015 ),
1016 ),
1017 ),
1018 'google-ads-id' => array(
1019 'type' => 'text',
1020 'label' => __( 'Enter Google Ads Conversion ID', 'cartflows' ),
1021 'name' => '_cartflows_google_ads[google_ads_id]',
1022 'class' => 'input-field',
1023 /* translators: %1$1s: link html start, %2$12: link html end*/
1024 'desc' => sprintf( __( 'Log into your %1$1s Google Ads account %2$2s to find your conversion ID.', 'cartflows' ), '<a href="https://ads.google.com/home/" target="_blank">', '</a>' ),
1025 'conditions' => array(
1026 'fields' => array(
1027 array(
1028 'name' => '_cartflows_google_ads[google_ads_tracking]',
1029 'operator' => '===',
1030 'value' => 'enable',
1031 ),
1032 ),
1033 ),
1034 ),
1035 'google-ads-label' => array(
1036 'type' => 'text',
1037 'label' => __( 'Enter Google Ads Conversion Label', 'cartflows' ),
1038 'name' => '_cartflows_google_ads[google_ads_label]',
1039 'class' => 'input-field',
1040 /* translators: %1$1s: link html start, %2$12: link html end*/
1041 'desc' => sprintf( __( 'Log into your %1$1s Google Ads account %2$2s to find your conversion label.', 'cartflows' ), '<a href="https://ads.google.com/home/" target="_blank">', '</a>' ),
1042 'conditions' => array(
1043 'fields' => array(
1044 array(
1045 'name' => '_cartflows_google_ads[google_ads_tracking]',
1046 'operator' => '===',
1047 'value' => 'enable',
1048 ),
1049 ),
1050 ),
1051 ),
1052 'google-ads-id-separator' => array(
1053 'type' => 'separator',
1054 'conditions' => array(
1055 'fields' => array(
1056 array(
1057 'name' => '_cartflows_google_ads[google_ads_tracking]',
1058 'operator' => '===',
1059 'value' => 'enable',
1060 ),
1061 ),
1062 ),
1063 ),
1064
1065 'google-ads-event-heading' => array(
1066 'type' => 'heading',
1067 'label' => __( 'Google Ads Events', 'cartflows' ),
1068 'conditions' => array(
1069 'fields' => array(
1070 array(
1071 'name' => '_cartflows_google_ads[google_ads_tracking]',
1072 'operator' => '===',
1073 'value' => 'enable',
1074 ),
1075 ),
1076 ),
1077 ),
1078 'google-ads-event-begin-checkout' => array(
1079 'type' => 'checkbox',
1080 'label' => __( 'Begin Checkout', 'cartflows' ),
1081 'name' => '_cartflows_google_ads[enable_google_ads_begin_checkout]',
1082 'conditions' => array(
1083 'fields' => array(
1084 array(
1085 'name' => '_cartflows_google_ads[google_ads_tracking]',
1086 'operator' => '===',
1087 'value' => 'enable',
1088 ),
1089 ),
1090 ),
1091 'backComp' => true,
1092 ),
1093
1094 'google-ads-event-add-to-cart' => array(
1095 'type' => 'checkbox',
1096 'label' => __( 'Add To Cart', 'cartflows' ),
1097 'name' => '_cartflows_google_ads[enable_google_ads_add_to_cart]',
1098 'conditions' => array(
1099 'fields' => array(
1100 array(
1101 'name' => '_cartflows_google_ads[google_ads_tracking]',
1102 'operator' => '===',
1103 'value' => 'enable',
1104 ),
1105 ),
1106 ),
1107 'backComp' => true,
1108 ),
1109 'google-ads-event-view-content' => array(
1110 'type' => 'checkbox',
1111 'label' => __( 'View Content', 'cartflows' ),
1112 'name' => '_cartflows_google_ads[enable_google_ads_view_content]',
1113 'conditions' => array(
1114 'fields' => array(
1115 array(
1116 'name' => '_cartflows_google_ads[google_ads_tracking]',
1117 'operator' => '===',
1118 'value' => 'enable',
1119 ),
1120 ),
1121 ),
1122 'backComp' => true,
1123 ),
1124 'google-ads-event-payment-info' => array(
1125 'type' => 'checkbox',
1126 'label' => __( 'Add Payment Info', 'cartflows' ),
1127 'name' => '_cartflows_google_ads[enable_google_ads_add_payment_info]',
1128 'conditions' => array(
1129 'fields' => array(
1130 array(
1131 'name' => '_cartflows_google_ads[google_ads_tracking]',
1132 'operator' => '===',
1133 'value' => 'enable',
1134 ),
1135 ),
1136 ),
1137 'backComp' => true,
1138 'is_pro' => true,
1139 ),
1140 'google-ads-event-purchase-complete' => array(
1141 'type' => 'checkbox',
1142 'label' => __( 'Purchase', 'cartflows' ),
1143 'name' => '_cartflows_google_ads[enable_google_ads_purchase_event]',
1144 'conditions' => array(
1145 'fields' => array(
1146 array(
1147 'name' => '_cartflows_google_ads[google_ads_tracking]',
1148 'operator' => '===',
1149 'value' => 'enable',
1150 ),
1151 ),
1152 ),
1153 'backComp' => true,
1154 ),
1155
1156 'google-ads-event-lead-info' => array(
1157 'type' => 'checkbox',
1158 'label' => __( 'Optin Lead', 'cartflows' ),
1159 'name' => '_cartflows_google_ads[enable_google_ads_optin_lead]',
1160 'conditions' => array(
1161 'fields' => array(
1162 array(
1163 'name' => '_cartflows_google_ads[google_ads_tracking]',
1164 'operator' => '===',
1165 'value' => 'enable',
1166 ),
1167 ),
1168 ),
1169 'backComp' => true,
1170 'tooltip' => __( 'Optin Lead event will be triggered for optin page.', 'cartflows' ),
1171 'is_pro' => true,
1172 ),
1173 ),
1174 ),
1175 'pinterest-tag' => array(
1176 'title' => '',
1177 'fields' => array(
1178 'enable-pinterest-tag' => array(
1179 'type' => 'toggle',
1180 'label' => __( 'Enable for CartFlows pages', 'cartflows' ),
1181 'name' => '_cartflows_pinterest[pinterest_tag_tracking]',
1182 'backComp' => true,
1183 ),
1184 'pinterest-tag-separator' => array(
1185 'type' => 'separator',
1186 'conditions' => array(
1187 'fields' => array(
1188 array(
1189 'name' => '_cartflows_pinterest[pinterest_tag_tracking]',
1190 'operator' => '===',
1191 'value' => 'enable',
1192 ),
1193 ),
1194 ),
1195 ),
1196 'enable-pinterest-tag-for-site' => array(
1197 'type' => 'toggle',
1198 'label' => __( 'Enable for the whole site', 'cartflows' ),
1199 'name' => '_cartflows_pinterest[pinterest_tag_tracking_for_site]',
1200 'desc' => __( 'If checked, PageVisit event will also be triggered for other pages/posts of site.', 'cartflows' ),
1201 'conditions' => array(
1202 'fields' => array(
1203 array(
1204 'name' => '_cartflows_pinterest[pinterest_tag_tracking]',
1205 'operator' => '===',
1206 'value' => 'enable',
1207 ),
1208 ),
1209 ),
1210 'backComp' => true,
1211 ),
1212 'pinterest-tag-for-site-separator' => array(
1213 'type' => 'separator',
1214 'conditions' => array(
1215 'fields' => array(
1216 array(
1217 'name' => '_cartflows_pinterest[pinterest_tag_tracking]',
1218 'operator' => '===',
1219 'value' => 'enable',
1220 ),
1221 ),
1222 ),
1223 ),
1224 'pinterest-id' => array(
1225 'type' => 'text',
1226 'label' => __( 'Enter Pinterest Tag ID', 'cartflows' ),
1227 'name' => '_cartflows_pinterest[pinterest_tag_id]',
1228 'class' => 'input-field',
1229 /* translators: %1$1s: link html start, %2$12: link html end*/
1230 'desc' => sprintf( __( 'Log into your %1$1s Pinterest business account %2$2s to find your ID.', 'cartflows' ), '<a href="https://www.pinterest.com/business/hub/" target="_blank">', '</a>' ),
1231 'conditions' => array(
1232 'fields' => array(
1233 array(
1234 'name' => '_cartflows_pinterest[pinterest_tag_tracking]',
1235 'operator' => '===',
1236 'value' => 'enable',
1237 ),
1238 ),
1239 ),
1240 ),
1241 'pinterest-id-separator' => array(
1242 'type' => 'separator',
1243 'conditions' => array(
1244 'fields' => array(
1245 array(
1246 'name' => '_cartflows_pinterest[pinterest_tag_tracking]',
1247 'operator' => '===',
1248 'value' => 'enable',
1249 ),
1250 ),
1251 ),
1252 ),
1253 'pinterest-consent' => array(
1254 'type' => 'checkbox',
1255 'label' => __( 'Enable Pinterest tag tracking consent notice', 'cartflows' ),
1256 'name' => '_cartflows_pinterest[enable_pinterest_consent]',
1257 'conditions' => array(
1258 'fields' => array(
1259 array(
1260 'name' => '_cartflows_pinterest[pinterest_tag_tracking]',
1261 'operator' => '===',
1262 'value' => 'enable',
1263 ),
1264 ),
1265 ),
1266 'backComp' => true,
1267 /* translators: %1$1s: link html start, %2$2s: link html end */
1268 'desc' => sprintf( __( 'This setting enables a consent notice for Pinterest Tag tracking on your website. For more information check %1$1sPinterest documentation%2$2s.', 'cartflows' ), '<a href="https://help.pinterest.com/en/business/article/install-the-base-code" target="_blank">', '</a>' ),
1269 ),
1270 'pinterest-consent-separator' => array(
1271 'type' => 'separator',
1272 'conditions' => array(
1273 'fields' => array(
1274 array(
1275 'name' => '_cartflows_pinterest[pinterest_tag_tracking]',
1276 'operator' => '===',
1277 'value' => 'enable',
1278 ),
1279 ),
1280 ),
1281 ),
1282 'pinterest-event-heading' => array(
1283 'type' => 'heading',
1284 'label' => __( 'Pinterest Events', 'cartflows' ),
1285 'conditions' => array(
1286 'fields' => array(
1287 array(
1288 'name' => '_cartflows_pinterest[pinterest_tag_tracking]',
1289 'operator' => '===',
1290 'value' => 'enable',
1291 ),
1292 ),
1293 ),
1294 ),
1295 'pinterest-event-begin-checkout' => array(
1296 'type' => 'checkbox',
1297 'label' => __( 'Begin Checkout', 'cartflows' ),
1298 'name' => '_cartflows_pinterest[enable_pinterest_begin_checkout]',
1299 'conditions' => array(
1300 'fields' => array(
1301 array(
1302 'name' => '_cartflows_pinterest[pinterest_tag_tracking]',
1303 'operator' => '===',
1304 'value' => 'enable',
1305 ),
1306 ),
1307 ),
1308 'backComp' => true,
1309 ),
1310 'pinterest-event-add-to-cart' => array(
1311 'type' => 'checkbox',
1312 'label' => __( 'Add To Cart', 'cartflows' ),
1313 'name' => '_cartflows_pinterest[enable_pinterest_add_to_cart]',
1314 'conditions' => array(
1315 'fields' => array(
1316 array(
1317 'name' => '_cartflows_pinterest[pinterest_tag_tracking]',
1318 'operator' => '===',
1319 'value' => 'enable',
1320 ),
1321 ),
1322 ),
1323 'backComp' => true,
1324 ),
1325 'pinterest-event-payment-info' => array(
1326 'type' => 'checkbox',
1327 'label' => __( 'Add Payment Info', 'cartflows' ),
1328 'name' => '_cartflows_pinterest[enable_pinterest_add_payment_info]',
1329 'conditions' => array(
1330 'fields' => array(
1331 array(
1332 'name' => '_cartflows_pinterest[pinterest_tag_tracking]',
1333 'operator' => '===',
1334 'value' => 'enable',
1335 ),
1336 ),
1337 ),
1338 'backComp' => true,
1339 'is_pro' => true,
1340 ),
1341 'pinterest-event-purchase-complete' => array(
1342 'type' => 'checkbox',
1343 'label' => __( 'Purchase', 'cartflows' ),
1344 'name' => '_cartflows_pinterest[enable_pinterest_purchase_event]',
1345 'conditions' => array(
1346 'fields' => array(
1347 array(
1348 'name' => '_cartflows_pinterest[pinterest_tag_tracking]',
1349 'operator' => '===',
1350 'value' => 'enable',
1351 ),
1352 ),
1353 ),
1354 'backComp' => true,
1355 ),
1356 'pinterest-event-signup' => array(
1357 'type' => 'checkbox',
1358 'label' => __( 'Signup', 'cartflows' ),
1359 'name' => '_cartflows_pinterest[enable_pinterest_signup]',
1360 'conditions' => array(
1361 'fields' => array(
1362 array(
1363 'name' => '_cartflows_pinterest[pinterest_tag_tracking]',
1364 'operator' => '===',
1365 'value' => 'enable',
1366 ),
1367 ),
1368 ),
1369 'backComp' => true,
1370 'tooltip' => __( 'Signup event will be triggered for optin page.', 'cartflows' ),
1371 'is_pro' => true,
1372 ),
1373 'pinterest-event-lead-info' => array(
1374 'type' => 'checkbox',
1375 'label' => __( 'Optin Lead', 'cartflows' ),
1376 'name' => '_cartflows_pinterest[enable_pinterest_optin_lead]',
1377 'conditions' => array(
1378 'fields' => array(
1379 array(
1380 'name' => '_cartflows_pinterest[pinterest_tag_tracking]',
1381 'operator' => '===',
1382 'value' => 'enable',
1383 ),
1384 ),
1385 ),
1386 'backComp' => true,
1387 'tooltip' => __( 'Optin Lead event will be triggered for optin page.', 'cartflows' ),
1388 'is_pro' => true,
1389 ),
1390 ),
1391 ),
1392 'other' => array(
1393 'title' => '',
1394 'description' => __( 'Advanced utilities for regenerating assets and resetting state.', 'cartflows' ),
1395 'fields' => array(
1396 'weekly-report-separator' => array(
1397 'type' => 'separator',
1398 ),
1399 'enable_weekly_emails' => array(
1400 'type' => 'toggle',
1401 'name' => 'cartflows_stats_report_emails',
1402 'label' => __( 'Enable Store Report Email.', 'cartflows' ),
1403 'backComp' => true,
1404 /* translators: %1$1s: link html start, %2$12: link html end*/
1405 'desc' => __( 'If enabled, you will receive the weekly report emails of your store for the revenue stats generated by CartFlows.', 'cartflows' ),
1406 ),
1407 'email_id_for_weekly_emails' => array(
1408 'type' => 'textarea',
1409 'rows' => 2,
1410 'cols' => 38,
1411 'name' => 'cartflows_stats_report_email_ids',
1412 'label' => __( 'Email Address', 'cartflows' ),
1413 'desc' => __( 'Email address to receive the weekly sales report emails. For multiple emails, add each email address per line.', 'cartflows' ),
1414 'conditions' => array(
1415 'fields' => array(
1416 array(
1417 'name' => 'cartflows_stats_report_emails',
1418 'operator' => '===',
1419 'value' => 'enable',
1420 ),
1421 ),
1422 ),
1423 ),
1424 'non-sensitive-data-analytics-separator' => array(
1425 'type' => 'separator',
1426 ),
1427 'non-sensitive-data-analytics' => array(
1428 'type' => 'toggle',
1429 'name' => 'cf_usage_optin',
1430 'label' => __( 'Help Us Improve Your Experience', 'cartflows' ),
1431 /* translators: %1$1s: link html start, %2$12: link html end*/
1432 'desc' => sprintf( __( 'Collect non-sensitive information from your website, such as the PHP version and features used, to help us fix bugs faster, make smarter decisions, and build features that actually matter to you. %1$1s Learn More%2$2s.', 'cartflows' ), '<a href="' . esc_url( \Cartflows_Helper::get_kb_doc_link( 'https://my.cartflows.com/usage-tracking/' ) ) . '" target="_blank">', '</a>' ),
1433 ),
1434 'delete-data-separator' => array(
1435 'type' => 'separator',
1436 ),
1437 'delete_data' => array(
1438 'type' => 'toggle',
1439 'name' => 'cartflows_delete_plugin_data',
1440 'label' => __( 'Delete plugin data on plugin deletion', 'cartflows' ),
1441 'backComp' => true,
1442 'notice' => array(
1443 'type' => 'prompt',
1444 'check' => 'delete',
1445 'message' => __( 'Are you sure? Do you want to delete plugin data while deleting the plugin? Type "DELETE" to confirm!', 'cartflows' ),
1446 ),
1447 /* translators: %1$1s: link html start, %2$12: link html end*/
1448 'desc' => sprintf( __( 'This option will delete all the CartFlows options data on plugin deletion. If you enable this and deletes the plugin, you can\'t restore your saved data. To learn more, %1$1s Click here %2$2s.', 'cartflows' ), '<a href="' . esc_url( \Cartflows_Helper::get_kb_doc_link( 'https://cartflows.com/docs/delete-plugin-data-while-uninstalling-plugin/' ) ) . '" target="_blank">', '</a>' ),
1449 ),
1450 'legacy-admin-separator' => array(
1451 'type' => 'separator',
1452 ),
1453 'cartflows-legacy-admin' => array(
1454 'type' => 'toggle',
1455 'name' => 'cartflows-legacy-admin',
1456 'label' => __( 'Use Legacy CartFlows UI', 'cartflows' ),
1457 'backComp' => true,
1458 'notice' => array(
1459 'type' => 'confirm',
1460 'message' => __( 'Switch back to the legacy CartFlows admin? The page will reload into the legacy dashboard. You can return to the new UI anytime from the notice shown there.', 'cartflows' ),
1461 ),
1462 'desc' => __( 'Restore the pre-3.0 CartFlows admin interface. Save settings to apply — the dashboard will reload in the legacy UI.', 'cartflows' ),
1463 ),
1464 ),
1465 ),
1466 'user_role_manager' => array(
1467 'title' => '',
1468 'description' => __( 'Choose which user roles can access and manage CartFlows.', 'cartflows' ),
1469 'roles' => (
1470 $all_roles
1471 ),
1472 ),
1473 'webhooks' => array(
1474 'title' => '',
1475 'description' => __( 'Send funnel events to third-party services via HTTP callbacks.', 'cartflows' ),
1476 ),
1477 'automations' => array(
1478 'title' => '',
1479 'description' => __( 'Manage automation rules that run when events occur in your funnels.', 'cartflows' ),
1480 ),
1481 'integrations' => array(
1482 'title' => '',
1483 'description' => __( 'Connect analytics and advertising pixels to track funnel performance.', 'cartflows' ),
1484 ),
1485 'offer' => array(
1486 'title' => '',
1487 'description' => __( 'Control how upsell and downsell offer orders are created alongside the main order.', 'cartflows' ),
1488 ),
1489 'global_scripts' => array(
1490 'title' => '',
1491 'description' => __( 'Add custom CSS and JavaScript that loads on every CartFlows step.', 'cartflows' ),
1492 'fields' => array(
1493 'global_js' => array(
1494 'type' => 'code',
1495 'display_align' => 'vertical',
1496 'name' => '_cartflows_global_scripts[global_js]',
1497 'label' => __( 'Global JavaScript', 'cartflows' ),
1498 'language' => 'javascript',
1499 'tooltip' => __( 'Any JavaScript added here will run across all funnels. Do not include script tags.', 'cartflows' ),
1500 ),
1501 'global_js_seperator' => array(
1502 'type' => 'separator',
1503 ),
1504 'global_css' => array(
1505 'type' => 'code',
1506 'display_align' => 'vertical',
1507 'name' => '_cartflows_global_scripts[global_css]',
1508 'label' => __( 'Global CSS', 'cartflows' ),
1509 'language' => 'css',
1510 'tooltip' => __( 'Any CSS added here will run across all funnels. Do not include style tags.', 'cartflows' ),
1511 ),
1512 ),
1513 ),
1514
1515 );
1516
1517 $settings = apply_filters( 'cartflows_admin_global_settings_data', $settings );
1518
1519 return $settings;
1520 }
1521 }
1522