PluginProbe
ShopBuilder – WooCommerce Builder For Elementor / 2.1.8
ShopBuilder – WooCommerce Builder For Elementor v2.1.8
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.1.8, at app/Models/GeneralList.php

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