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

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