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

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

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