PluginProbe
ShopBuilder – WooCommerce Builder For Elementor / 2.0.0
ShopBuilder – WooCommerce Builder For Elementor v2.0.0
3.4.2 3.4.1 3.4.0 2.0.1 2.0.2 2.0.3 2.1.0 2.1.1 2.1.10 2.1.11 2.1.12 2.1.13 2.1.14 2.1.15 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 2.2.0 2.2.1 2.2.2 All 63 releases
shopbuilder / app / Models / GeneralList.php

GeneralList.php in ShopBuilder – WooCommerce Builder For Elementor 2.0.0, at app/Models/GeneralList.php

1,351 lines 45.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace RadiusTheme\SB\Models;
4
5 // use RadiusTheme\SB\Helpers\Fns;
6 use RadiusTheme\SB\Elementor\Helper\ControlHelper;
7 use RadiusTheme\SB\Helpers\Fns;
8 use RadiusTheme\SB\Models\Base\ListModel;
9 use RadiusTheme\SB\Traits\SingletonTrait;
10
11 defined( 'ABSPATH' ) || exit;
12
13 /**
14 * General Settings.
15 */
16 class GeneralList extends ListModel {
17 /**
18 * Singleton
19 */
20 use SingletonTrait;
21
22 /**
23 * List Id
24 *
25 * @var string
26 */
27 protected $list_id = 'general';
28
29 /**
30 * Constructor
31 */
32 public function __construct() {
33 parent::__construct();
34 $this->title = esc_html__( 'Global Settings', 'shopbuilder' );
35 $this->description = esc_html__( 'ShopBuilder global settings for various elements.', 'shopbuilder' );
36 $this->categories = [
37 'general' => [
38 'title' => esc_html__( 'General', 'shopbuilder' ),
39 ],
40
41 'checkout' => [
42 'title' => esc_html__( 'Checkout Page', 'shopbuilder' ),
43 ],
44
45 ];
46 }
47
48 /**
49 * Package
50 *
51 * @return array
52 */
53 protected function raw_list() {
54 $list = [
55 'notification' => apply_filters(
56 'rtsb/settings/notification/options',
57 [
58 'id' => 'notification',
59 'category' => 'general',
60 'title' => esc_html__( 'Notification Settings', 'shopbuilder' ),
61 'package' => 'free',
62 'active_field' => [
63 'disable' => true,
64 ],
65 'fields' => [
66 'notification_position' => [
67 'id' => 'notification_position',
68 'value' => 'center-center',
69 'type' => 'select',
70 'label' => esc_html__( 'Notification Position', 'shopbuilder' ),
71 'options' => [
72 'center-center' => esc_html__( 'Center Center', 'shopbuilder' ),
73 'top-right' => esc_html__( 'Top Right', 'shopbuilder' ),
74 'bottom-right' => esc_html__( 'Bottom Right', 'shopbuilder' ),
75 'bottom-left' => esc_html__( 'Bottom Left', 'shopbuilder' ),
76 'top-left' => esc_html__( 'Top Left', 'shopbuilder' ),
77 'top-full-width' => esc_html__( 'Top Full Width', 'shopbuilder' ),
78 'bottom-full-width' => esc_html__( 'Bottom Full Width', 'shopbuilder' ),
79 'top-center' => esc_html__( 'Top center', 'shopbuilder' ),
80 'bottom-center' => esc_html__( 'Bottom center', 'shopbuilder' ),
81 ],
82 ],
83 'notification_color' => [
84 'id' => 'notification_color',
85 'label' => esc_html__( 'Text Color', 'shopbuilder' ),
86 'type' => 'color',
87 'tab' => 'floating_button',
88 ],
89 'notification_btn_color' => [
90 'id' => 'notification_color',
91 'label' => esc_html__( 'Button Color', 'shopbuilder' ),
92 'type' => 'color',
93 'tab' => 'floating_button',
94 ],
95 'notification_bg' => [
96 'id' => 'notification_bg',
97 'label' => esc_html__( 'Background Color', 'shopbuilder' ),
98 'type' => 'color',
99 'tab' => 'floating_button',
100 ],
101
102 ],
103 ],
104 ),
105 'social_share' => apply_filters(
106 'rtsb/settings/social_share/options',
107 [
108 'id' => 'social_share',
109 'category' => 'general',
110 'title' => esc_html__( 'Social Share Settings', 'shopbuilder' ),
111 'package' => 'free',
112 'active_field' => [
113 'disable' => true,
114 ],
115 'fields' => [
116 'share_platforms' => [
117 'id' => 'share_platforms',
118 'label' => esc_html__( 'Select Social Sharing Platforms', 'shopbuilder' ),
119 'type' => 'checkbox',
120 'orientation' => 'vertical',
121 'value' => [ 'facebook', 'twitter', 'linkedin' ],
122 'options' => Fns::social_share_platforms_list(),
123 ],
124 'share_platforms_to_product_page' => [
125 'id' => 'share_platforms_to_product_page',
126 'type' => 'switch',
127 'label' => esc_html__( 'Sharing Button in Single Product Page', 'shopbuilder' ),
128 'help' => esc_html__( 'Enable this option to allow share a product from product page. Woocommerce Supported Sharing plugins added to Hook: woocommerce_share', 'shopbuilder' ),
129 ],
130 /*
131 * TODO : Implement later.
132 'share_icon_show_to_product_page' => array(
133 'id' => 'share_icon_show_to_product_page',
134 'type' => 'switch',
135 'label' => esc_html__( 'Sharing Icon in Single Product Page', 'shopbuilder' ),
136 'dependency' => [
137 'rules' => [
138 [
139 'item' => 'general.social_share.share_platforms_to_product_page',
140 'value' => 'on',
141 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
142 ],
143 ],
144 ],
145 ),
146 */
147 'share_icon_layout' => [
148 'type' => 'select',
149 'value' => 'share-layout1',
150 'label' => esc_html__( 'Share Button Layout', 'shopbuilder' ),
151 'options' => [
152 'share-layout1' => esc_html__( 'Layout 1', 'shopbuilder' ),
153 'share-layout2' => esc_html__( 'Layout 2', 'shopbuilder' ),
154 ],
155 'dependency' => [
156 'rules' => [
157 [
158 'item' => 'general.social_share.share_platforms_to_product_page',
159 'value' => 'on',
160 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
161 ],
162 ],
163 ],
164 ],
165 ],
166 ],
167 ),
168 'tooltip' => apply_filters(
169 'rtsb/settings/tooltip/options',
170 [
171 'id' => 'tooltip',
172 'category' => 'general',
173 'title' => esc_html__( 'Tooltip Settings', 'shopbuilder' ),
174 'package' => $this->pro_package(),
175 'active_field' => [
176 'disable' => true,
177 ],
178 ],
179 ),
180 'billing_form' => apply_filters(
181 'rtsb/settings/billing_form/options',
182 [
183 'id' => 'billing_form',
184 'category' => 'checkout',
185 'title' => esc_html__( 'Billing Form Settings', 'shopbuilder' ),
186 'package' => 'free',
187 'active_field' => [
188 'label' => esc_html__( 'Enable Billing form settings?', 'shopbuilder' ),
189 'help' => esc_html__( 'Switch on to Billing form settings.', 'shopbuilder' ),
190 ],
191 'fields' => [
192 'billing_first_name_heading' => [
193 'id' => 'billing_first_name_heading',
194 'type' => 'title',
195 'label' => esc_html__( 'First Name', 'shopbuilder' ),
196 // 'tab' => 'name',
197 ],
198 'billing_first_name' => [
199 'id' => 'billing_first_name',
200 'label' => esc_html__( 'First name', 'shopbuilder' ),
201 'type' => 'checkbox',
202 'orientation' => 'vertical',
203 'value' => [ 'show', 'required' ],
204 'options' => [
205 [
206 'value' => 'show',
207 'label' => 'Show First name?',
208 ],
209 [
210 'value' => 'required',
211 'label' => 'Required Field',
212 ],
213 ],
214 // 'tab' => 'name',
215 ],
216 'billing_first_name_label' => [
217 'id' => 'billing_first_name_label',
218 'label' => esc_html__( 'First name Label', 'shopbuilder' ),
219 'type' => 'text',
220 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
221 // 'tab' => 'name',
222 'dependency' => [
223 'rules' => [
224 [
225 'item' => 'general.billing_form.billing_first_name',
226 'value' => 'show',
227 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
228 ],
229 ],
230 ],
231 ],
232 'billing_first_name_placeholder' => [
233 'id' => 'billing_first_name_placeholder',
234 'label' => esc_html__( 'First name Placeholder', 'shopbuilder' ),
235 'type' => 'text',
236 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
237 // 'tab' => 'name',
238 'dependency' => [
239 'rules' => [
240 [
241 'item' => 'general.billing_form.billing_first_name',
242 'value' => 'show',
243 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
244 ],
245 ],
246 ],
247 ],
248
249 'billing_last_name_heading' => [
250 'id' => 'billing_last_name_heading',
251 'type' => 'title',
252 'label' => esc_html__( 'Last Name', 'shopbuilder' ),
253 //'tab' => 'name',
254 ],
255 'billing_last_name' => [
256 'id' => 'billing_last_name',
257 'label' => esc_html__( 'Last name', 'shopbuilder' ),
258 'type' => 'checkbox',
259 'orientation' => 'vertical',
260 'value' => [ 'show', 'required' ],
261 'options' => [
262 [
263 'value' => 'show',
264 'label' => 'Show Last name?',
265 ],
266 [
267 'value' => 'required',
268 'label' => 'Required Field',
269 ],
270 ],
271 // 'tab' => 'name',
272 ],
273
274 'billing_last_name_label' => [
275 'id' => 'billing_last_name_label',
276 'label' => esc_html__( 'Last name label', 'shopbuilder' ),
277 'type' => 'text',
278 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
279 // 'tab' => 'name',
280 'dependency' => [
281 'rules' => [
282 [
283 'item' => 'general.billing_form.billing_last_name',
284 'value' => 'show',
285 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
286 ],
287 ],
288 ],
289 ],
290 'billing_last_name_placeholder' => [
291 'id' => 'billing_last_name_placeholder',
292 'label' => esc_html__( 'Last name Placeholder', 'shopbuilder' ),
293 'type' => 'text',
294 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
295 // 'tab' => 'name',
296 'dependency' => [
297 'rules' => [
298 [
299 'item' => 'general.billing_form.billing_last_name',
300 'value' => 'show',
301 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
302 ],
303 ],
304 ],
305 ],
306
307 'billing_company_heading' => [
308 'id' => 'billing_company_heading',
309 'type' => 'title',
310 'label' => esc_html__( 'Company', 'shopbuilder' ),
311 //'tab' => 'company',
312 ],
313 'billing_company' => [
314 'id' => 'billing_company',
315 'label' => esc_html__( 'Company name', 'shopbuilder' ),
316 'type' => 'checkbox',
317 'orientation' => 'vertical',
318 'value' => [
319 'show',
320 'required' === get_option( 'woocommerce_checkout_company_field', 'optional' ) ? 'required' : 'optional',
321 ],
322 'options' => [
323 [
324 'value' => 'show',
325 'label' => 'Show company name?',
326 ],
327 [
328 'value' => 'required',
329 'label' => 'Required Field',
330 ],
331 ],
332 // 'tab' => 'company',
333 ],
334
335 'billing_company_label' => [
336 'id' => 'billing_company_label',
337 'label' => esc_html__( 'Company label', 'shopbuilder' ),
338 'type' => 'text',
339 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
340 // 'tab' => 'company',
341 'dependency' => [
342 'rules' => [
343 [
344 'item' => 'general.billing_form.billing_company',
345 'value' => 'show',
346 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
347 ],
348 ],
349 ],
350 ],
351 'billing_company_placeholder' => [
352 'id' => 'billing_company_placeholder',
353 'label' => esc_html__( 'Company Placeholder', 'shopbuilder' ),
354 'type' => 'text',
355 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
356 // 'tab' => 'company',
357 'dependency' => [
358 'rules' => [
359 [
360 'item' => 'general.billing_form.billing_company',
361 'value' => 'show',
362 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
363 ],
364 ],
365 ],
366 ],
367
368 'billing_country_heading' => [
369 'id' => 'billing_country_heading',
370 'type' => 'title',
371 'label' => esc_html__( 'Country', 'shopbuilder' ),
372 //'tab' => 'country',
373 ],
374 'billing_country' => [
375 'id' => 'billing_country',
376 'label' => esc_html__( 'Country', 'shopbuilder' ),
377 'type' => 'checkbox',
378 'orientation' => 'vertical',
379 'value' => [ 'show', 'required' ],
380 'options' => [
381 [
382 'value' => 'show',
383 'label' => 'Show Country?',
384 // 'disabled' => true,
385 ],
386 [
387 'value' => 'required',
388 'label' => 'Required Field',
389 // 'disabled' => true,
390 ],
391 ],
392 // 'tab' => 'country',
393 ],
394
395 'billing_country_label' => [
396 'id' => 'billing_country_label',
397 'label' => esc_html__( 'Country label', 'shopbuilder' ),
398 'type' => 'text',
399 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
400 // 'tab' => 'country',
401 'dependency' => [
402 'rules' => [
403 [
404 'item' => 'general.billing_form.billing_country',
405 'value' => 'show',
406 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
407 ],
408 ],
409 ],
410 ],
411 'billing_address_1_heading' => [
412 'id' => 'billing_address_1_heading',
413 'type' => 'title',
414 'label' => esc_html__( 'Address 1', 'shopbuilder' ),
415 //'tab' => 'address',
416 ],
417 'billing_address_1' => [
418 'id' => 'billing_address_1',
419 'label' => esc_html__( 'Address 1', 'shopbuilder' ),
420 'type' => 'checkbox',
421 'orientation' => 'vertical',
422 'value' => [ 'show', 'required' ],
423 'options' => [
424 [
425 'value' => 'show',
426 'label' => 'Show Address field?',
427 ],
428 [
429 'value' => 'required',
430 'label' => 'Required Field',
431 ],
432 ],
433 // 'tab' => 'address',
434 ],
435
436 'billing_address_1_label' => [
437 'id' => 'billing_address_1_label',
438 'label' => esc_html__( 'Address 1 label', 'shopbuilder' ),
439 'type' => 'text',
440 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
441 // 'tab' => 'address',
442 'dependency' => [
443 'rules' => [
444 [
445 'item' => 'general.billing_form.billing_address_1',
446 'value' => 'show',
447 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
448 ],
449 ],
450 ],
451 ],
452 'billing_address_1_placeholder' => [
453 'id' => 'billing_address_1_placeholder',
454 'label' => esc_html__( 'Address 1 Placeholder', 'shopbuilder' ),
455 'type' => 'text',
456 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
457 // 'tab' => 'address',
458 'dependency' => [
459 'rules' => [
460 [
461 'item' => 'general.billing_form.billing_address_1',
462 'value' => 'show',
463 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
464 ],
465 ],
466 ],
467 ],
468 'billing_address_2_heading' => [
469 'id' => 'billing_address_2_heading',
470 'type' => 'title',
471 'label' => esc_html__( 'Address 2', 'shopbuilder' ),
472 //'tab' => 'address',
473 'dependency' => [
474 'rules' => [
475 [
476 'item' => 'general.billing_form.billing_address_1',
477 'value' => 'show',
478 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
479 ],
480 ],
481 ],
482 ],
483 'billing_address_2' => [
484 'id' => 'billing_address_2',
485 'label' => esc_html__( 'Address 2', 'shopbuilder' ),
486 'type' => 'checkbox',
487 'orientation' => 'vertical',
488 // 'tab' => 'address',
489 'value' => [ 'show',
490 'required' === get_option( 'woocommerce_checkout_address_2_field', 'optional' ) ? 'required' : 'optional',
491 ],
492 'options' => [
493 [
494 'value' => 'show',
495 'label' => 'Show Address field?',
496 ],
497 ],
498 'help' => esc_html__( 'if "Address 1" is hidden then this field also hides.', 'shopbuilder' ),
499 'dependency' => [
500 'rules' => [
501 [
502 'item' => 'general.billing_form.billing_address_1',
503 'value' => 'show',
504 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
505 ],
506 ],
507 ],
508 ],
509
510 'billing_address_2_label' => [
511 'id' => 'billing_address_2_label',
512 'label' => esc_html__( 'Address 2 label', 'shopbuilder' ),
513 'type' => 'text',
514 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
515 // 'tab' => 'address',
516 'dependency' => [
517 'rules' => [
518 [
519 'item' => 'general.billing_form.billing_address_1',
520 'value' => 'show',
521 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
522 ],
523 [
524 'item' => 'general.billing_form.billing_address_2',
525 'value' => 'show',
526 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
527 ],
528 ],
529 ],
530 ],
531 'billing_address_2_placeholder' => [
532 'id' => 'billing_address_2_placeholder',
533 'label' => esc_html__( 'Address 2 Placeholder', 'shopbuilder' ),
534 'type' => 'text',
535 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
536 // 'tab' => 'address',
537 'dependency' => [
538 'rules' => [
539 [
540 'item' => 'general.billing_form.billing_address_1',
541 'value' => 'show',
542 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
543 ],
544 [
545 'item' => 'general.billing_form.billing_address_2',
546 'value' => 'show',
547 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
548 ],
549 ],
550 ],
551 ],
552 'billing_city_heading' => [
553 'id' => 'billing_city_heading',
554 'type' => 'title',
555 'label' => esc_html__( 'Town / City', 'shopbuilder' ),
556 // 'tab' => 'city',
557 ],
558 'billing_city' => [
559 'id' => 'billing_city',
560 'label' => esc_html__( 'Town / City', 'shopbuilder' ),
561 'type' => 'checkbox',
562 'orientation' => 'vertical',
563 'value' => [ 'show', 'required' ],
564 // 'tab' => 'city',
565 'options' => [
566 [
567 'value' => 'show',
568 'label' => 'Show Town / City?',
569 ],
570 [
571 'value' => 'required',
572 'label' => 'Required Field',
573 ],
574 ],
575
576 ],
577 'billing_city_label' => [
578 'id' => 'billing_city_label',
579 'label' => esc_html__( 'Town / City label', 'shopbuilder' ),
580 'type' => 'text',
581 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
582 // 'tab' => 'city',
583 'dependency' => [
584 'rules' => [
585 [
586 'item' => 'general.billing_form.billing_city',
587 'value' => 'show',
588 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
589 ],
590 ],
591 ],
592 ],
593 'billing_city_placeholder' => [
594 'id' => 'billing_city_placeholder',
595 'label' => esc_html__( 'City placeholder', 'shopbuilder' ),
596 'type' => 'text',
597 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
598 // 'tab' => 'city',
599 'dependency' => [
600 'rules' => [
601 [
602 'item' => 'general.billing_form.billing_city',
603 'value' => 'show',
604 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
605 ],
606 ],
607 ],
608 ],
609 'billing_state_heading' => [
610 'id' => 'billing_city_heading',
611 'type' => 'title',
612 'label' => esc_html__( 'State', 'shopbuilder' ),
613 // 'tab' => 'state',
614 ],
615 'billing_state' => [
616 'id' => 'billing_state',
617 'label' => esc_html__( 'State', 'shopbuilder' ),
618 'type' => 'checkbox',
619 'orientation' => 'vertical',
620 'value' => [ 'show', 'required' ],
621 'options' => [
622 [
623 'value' => 'show',
624 'label' => 'Show State?',
625 ],
626 [
627 'value' => 'required',
628 'label' => 'Required Field',
629 ],
630 ],
631 // 'tab' => 'state',
632 ],
633
634 'billing_state_label' => [
635 'id' => 'billing_state_label',
636 'label' => esc_html__( 'State label', 'shopbuilder' ),
637 'type' => 'text',
638 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
639 // 'tab' => 'state',
640 'dependency' => [
641 'rules' => [
642 [
643 'item' => 'general.billing_form.billing_state',
644 'value' => 'show',
645 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
646 ],
647 ],
648 ],
649 ],
650 'billing_postcode_heading' => [
651 'id' => 'billing_postcode_heading',
652 'type' => 'title',
653 'label' => esc_html__( 'Postcode / ZIP', 'shopbuilder' ),
654 // 'tab' => 'postcode',
655 ],
656 'billing_postcode' => [
657 'id' => 'billing_postcode',
658 'label' => esc_html__( 'Postcode / ZIP', 'shopbuilder' ),
659 'type' => 'checkbox',
660 'orientation' => 'vertical',
661 'value' => [ 'show', 'required' ],
662 'options' => [
663 [
664 'value' => 'show',
665 'label' => 'Show Postcode / ZIP?',
666 ],
667 [
668 'value' => 'required',
669 'label' => 'Required Field',
670 ],
671 ],
672 // 'tab' => 'postcode',
673 ],
674 'billing_postcode_label' => [
675 'id' => 'billing_postcode_label',
676 'label' => esc_html__( 'Postcode / ZIP label', 'shopbuilder' ),
677 'type' => 'text',
678 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
679 // 'tab' => 'postcode',
680 'dependency' => [
681 'rules' => [
682 [
683 'item' => 'general.billing_form.billing_postcode',
684 'value' => 'show',
685 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
686 ],
687 ],
688 ],
689 ],
690 'billing_postcode_placeholder' => [
691 'id' => 'billing_postcode_placeholder',
692 'label' => esc_html__( 'Postcode / ZIP placeholder', 'shopbuilder' ),
693 'type' => 'text',
694 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
695 // 'tab' => 'postcode',
696 'dependency' => [
697 'rules' => [
698 [
699 'item' => 'general.billing_form.billing_postcode',
700 'value' => 'show',
701 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
702 ],
703 ],
704 ],
705 ],
706 'billing_phone_heading' => [
707 'id' => 'billing_phone_heading',
708 'type' => 'title',
709 'label' => esc_html__( 'Phone', 'shopbuilder' ),
710 // 'tab' => 'phone',
711 ],
712 'billing_phone' => [
713 'id' => 'billing_phone',
714 'label' => esc_html__( 'Phone', 'shopbuilder' ),
715 'type' => 'checkbox',
716 'orientation' => 'vertical',
717 // 'tab' => 'phone',
718 'value' => [
719 'show',
720 'required' === get_option( 'woocommerce_checkout_phone_field', 'required' ) ? 'required' : 'optional',
721 ],
722 'options' => [
723 [
724 'value' => 'show',
725 'label' => 'Show Phone Field?',
726 ],
727 [
728 'value' => 'required',
729 'label' => 'Required Field',
730 ],
731 ],
732
733 ],
734 'billing_phone_label' => [
735 'id' => 'billing_phone_label',
736 'label' => esc_html__( 'Phone field label', 'shopbuilder' ),
737 'type' => 'text',
738 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
739 // 'tab' => 'phone',
740 'dependency' => [
741 'rules' => [
742 [
743 'item' => 'general.billing_form.billing_phone',
744 'value' => 'show',
745 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
746 ],
747 ],
748 ],
749 ],
750 'billing_phone_placeholder' => [
751 'id' => 'billing_phone_placeholder',
752 'label' => esc_html__( 'Phone field placeholder', 'shopbuilder' ),
753 'type' => 'text',
754 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
755 // 'tab' => 'phone',
756 'dependency' => [
757 'rules' => [
758 [
759 'item' => 'general.billing_form.billing_phone',
760 'value' => 'show',
761 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
762 ],
763 ],
764 ],
765 ],
766 'billing_email_heading' => [
767 'id' => 'billing_email_heading',
768 'type' => 'title',
769 'label' => esc_html__( 'Email', 'shopbuilder' ),
770 // 'tab' => 'email',
771 ],
772 'billing_email' => [
773 'id' => 'billing_email',
774 'label' => esc_html__( 'Email address', 'shopbuilder' ),
775 'type' => 'checkbox',
776 'orientation' => 'vertical',
777 // 'tab' => 'email',
778 'value' => [ 'show', 'required' ],
779 'options' => [
780 [
781 'value' => 'show',
782 'label' => 'Show Email address Field?',
783 ],
784 [
785 'value' => 'required',
786 'label' => 'Required Field',
787 ],
788 ],
789 ],
790 'billing_email_label' => [
791 'id' => 'billing_email_label',
792 'label' => esc_html__( 'Email address field label', 'shopbuilder' ),
793 'type' => 'text',
794 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
795 // 'tab' => 'email',
796 'dependency' => [
797 'rules' => [
798 [
799 'item' => 'general.billing_form.billing_email',
800 'value' => 'show',
801 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
802 ],
803 ],
804 ],
805 ],
806 'billing_email_placeholder' => [
807 'id' => 'billing_email_placeholder',
808 'label' => esc_html__( 'Email address field placeholder', 'shopbuilder' ),
809 'type' => 'text',
810 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
811 // 'tab' => 'email',
812 'dependency' => [
813 'rules' => [
814 [
815 'item' => 'general.billing_form.billing_email',
816 'value' => 'show',
817 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
818 ],
819 ],
820 ],
821 ],
822 ],
823
824 ]
825 ),
826 'shipping_form' => apply_filters(
827 'rtsb/module/shipping_form/options',
828 [
829 'id' => 'shipping_form',
830 'category' => 'checkout',
831 'title' => esc_html__( 'Shipping Form Settings', 'shopbuilder' ),
832 'package' => 'free',
833 'active_field' => [
834 'label' => esc_html__( 'Enable Shipping form settings?', 'shopbuilder' ),
835 'help' => esc_html__( 'Switch on to Shipping form settings.', 'shopbuilder' ),
836 ],
837 'fields' => [
838 'shipping_first_name_heading' => [
839 'id' => 'shipping_first_name_heading',
840 'type' => 'title',
841 'label' => esc_html__( 'First Name', 'shopbuilder' ),
842 // 'tab' => 'name',
843 ],
844 'shipping_first_name' => [
845 'id' => 'shipping_first_name',
846 'label' => esc_html__( 'First name', 'shopbuilder' ),
847 'type' => 'checkbox',
848 'orientation' => 'vertical',
849 'value' => [ 'show', 'required' ],
850 'options' => [
851 [
852 'value' => 'show',
853 'label' => 'Show First name?',
854 ],
855 [
856 'value' => 'required',
857 'label' => 'Required Field',
858 ],
859 ],
860 // 'tab' => 'name',
861 ],
862 'shipping_first_name_label' => [
863 'id' => 'shipping_first_name_label',
864 'label' => esc_html__( 'First name Label', 'shopbuilder' ),
865 'type' => 'text',
866 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
867 // 'tab' => 'name',
868 'dependency' => [
869 'rules' => [
870 [
871 'item' => 'general.shipping_form.shipping_first_name',
872 'value' => 'show',
873 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
874 ],
875 ],
876 ],
877 ],
878 'shipping_first_name_placeholder' => [
879 'id' => 'shipping_first_name_placeholder',
880 'label' => esc_html__( 'First name Placeholder', 'shopbuilder' ),
881 'type' => 'text',
882 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
883 // 'tab' => 'country',
884 'dependency' => [
885 'rules' => [
886 [
887 'item' => 'general.shipping_form.shipping_first_name',
888 'value' => 'show',
889 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
890 ],
891 ],
892 ],
893 ],
894 'shipping_first_last_heading' => [
895 'id' => 'shipping_first_last_heading',
896 'type' => 'title',
897 'label' => esc_html__( 'Last Name', 'shopbuilder' ),
898 // 'tab' => 'name',
899 ],
900 'shipping_last_name' => [
901 'id' => 'shipping_last_name',
902 'label' => esc_html__( 'Last name', 'shopbuilder' ),
903 'type' => 'checkbox',
904 'orientation' => 'vertical',
905 'value' => [ 'show', 'required' ],
906 'options' => [
907 [
908 'value' => 'show',
909 'label' => 'Show Last name?',
910 ],
911 [
912 'value' => 'required',
913 'label' => 'Required Field',
914 ],
915 ],
916 // 'tab' => 'name',
917 ],
918
919 'shipping_last_name_label' => [
920 'id' => 'shipping_last_name_label',
921 'label' => esc_html__( 'Last name label', 'shopbuilder' ),
922 'type' => 'text',
923 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
924 // 'tab' => 'name',
925 'dependency' => [
926 'rules' => [
927 [
928 'item' => 'general.shipping_form.shipping_last_name',
929 'value' => 'show',
930 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
931 ],
932 ],
933 ],
934 ],
935 'shipping_last_name_placeholder' => [
936 'id' => 'shipping_last_name_placeholder',
937 'label' => esc_html__( 'Last name Placeholder', 'shopbuilder' ),
938 'type' => 'text',
939 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
940 // 'tab' => 'country',
941 'dependency' => [
942 'rules' => [
943 [
944 'item' => 'general.shipping_form.shipping_last_name',
945 'value' => 'show',
946 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
947 ],
948 ],
949 ],
950 ],
951 'shipping_company_heading' => [
952 'id' => 'shipping_company_heading',
953 'type' => 'title',
954 'label' => esc_html__( 'Company', 'shopbuilder' ),
955 // 'tab' => 'name',
956 ],
957 'shipping_company' => [
958 'id' => 'shipping_company',
959 'label' => esc_html__( 'Company name', 'shopbuilder' ),
960 'type' => 'checkbox',
961 'orientation' => 'vertical',
962 'value' => [ 'show', 'required' ],
963 'options' => [
964 [
965 'value' => 'show',
966 'label' => 'Show company name?',
967 ],
968 [
969 'value' => 'required',
970 'label' => 'Required Field',
971 ],
972 ],
973 // 'tab' => 'company',
974 ],
975
976 'shipping_company_label' => [
977 'id' => 'shipping_company_label',
978 'label' => esc_html__( 'Company label', 'shopbuilder' ),
979 'type' => 'text',
980 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
981 // 'tab' => 'company',
982 'dependency' => [
983 'rules' => [
984 [
985 'item' => 'general.shipping_form.shipping_company',
986 'value' => 'show',
987 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
988 ],
989 ],
990 ],
991 ],
992 'shipping_company_placeholder' => [
993 'id' => 'shipping_company_placeholder',
994 'label' => esc_html__( 'Shipping company Placeholder', 'shopbuilder' ),
995 'type' => 'text',
996 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
997 // 'tab' => 'country',
998 'dependency' => [
999 'rules' => [
1000 [
1001 'item' => 'general.shipping_form.shipping_company',
1002 'value' => 'show',
1003 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
1004 ],
1005 ],
1006 ],
1007 ],
1008 'shipping_country_heading' => [
1009 'id' => 'shipping_country_heading',
1010 'type' => 'title',
1011 'label' => esc_html__( 'Country', 'shopbuilder' ),
1012 // 'tab' => 'name',
1013 ],
1014 'shipping_country' => [
1015 'id' => 'shipping_country',
1016 'label' => esc_html__( 'Country', 'shopbuilder' ),
1017 'type' => 'checkbox',
1018 'orientation' => 'vertical',
1019 'value' => [ 'show', 'required' ],
1020 'options' => [
1021 [
1022 'value' => 'show',
1023 'label' => 'Show Country?',
1024 // 'disabled' => true,
1025 ],
1026 [
1027 'value' => 'required',
1028 'label' => 'Required Field',
1029 // 'disabled' => true,
1030 ],
1031 ],
1032 // 'tab' => 'country',
1033 ],
1034
1035 'shipping_country_label' => [
1036 'id' => 'shipping_country_label',
1037 'label' => esc_html__( 'Country label', 'shopbuilder' ),
1038 'type' => 'text',
1039 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
1040 'dependency' => [
1041 'rules' => [
1042 [
1043 'item' => 'general.shipping_form.shipping_country',
1044 'value' => 'show',
1045 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
1046 ],
1047 ],
1048 ],
1049 ],
1050 'shipping_address_1_heading' => [
1051 'id' => 'shipping_address_1_heading',
1052 'type' => 'title',
1053 'label' => esc_html__( 'Address 1', 'shopbuilder' ),
1054 // 'tab' => 'name',
1055 ],
1056 'shipping_address_1' => [
1057 'id' => 'shipping_address_1',
1058 'label' => esc_html__( 'Address 1', 'shopbuilder' ),
1059 'type' => 'checkbox',
1060 'orientation' => 'vertical',
1061 'value' => [ 'show', 'required' ],
1062 'options' => [
1063 [
1064 'value' => 'show',
1065 'label' => 'Show Address field?',
1066 ],
1067 [
1068 'value' => 'required',
1069 'label' => 'Required Field',
1070 ],
1071 ],
1072 // 'tab' => 'country',
1073 ],
1074
1075 'shipping_address_1_label' => [
1076 'id' => 'shipping_address_1_label',
1077 'label' => esc_html__( 'Address 1 label', 'shopbuilder' ),
1078 'type' => 'text',
1079 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
1080 // 'tab' => 'country',
1081 'dependency' => [
1082 'rules' => [
1083 [
1084 'item' => 'general.shipping_form.shipping_address_1',
1085 'value' => 'show',
1086 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
1087 ],
1088 ],
1089 ],
1090 ],
1091 'shipping_address_1_placeholder' => [
1092 'id' => 'shipping_address_1_placeholder',
1093 'label' => esc_html__( 'Address 1 Placeholder', 'shopbuilder' ),
1094 'type' => 'text',
1095 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
1096 // 'tab' => 'country',
1097 'dependency' => [
1098 'rules' => [
1099 [
1100 'item' => 'general.shipping_form.shipping_address_1',
1101 'value' => 'show',
1102 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
1103 ],
1104 ],
1105 ],
1106 ],
1107 'shipping_address_2_heading' => [
1108 'id' => 'shipping_address_2_heading',
1109 'type' => 'title',
1110 'label' => esc_html__( 'Address 2', 'shopbuilder' ),
1111 // 'tab' => 'name',
1112 'dependency' => [
1113 'rules' => [
1114 [
1115 'item' => 'general.shipping_form.shipping_address_1',
1116 'value' => 'show',
1117 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
1118 ],
1119 ],
1120 ],
1121 ],
1122 'shipping_address_2' => [
1123 'id' => 'shipping_address_2',
1124 'label' => esc_html__( 'Address 2', 'shopbuilder' ),
1125 'type' => 'checkbox',
1126 'orientation' => 'vertical',
1127 'value' => [ 'show', 'required' ],
1128 'options' => [
1129 [
1130 'value' => 'show',
1131 'label' => 'Show Address field?',
1132 ],
1133 ],
1134 'help' => esc_html__( 'if "Address 1" is hidden then this field also hides.', 'shopbuilder' ),
1135 // 'tab' => 'country',
1136 'dependency' => [
1137 'rules' => [
1138 [
1139 'item' => 'general.shipping_form.shipping_address_1',
1140 'value' => 'show',
1141 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
1142 ],
1143 ],
1144 ],
1145 ],
1146
1147 'shipping_address_2_label' => [
1148 'id' => 'shipping_address_2_label',
1149 'label' => esc_html__( 'Address 2 label', 'shopbuilder' ),
1150 'type' => 'text',
1151 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
1152 // 'tab' => 'country',
1153 'dependency' => [
1154 'rules' => [
1155 [
1156 'item' => 'general.shipping_form.shipping_address_1',
1157 'value' => 'show',
1158 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
1159 ],
1160 [
1161 'item' => 'general.shipping_form.shipping_address_2',
1162 'value' => 'show',
1163 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
1164 ],
1165 ],
1166 ],
1167 ],
1168 'shipping_address_2_placeholder' => [
1169 'id' => 'shipping_address_2_placeholder',
1170 'label' => esc_html__( 'Address 2 Placeholder', 'shopbuilder' ),
1171 'type' => 'text',
1172 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
1173 // 'tab' => 'country',
1174 'dependency' => [
1175 'rules' => [
1176 [
1177 'item' => 'general.shipping_form.shipping_address_1',
1178 'value' => 'show',
1179 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
1180 ],
1181 [
1182 'item' => 'general.shipping_form.shipping_address_2',
1183 'value' => 'show',
1184 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
1185 ],
1186 ],
1187 ],
1188 ],
1189 'shipping_city_heading' => [
1190 'id' => 'shipping_city_heading',
1191 'type' => 'title',
1192 'label' => esc_html__( 'Town / City', 'shopbuilder' ),
1193 // 'tab' => 'name',
1194 ],
1195 'shipping_city' => [
1196 'id' => 'shipping_city',
1197 'label' => esc_html__( 'Town / City', 'shopbuilder' ),
1198 'type' => 'checkbox',
1199 'orientation' => 'vertical',
1200 'value' => [ 'show', 'required' ],
1201 'options' => [
1202 [
1203 'value' => 'show',
1204 'label' => 'Show Town / City?',
1205 ],
1206 [
1207 'value' => 'required',
1208 'label' => 'Required Field',
1209 ],
1210 ],
1211 // 'tab' => 'country',
1212 ],
1213 'shipping_city_label' => [
1214 'id' => 'shipping_city_label',
1215 'label' => esc_html__( 'Town / City label', 'shopbuilder' ),
1216 'type' => 'text',
1217 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
1218 // 'tab' => 'country',
1219 'dependency' => [
1220 'rules' => [
1221 [
1222 'item' => 'general.shipping_form.shipping_city',
1223 'value' => 'show',
1224 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
1225 ],
1226 ],
1227 ],
1228 ],
1229 'shipping_city_placeholder' => [
1230 'id' => 'shipping_city_placeholder',
1231 'label' => esc_html__( 'Shipping city placeholder', 'shopbuilder' ),
1232 'type' => 'text',
1233 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
1234 // 'tab' => 'country',
1235 'dependency' => [
1236 'rules' => [
1237 [
1238 'item' => 'general.shipping_form.shipping_city',
1239 'value' => 'show',
1240 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
1241 ],
1242 ],
1243 ],
1244 ],
1245 'shipping_state_heading' => [
1246 'id' => 'shipping_state_heading',
1247 'type' => 'title',
1248 'label' => esc_html__( 'State', 'shopbuilder' ),
1249 // 'tab' => 'name',
1250 ],
1251 'shipping_state' => [
1252 'id' => 'shipping_state',
1253 'label' => esc_html__( 'State', 'shopbuilder' ),
1254 'type' => 'checkbox',
1255 'orientation' => 'vertical',
1256 'value' => [ 'show', 'required' ],
1257 'options' => [
1258 [
1259 'value' => 'show',
1260 'label' => 'Show State?',
1261 ],
1262 [
1263 'value' => 'required',
1264 'label' => 'Required Field',
1265 ],
1266 ],
1267 // 'tab' => 'country',
1268 ],
1269
1270 'shipping_state_label' => [
1271 'id' => 'shipping_state_label',
1272 'label' => esc_html__( 'State label', 'shopbuilder' ),
1273 'type' => 'text',
1274 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
1275 // 'tab' => 'country',
1276 'dependency' => [
1277 'rules' => [
1278 [
1279 'item' => 'general.shipping_form.shipping_state',
1280 'value' => 'show',
1281 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
1282 ],
1283 ],
1284 ],
1285 ],
1286 'shipping_postcode_heading' => [
1287 'id' => 'shipping_postcode_heading',
1288 'type' => 'title',
1289 'label' => esc_html__( 'Postcode / ZIP', 'shopbuilder' ),
1290 // 'tab' => 'name',
1291 ],
1292 'shipping_postcode' => [
1293 'id' => 'shipping_postcode',
1294 'label' => esc_html__( 'Postcode / ZIP', 'shopbuilder' ),
1295 'type' => 'checkbox',
1296 'orientation' => 'vertical',
1297 'value' => [ 'show', 'required' ],
1298 'options' => [
1299 [
1300 'value' => 'show',
1301 'label' => 'Show Postcode / ZIP?',
1302 ],
1303 [
1304 'value' => 'required',
1305 'label' => 'Required Field',
1306 ],
1307 ],
1308 // 'tab' => 'country',
1309 ],
1310 'shipping_postcode_label' => [
1311 'id' => 'shipping_postcode_label',
1312 'label' => esc_html__( 'Postcode / ZIP label', 'shopbuilder' ),
1313 'type' => 'text',
1314 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
1315 // 'tab' => 'country',
1316 'dependency' => [
1317 'rules' => [
1318 [
1319 'item' => 'general.shipping_form.shipping_postcode',
1320 'value' => 'show',
1321 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
1322 ],
1323 ],
1324 ],
1325 ],
1326 'shipping_postcode_placeholder' => [
1327 'id' => 'shipping_postcode_placeholder',
1328 'label' => esc_html__( 'Postcode / ZIP placeholder', 'shopbuilder' ),
1329 'type' => 'text',
1330 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
1331 // 'tab' => 'country',
1332 'dependency' => [
1333 'rules' => [
1334 [
1335 'item' => 'general.shipping_form.shipping_postcode',
1336 'value' => 'show',
1337 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
1338 ],
1339 ],
1340 ],
1341 ],
1342
1343 ],
1344 ]
1345 ),
1346 ];
1347
1348 return apply_filters( 'rtsb/core/general_settings/raw_list', $list );
1349 }
1350 }
1351