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
← All changes | app/Models/GeneralList.php +109 -157 2.1.2 → 3.0.0 View file →
@@ -1,10 +1,8 @@
1 1 <?php
2 2
3 3 namespace RadiusTheme\SB\Models;
4 4
5 -// use RadiusTheme\SB\Helpers\Fns;
6 -use RadiusTheme\SB\Elementor\Helper\ControlHelper;
7 5 use RadiusTheme\SB\Helpers\Fns;
8 6 use RadiusTheme\SB\Models\Base\ListModel;
9 7 use RadiusTheme\SB\Traits\SingletonTrait;
10 8
@@ -51,8 +49,73 @@
51 49 * @return array
52 50 */
53 51 protected function raw_list() {
54 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 + ),
55 118 'notification' => apply_filters(
56 119 'rtsb/settings/notification/options',
57 120 [
58 121 'id' => 'notification',
@@ -62,8 +125,13 @@
62 125 'active_field' => [
63 126 'disable' => true,
64 127 ],
65 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 + ],
66 134 'notification_position' => [
67 135 'id' => 'notification_position',
68 136 'value' => 'center-center',
69 137 'type' => 'select',
@@ -115,8 +183,13 @@
115 183 'active_field' => [
116 184 'disable' => true,
117 185 ],
118 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 + ],
119 192 'share_platforms' => [
120 193 'id' => 'share_platforms',
121 194 'label' => esc_html__( 'Select Social Sharing Platforms', 'shopbuilder' ),
122 195 'type' => 'checkbox',
@@ -129,25 +202,8 @@
129 202 'type' => 'switch',
130 203 'label' => esc_html__( 'Sharing Button in Single Product Page', 'shopbuilder' ),
131 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' ),
132 205 ],
133 - /*
134 - * TODO : Implement later.
135 - 'share_icon_show_to_product_page' => array(
136 - 'id' => 'share_icon_show_to_product_page',
137 - 'type' => 'switch',
138 - 'label' => esc_html__( 'Sharing Icon in Single Product Page', 'shopbuilder' ),
139 - 'dependency' => [
140 - 'rules' => [
141 - [
142 - 'item' => 'general.social_share.share_platforms_to_product_page',
143 - 'value' => 'on',
144 - 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
145 - ],
146 - ],
147 - ],
148 - ),
149 - */
150 206 'share_icon_layout' => [
151 207 'type' => 'select',
152 208 'value' => 'share-layout1',
153 209 'label' => esc_html__( 'Share Button Layout', 'shopbuilder' ),
@@ -167,8 +223,20 @@
167 223 ],
168 224 ],
169 225 ],
170 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 + ),
171 239 'tooltip' => apply_filters(
172 240 'rtsb/settings/tooltip/options',
173 241 [
174 242 'id' => 'tooltip',
@@ -187,17 +255,22 @@
187 255 'category' => 'checkout',
188 256 'title' => esc_html__( 'Billing Form Settings', 'shopbuilder' ),
189 257 'package' => 'free',
190 258 'active_field' => [
191 - 'label' => esc_html__( 'Enable Billing form settings?', 'shopbuilder' ),
192 - 'help' => esc_html__( 'Switch on to Billing form settings.', 'shopbuilder' ),
259 + 'label' => esc_html__( 'Customize Billing Form Fields?', 'shopbuilder' ),
260 + 'help' => esc_html__( 'Switch on to customize billing form fields.', 'shopbuilder' ),
193 261 ],
194 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 + ],
195 269 'billing_first_name_heading' => [
196 270 'id' => 'billing_first_name_heading',
197 271 'type' => 'title',
198 272 'label' => esc_html__( 'First Name', 'shopbuilder' ),
199 - // 'tab' => 'name',
200 273 ],
201 274 'billing_first_name' => [
202 275 'id' => 'billing_first_name',
203 276 'label' => esc_html__( 'First name', 'shopbuilder' ),
@@ -213,9 +286,8 @@
213 286 'value' => 'required',
214 287 'label' => 'Required Field',
215 288 ],
216 289 ],
217 - // 'tab' => 'name',
218 290 ],
219 291 'billing_first_name_label' => [
220 292 'id' => 'billing_first_name_label',
221 293 'label' => esc_html__( 'First name Label', 'shopbuilder' ),
@@ -220,15 +292,14 @@
220 292 'id' => 'billing_first_name_label',
221 293 'label' => esc_html__( 'First name Label', 'shopbuilder' ),
222 294 'type' => 'text',
223 295 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
224 - // 'tab' => 'name',
225 296 'dependency' => [
226 297 'rules' => [
227 298 [
228 299 'item' => 'general.billing_form.billing_first_name',
229 300 'value' => 'show',
230 - 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
301 + 'operator' => '==',
231 302 ],
232 303 ],
233 304 ],
234 305 ],
@@ -236,15 +307,14 @@
236 307 'id' => 'billing_first_name_placeholder',
237 308 'label' => esc_html__( 'First name Placeholder', 'shopbuilder' ),
238 309 'type' => 'text',
239 310 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
240 - // 'tab' => 'name',
241 311 'dependency' => [
242 312 'rules' => [
243 313 [
244 314 'item' => 'general.billing_form.billing_first_name',
245 315 'value' => 'show',
246 - 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
316 + 'operator' => '==',
247 317 ],
248 318 ],
249 319 ],
250 320 ],
@@ -252,9 +322,8 @@
252 322 'billing_last_name_heading' => [
253 323 'id' => 'billing_last_name_heading',
254 324 'type' => 'title',
255 325 'label' => esc_html__( 'Last Name', 'shopbuilder' ),
256 - // 'tab' => 'name',
257 326 ],
258 327 'billing_last_name' => [
259 328 'id' => 'billing_last_name',
260 329 'label' => esc_html__( 'Last name', 'shopbuilder' ),
@@ -270,9 +339,8 @@
270 339 'value' => 'required',
271 340 'label' => 'Required Field',
272 341 ],
273 342 ],
274 - // 'tab' => 'name',
275 343 ],
276 344
277 345 'billing_last_name_label' => [
278 346 'id' => 'billing_last_name_label',
@@ -278,9 +346,8 @@
278 346 'id' => 'billing_last_name_label',
279 347 'label' => esc_html__( 'Last name label', 'shopbuilder' ),
280 348 'type' => 'text',
281 349 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
282 - // 'tab' => 'name',
283 350 'dependency' => [
284 351 'rules' => [
285 352 [
286 353 'item' => 'general.billing_form.billing_last_name',
@@ -294,9 +361,8 @@
294 361 'id' => 'billing_last_name_placeholder',
295 362 'label' => esc_html__( 'Last name Placeholder', 'shopbuilder' ),
296 363 'type' => 'text',
297 364 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
298 - // 'tab' => 'name',
299 365 'dependency' => [
300 366 'rules' => [
301 367 [
302 368 'item' => 'general.billing_form.billing_last_name',
@@ -310,9 +376,8 @@
310 376 'billing_company_heading' => [
311 377 'id' => 'billing_company_heading',
312 378 'type' => 'title',
313 379 'label' => esc_html__( 'Company', 'shopbuilder' ),
314 - // 'tab' => 'company',
315 380 ],
316 381 'billing_company' => [
317 382 'id' => 'billing_company',
318 383 'label' => esc_html__( 'Company name', 'shopbuilder' ),
@@ -331,9 +396,8 @@
331 396 'value' => 'required',
332 397 'label' => 'Required Field',
333 398 ],
334 399 ],
335 - // 'tab' => 'company',
336 400 ],
337 401
338 402 'billing_company_label' => [
339 403 'id' => 'billing_company_label',
@@ -339,9 +403,8 @@
339 403 'id' => 'billing_company_label',
340 404 'label' => esc_html__( 'Company label', 'shopbuilder' ),
341 405 'type' => 'text',
342 406 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
343 - // 'tab' => 'company',
344 407 'dependency' => [
345 408 'rules' => [
346 409 [
347 410 'item' => 'general.billing_form.billing_company',
@@ -355,9 +418,8 @@
355 418 'id' => 'billing_company_placeholder',
356 419 'label' => esc_html__( 'Company Placeholder', 'shopbuilder' ),
357 420 'type' => 'text',
358 421 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
359 - // 'tab' => 'company',
360 422 'dependency' => [
361 423 'rules' => [
362 424 [
363 425 'item' => 'general.billing_form.billing_company',
@@ -371,9 +433,8 @@
371 433 'billing_country_heading' => [
372 434 'id' => 'billing_country_heading',
373 435 'type' => 'title',
374 436 'label' => esc_html__( 'Country', 'shopbuilder' ),
375 - // 'tab' => 'country',
376 437 ],
377 438 'billing_country' => [
378 439 'id' => 'billing_country',
379 440 'label' => esc_html__( 'Country', 'shopbuilder' ),
@@ -379,22 +440,18 @@
379 440 'label' => esc_html__( 'Country', 'shopbuilder' ),
380 441 'type' => 'checkbox',
381 442 'orientation' => 'vertical',
382 443 'value' => [ 'show', 'required' ],
383 - // 'help' => esc_html__( 'If the Shipping Form is enabled, the Country field is mandatory.', 'shopbuilder' ),
384 444 'options' => [
385 445 [
386 446 'value' => 'show',
387 447 'label' => 'Show Country?',
388 - // 'disabled' => true,
389 448 ],
390 449 [
391 450 'value' => 'required',
392 451 'label' => 'Required Field',
393 - // 'disabled' => true,
394 452 ],
395 453 ],
396 - // 'tab' => 'country',
397 454 ],
398 455
399 456 'billing_country_label' => [
400 457 'id' => 'billing_country_label',
@@ -400,9 +457,8 @@
400 457 'id' => 'billing_country_label',
401 458 'label' => esc_html__( 'Country label', 'shopbuilder' ),
402 459 'type' => 'text',
403 460 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
404 - // 'tab' => 'country',
405 461 'dependency' => [
406 462 'rules' => [
407 463 [
408 464 'item' => 'general.billing_form.billing_country',
@@ -415,9 +471,8 @@
415 471 'billing_address_1_heading' => [
416 472 'id' => 'billing_address_1_heading',
417 473 'type' => 'title',
418 474 'label' => esc_html__( 'Address 1', 'shopbuilder' ),
419 - // 'tab' => 'address',
420 475 ],
421 476 'billing_address_1' => [
422 477 'id' => 'billing_address_1',
423 478 'label' => esc_html__( 'Address 1', 'shopbuilder' ),
@@ -433,9 +488,8 @@
433 488 'value' => 'required',
434 489 'label' => 'Required Field',
435 490 ],
436 491 ],
437 - // 'tab' => 'address',
438 492 ],
439 493
440 494 'billing_address_1_label' => [
441 495 'id' => 'billing_address_1_label',
@@ -441,9 +495,8 @@
441 495 'id' => 'billing_address_1_label',
442 496 'label' => esc_html__( 'Address 1 label', 'shopbuilder' ),
443 497 'type' => 'text',
444 498 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
445 - // 'tab' => 'address',
446 499 'dependency' => [
447 500 'rules' => [
448 501 [
449 502 'item' => 'general.billing_form.billing_address_1',
@@ -457,9 +510,8 @@
457 510 'id' => 'billing_address_1_placeholder',
458 511 'label' => esc_html__( 'Address 1 Placeholder', 'shopbuilder' ),
459 512 'type' => 'text',
460 513 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
461 - // 'tab' => 'address',
462 514 'dependency' => [
463 515 'rules' => [
464 516 [
465 517 'item' => 'general.billing_form.billing_address_1',
@@ -472,9 +524,8 @@
472 524 'billing_address_2_heading' => [
473 525 'id' => 'billing_address_2_heading',
474 526 'type' => 'title',
475 527 'label' => esc_html__( 'Address 2', 'shopbuilder' ),
476 - // 'tab' => 'address',
477 528 'dependency' => [
478 529 'rules' => [
479 530 [
480 531 'item' => 'general.billing_form.billing_address_1',
@@ -488,9 +539,8 @@
488 539 'id' => 'billing_address_2',
489 540 'label' => esc_html__( 'Address 2', 'shopbuilder' ),
490 541 'type' => 'checkbox',
491 542 'orientation' => 'vertical',
492 - // 'tab' => 'address',
493 543 'value' => [
494 544 'show',
495 545 'required' === get_option( 'woocommerce_checkout_address_2_field', 'optional' ) ? 'required' : 'optional',
496 546 ],
@@ -516,9 +566,8 @@
516 566 'id' => 'billing_address_2_label',
517 567 'label' => esc_html__( 'Address 2 label', 'shopbuilder' ),
518 568 'type' => 'text',
519 569 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
520 - // 'tab' => 'address',
521 570 'dependency' => [
522 571 'rules' => [
523 572 [
524 573 'item' => 'general.billing_form.billing_address_1',
@@ -537,9 +586,8 @@
537 586 'id' => 'billing_address_2_placeholder',
538 587 'label' => esc_html__( 'Address 2 Placeholder', 'shopbuilder' ),
539 588 'type' => 'text',
540 589 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
541 - // 'tab' => 'address',
542 590 'dependency' => [
543 591 'rules' => [
544 592 [
545 593 'item' => 'general.billing_form.billing_address_1',
@@ -557,9 +605,8 @@
557 605 'billing_city_heading' => [
558 606 'id' => 'billing_city_heading',
559 607 'type' => 'title',
560 608 'label' => esc_html__( 'Town / City', 'shopbuilder' ),
561 - // 'tab' => 'city',
562 609 ],
563 610 'billing_city' => [
564 611 'id' => 'billing_city',
565 612 'label' => esc_html__( 'Town / City', 'shopbuilder' ),
@@ -565,9 +612,8 @@
565 612 'label' => esc_html__( 'Town / City', 'shopbuilder' ),
566 613 'type' => 'checkbox',
567 614 'orientation' => 'vertical',
568 615 'value' => [ 'show', 'required' ],
569 - // 'tab' => 'city',
570 616 'options' => [
571 617 [
572 618 'value' => 'show',
573 619 'label' => 'Show Town / City?',
@@ -583,9 +629,8 @@
583 629 'id' => 'billing_city_label',
584 630 'label' => esc_html__( 'Town / City label', 'shopbuilder' ),
585 631 'type' => 'text',
586 632 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
587 - // 'tab' => 'city',
588 633 'dependency' => [
589 634 'rules' => [
590 635 [
591 636 'item' => 'general.billing_form.billing_city',
@@ -599,9 +644,8 @@
599 644 'id' => 'billing_city_placeholder',
600 645 'label' => esc_html__( 'City placeholder', 'shopbuilder' ),
601 646 'type' => 'text',
602 647 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
603 - // 'tab' => 'city',
604 648 'dependency' => [
605 649 'rules' => [
606 650 [
607 651 'item' => 'general.billing_form.billing_city',
@@ -614,9 +658,8 @@
614 658 'billing_state_heading' => [
615 659 'id' => 'billing_city_heading',
616 660 'type' => 'title',
617 661 'label' => esc_html__( 'State', 'shopbuilder' ),
618 - // 'tab' => 'state',
619 662 ],
620 663 'billing_state' => [
621 664 'id' => 'billing_state',
622 665 'label' => esc_html__( 'State', 'shopbuilder' ),
@@ -632,9 +675,8 @@
632 675 'value' => 'required',
633 676 'label' => 'Required Field',
634 677 ],
635 678 ],
636 - // 'tab' => 'state',
637 679 ],
638 680
639 681 'billing_state_label' => [
640 682 'id' => 'billing_state_label',
@@ -640,10 +682,8 @@
640 682 'id' => 'billing_state_label',
641 683 'label' => esc_html__( 'State label', 'shopbuilder' ),
642 684 'type' => 'text',
643 685 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
644 - // 'help' => esc_html__( 'Leave empty to set default. If the Shipping Form is enabled, the State field is mandatory.', 'shopbuilder' ),
645 - // 'tab' => 'state',
646 686 'dependency' => [
647 687 'rules' => [
648 688 [
649 689 'item' => 'general.billing_form.billing_state',
@@ -656,9 +696,8 @@
656 696 'billing_postcode_heading' => [
657 697 'id' => 'billing_postcode_heading',
658 698 'type' => 'title',
659 699 'label' => esc_html__( 'Postcode / ZIP', 'shopbuilder' ),
660 - // 'tab' => 'postcode',
661 700 ],
662 701 'billing_postcode' => [
663 702 'id' => 'billing_postcode',
664 703 'label' => esc_html__( 'Postcode / ZIP', 'shopbuilder' ),
@@ -674,9 +713,8 @@
674 713 'value' => 'required',
675 714 'label' => 'Required Field',
676 715 ],
677 716 ],
678 - // 'tab' => 'postcode',
679 717 ],
680 718 'billing_postcode_label' => [
681 719 'id' => 'billing_postcode_label',
682 720 'label' => esc_html__( 'Postcode / ZIP label', 'shopbuilder' ),
@@ -681,9 +719,8 @@
681 719 'id' => 'billing_postcode_label',
682 720 'label' => esc_html__( 'Postcode / ZIP label', 'shopbuilder' ),
683 721 'type' => 'text',
684 722 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
685 - // 'tab' => 'postcode',
686 723 'dependency' => [
687 724 'rules' => [
688 725 [
689 726 'item' => 'general.billing_form.billing_postcode',
@@ -697,9 +734,8 @@
697 734 'id' => 'billing_postcode_placeholder',
698 735 'label' => esc_html__( 'Postcode / ZIP placeholder', 'shopbuilder' ),
699 736 'type' => 'text',
700 737 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
701 - // 'tab' => 'postcode',
702 738 'dependency' => [
703 739 'rules' => [
704 740 [
705 741 'item' => 'general.billing_form.billing_postcode',
@@ -712,9 +748,8 @@
712 748 'billing_phone_heading' => [
713 749 'id' => 'billing_phone_heading',
714 750 'type' => 'title',
715 751 'label' => esc_html__( 'Phone', 'shopbuilder' ),
716 - // 'tab' => 'phone',
717 752 ],
718 753 'billing_phone' => [
719 754 'id' => 'billing_phone',
720 755 'label' => esc_html__( 'Phone', 'shopbuilder' ),
@@ -719,9 +754,8 @@
719 754 'id' => 'billing_phone',
720 755 'label' => esc_html__( 'Phone', 'shopbuilder' ),
721 756 'type' => 'checkbox',
722 757 'orientation' => 'vertical',
723 - // 'tab' => 'phone',
724 758 'value' => [
725 759 'show',
726 760 'required' === get_option( 'woocommerce_checkout_phone_field', 'required' ) ? 'required' : 'optional',
727 761 ],
@@ -741,9 +775,8 @@
741 775 'id' => 'billing_phone_label',
742 776 'label' => esc_html__( 'Phone field label', 'shopbuilder' ),
743 777 'type' => 'text',
744 778 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
745 - // 'tab' => 'phone',
746 779 'dependency' => [
747 780 'rules' => [
748 781 [
749 782 'item' => 'general.billing_form.billing_phone',
@@ -757,9 +790,8 @@
757 790 'id' => 'billing_phone_placeholder',
758 791 'label' => esc_html__( 'Phone field placeholder', 'shopbuilder' ),
759 792 'type' => 'text',
760 793 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
761 - // 'tab' => 'phone',
762 794 'dependency' => [
763 795 'rules' => [
764 796 [
765 797 'item' => 'general.billing_form.billing_phone',
@@ -772,9 +804,8 @@
772 804 'billing_email_heading' => [
773 805 'id' => 'billing_email_heading',
774 806 'type' => 'title',
775 807 'label' => esc_html__( 'Email', 'shopbuilder' ),
776 - // 'tab' => 'email',
777 808 ],
778 809 'billing_email' => [
779 810 'id' => 'billing_email',
780 811 'label' => esc_html__( 'Email address', 'shopbuilder' ),
@@ -779,9 +810,8 @@
779 810 'id' => 'billing_email',
780 811 'label' => esc_html__( 'Email address', 'shopbuilder' ),
781 812 'type' => 'checkbox',
782 813 'orientation' => 'vertical',
783 - // 'tab' => 'email',
784 814 'value' => [ 'show', 'required' ],
785 815 'options' => [
786 816 [
787 817 'value' => 'show',
@@ -797,9 +827,8 @@
797 827 'id' => 'billing_email_label',
798 828 'label' => esc_html__( 'Email address field label', 'shopbuilder' ),
799 829 'type' => 'text',
800 830 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
801 - // 'tab' => 'email',
802 831 'dependency' => [
803 832 'rules' => [
804 833 [
805 834 'item' => 'general.billing_form.billing_email',
@@ -813,9 +842,8 @@
813 842 'id' => 'billing_email_placeholder',
814 843 'label' => esc_html__( 'Email address field placeholder', 'shopbuilder' ),
815 844 'type' => 'text',
816 845 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
817 - // 'tab' => 'email',
818 846 'dependency' => [
819 847 'rules' => [
820 848 [
821 849 'item' => 'general.billing_form.billing_email',
@@ -836,17 +864,22 @@
836 864 'category' => 'checkout',
837 865 'title' => esc_html__( 'Shipping Form Settings', 'shopbuilder' ),
838 866 'package' => 'free',
839 867 'active_field' => [
840 - 'label' => esc_html__( 'Enable Shipping form settings?', 'shopbuilder' ),
841 - 'help' => esc_html__( 'Switch on to Shipping form settings.', 'shopbuilder' ),
868 + 'label' => esc_html__( 'Customize Shipping form Fields?', 'shopbuilder' ),
869 + 'help' => esc_html__( 'Switch on to customize shipping form fields.', 'shopbuilder' ),
842 870 ],
843 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 + ],
844 878 'shipping_first_name_heading' => [
845 879 'id' => 'shipping_first_name_heading',
846 880 'type' => 'title',
847 881 'label' => esc_html__( 'First Name', 'shopbuilder' ),
848 - // 'tab' => 'name',
849 882 ],
850 883 'shipping_first_name' => [
851 884 'id' => 'shipping_first_name',
852 885 'label' => esc_html__( 'First name', 'shopbuilder' ),
@@ -862,9 +895,8 @@
862 895 'value' => 'required',
863 896 'label' => 'Required Field',
864 897 ],
865 898 ],
866 - // 'tab' => 'name',
867 899 ],
868 900 'shipping_first_name_label' => [
869 901 'id' => 'shipping_first_name_label',
870 902 'label' => esc_html__( 'First name Label', 'shopbuilder' ),
@@ -869,9 +901,8 @@
869 901 'id' => 'shipping_first_name_label',
870 902 'label' => esc_html__( 'First name Label', 'shopbuilder' ),
871 903 'type' => 'text',
872 904 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
873 - // 'tab' => 'name',
874 905 'dependency' => [
875 906 'rules' => [
876 907 [
877 908 'item' => 'general.shipping_form.shipping_first_name',
@@ -885,9 +916,8 @@
885 916 'id' => 'shipping_first_name_placeholder',
886 917 'label' => esc_html__( 'First name Placeholder', 'shopbuilder' ),
887 918 'type' => 'text',
888 919 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
889 - // 'tab' => 'country',
890 920 'dependency' => [
891 921 'rules' => [
892 922 [
893 923 'item' => 'general.shipping_form.shipping_first_name',
@@ -900,9 +930,8 @@
900 930 'shipping_first_last_heading' => [
901 931 'id' => 'shipping_first_last_heading',
902 932 'type' => 'title',
903 933 'label' => esc_html__( 'Last Name', 'shopbuilder' ),
904 - // 'tab' => 'name',
905 934 ],
906 935 'shipping_last_name' => [
907 936 'id' => 'shipping_last_name',
908 937 'label' => esc_html__( 'Last name', 'shopbuilder' ),
@@ -918,9 +947,8 @@
918 947 'value' => 'required',
919 948 'label' => 'Required Field',
920 949 ],
921 950 ],
922 - // 'tab' => 'name',
923 951 ],
924 952
925 953 'shipping_last_name_label' => [
926 954 'id' => 'shipping_last_name_label',
@@ -926,9 +954,8 @@
926 954 'id' => 'shipping_last_name_label',
927 955 'label' => esc_html__( 'Last name label', 'shopbuilder' ),
928 956 'type' => 'text',
929 957 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
930 - // 'tab' => 'name',
931 958 'dependency' => [
932 959 'rules' => [
933 960 [
934 961 'item' => 'general.shipping_form.shipping_last_name',
@@ -942,9 +969,8 @@
942 969 'id' => 'shipping_last_name_placeholder',
943 970 'label' => esc_html__( 'Last name Placeholder', 'shopbuilder' ),
944 971 'type' => 'text',
945 972 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
946 - // 'tab' => 'country',
947 973 'dependency' => [
948 974 'rules' => [
949 975 [
950 976 'item' => 'general.shipping_form.shipping_last_name',
@@ -957,9 +983,8 @@
957 983 'shipping_company_heading' => [
958 984 'id' => 'shipping_company_heading',
959 985 'type' => 'title',
960 986 'label' => esc_html__( 'Company', 'shopbuilder' ),
961 - // 'tab' => 'name',
962 987 ],
963 988 'shipping_company' => [
964 989 'id' => 'shipping_company',
965 990 'label' => esc_html__( 'Company name', 'shopbuilder' ),
@@ -975,9 +1000,8 @@
975 1000 'value' => 'required',
976 1001 'label' => 'Required Field',
977 1002 ],
978 1003 ],
979 - // 'tab' => 'company',
980 1004 ],
981 1005
982 1006 'shipping_company_label' => [
983 1007 'id' => 'shipping_company_label',
@@ -983,9 +1007,8 @@
983 1007 'id' => 'shipping_company_label',
984 1008 'label' => esc_html__( 'Company label', 'shopbuilder' ),
985 1009 'type' => 'text',
986 1010 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
987 - // 'tab' => 'company',
988 1011 'dependency' => [
989 1012 'rules' => [
990 1013 [
991 1014 'item' => 'general.shipping_form.shipping_company',
@@ -999,9 +1022,8 @@
999 1022 'id' => 'shipping_company_placeholder',
1000 1023 'label' => esc_html__( 'Shipping company Placeholder', 'shopbuilder' ),
1001 1024 'type' => 'text',
1002 1025 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
1003 - // 'tab' => 'country',
1004 1026 'dependency' => [
1005 1027 'rules' => [
1006 1028 [
1007 1029 'item' => 'general.shipping_form.shipping_company',
@@ -1014,9 +1036,8 @@
1014 1036 'shipping_country_heading' => [
1015 1037 'id' => 'shipping_country_heading',
1016 1038 'type' => 'title',
1017 1039 'label' => esc_html__( 'Country', 'shopbuilder' ),
1018 - // 'tab' => 'name',
1019 1040 ],
1020 1041 'shipping_country' => [
1021 1042 'id' => 'shipping_country',
1022 1043 'label' => esc_html__( 'Country', 'shopbuilder' ),
@@ -1026,17 +1047,14 @@
1026 1047 'options' => [
1027 1048 [
1028 1049 'value' => 'show',
1029 1050 'label' => 'Show Country?',
1030 - // 'disabled' => true,
1031 1051 ],
1032 1052 [
1033 1053 'value' => 'required',
1034 1054 'label' => 'Required Field',
1035 - // 'disabled' => true,
1036 1055 ],
1037 1056 ],
1038 - // 'tab' => 'country',
1039 1057 ],
1040 1058
1041 1059 'shipping_country_label' => [
1042 1060 'id' => 'shipping_country_label',
@@ -1056,9 +1074,8 @@
1056 1074 'shipping_address_1_heading' => [
1057 1075 'id' => 'shipping_address_1_heading',
1058 1076 'type' => 'title',
1059 1077 'label' => esc_html__( 'Address 1', 'shopbuilder' ),
1060 - // 'tab' => 'name',
1061 1078 ],
1062 1079 'shipping_address_1' => [
1063 1080 'id' => 'shipping_address_1',
1064 1081 'label' => esc_html__( 'Address 1', 'shopbuilder' ),
@@ -1074,9 +1091,8 @@
1074 1091 'value' => 'required',
1075 1092 'label' => 'Required Field',
1076 1093 ],
1077 1094 ],
1078 - // 'tab' => 'country',
1079 1095 ],
1080 1096
1081 1097 'shipping_address_1_label' => [
1082 1098 'id' => 'shipping_address_1_label',
@@ -1082,9 +1098,8 @@
1082 1098 'id' => 'shipping_address_1_label',
1083 1099 'label' => esc_html__( 'Address 1 label', 'shopbuilder' ),
1084 1100 'type' => 'text',
1085 1101 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
1086 - // 'tab' => 'country',
1087 1102 'dependency' => [
1088 1103 'rules' => [
1089 1104 [
1090 1105 'item' => 'general.shipping_form.shipping_address_1',
@@ -1098,9 +1113,8 @@
1098 1113 'id' => 'shipping_address_1_placeholder',
1099 1114 'label' => esc_html__( 'Address 1 Placeholder', 'shopbuilder' ),
1100 1115 'type' => 'text',
1101 1116 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
1102 - // 'tab' => 'country',
1103 1117 'dependency' => [
1104 1118 'rules' => [
1105 1119 [
1106 1120 'item' => 'general.shipping_form.shipping_address_1',
@@ -1113,9 +1127,8 @@
1113 1127 'shipping_address_2_heading' => [
1114 1128 'id' => 'shipping_address_2_heading',
1115 1129 'type' => 'title',
1116 1130 'label' => esc_html__( 'Address 2', 'shopbuilder' ),
1117 - // 'tab' => 'name',
1118 1131 'dependency' => [
1119 1132 'rules' => [
1120 1133 [
1121 1134 'item' => 'general.shipping_form.shipping_address_1',
@@ -1137,9 +1150,8 @@
1137 1150 'label' => 'Show Address field?',
1138 1151 ],
1139 1152 ],
1140 1153 'help' => esc_html__( 'if "Address 1" is hidden then this field also hides.', 'shopbuilder' ),
1141 - // 'tab' => 'country',
1142 1154 'dependency' => [
1143 1155 'rules' => [
1144 1156 [
1145 1157 'item' => 'general.shipping_form.shipping_address_1',
@@ -1154,9 +1166,8 @@
1154 1166 'id' => 'shipping_address_2_label',
1155 1167 'label' => esc_html__( 'Address 2 label', 'shopbuilder' ),
1156 1168 'type' => 'text',
1157 1169 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
1158 - // 'tab' => 'country',
1159 1170 'dependency' => [
1160 1171 'rules' => [
1161 1172 [
1162 1173 'item' => 'general.shipping_form.shipping_address_1',
@@ -1175,9 +1186,8 @@
1175 1186 'id' => 'shipping_address_2_placeholder',
1176 1187 'label' => esc_html__( 'Address 2 Placeholder', 'shopbuilder' ),
1177 1188 'type' => 'text',
1178 1189 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
1179 - // 'tab' => 'country',
1180 1190 'dependency' => [
1181 1191 'rules' => [
1182 1192 [
1183 1193 'item' => 'general.shipping_form.shipping_address_1',
@@ -1195,9 +1205,8 @@
1195 1205 'shipping_city_heading' => [
1196 1206 'id' => 'shipping_city_heading',
1197 1207 'type' => 'title',
1198 1208 'label' => esc_html__( 'Town / City', 'shopbuilder' ),
1199 - // 'tab' => 'name',
1200 1209 ],
1201 1210 'shipping_city' => [
1202 1211 'id' => 'shipping_city',
1203 1212 'label' => esc_html__( 'Town / City', 'shopbuilder' ),
@@ -1213,9 +1222,8 @@
1213 1222 'value' => 'required',
1214 1223 'label' => 'Required Field',
1215 1224 ],
1216 1225 ],
1217 - // 'tab' => 'country',
1218 1226 ],
1219 1227 'shipping_city_label' => [
1220 1228 'id' => 'shipping_city_label',
1221 1229 'label' => esc_html__( 'Town / City label', 'shopbuilder' ),
@@ -1220,9 +1228,8 @@
1220 1228 'id' => 'shipping_city_label',
1221 1229 'label' => esc_html__( 'Town / City label', 'shopbuilder' ),
1222 1230 'type' => 'text',
1223 1231 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
1224 - // 'tab' => 'country',
1225 1232 'dependency' => [
1226 1233 'rules' => [
1227 1234 [
1228 1235 'item' => 'general.shipping_form.shipping_city',
@@ -1236,9 +1243,8 @@
1236 1243 'id' => 'shipping_city_placeholder',
1237 1244 'label' => esc_html__( 'Shipping city placeholder', 'shopbuilder' ),
1238 1245 'type' => 'text',
1239 1246 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
1240 - // 'tab' => 'country',
1241 1247 'dependency' => [
1242 1248 'rules' => [
1243 1249 [
1244 1250 'item' => 'general.shipping_form.shipping_city',
@@ -1251,9 +1257,8 @@
1251 1257 'shipping_state_heading' => [
1252 1258 'id' => 'shipping_state_heading',
1253 1259 'type' => 'title',
1254 1260 'label' => esc_html__( 'Others', 'shopbuilder' ),
1255 - // 'tab' => 'name',
1256 1261 ],
1257 1262 'shipping_state' => [
1258 1263 'id' => 'shipping_state',
1259 1264 'label' => esc_html__( 'State', 'shopbuilder' ),
@@ -1269,33 +1274,9 @@
1269 1274 'value' => 'required',
1270 1275 'label' => 'Required Field',
1271 1276 ],
1272 1277 ],
1273 - // 'tab' => 'country',
1274 1278 ],
1275 - //
1276 - // 'shipping_state_label' => [
1277 - // 'id' => 'shipping_state_label',
1278 - // 'label' => esc_html__( 'State label', 'shopbuilder' ),
1279 - // 'type' => 'text',
1280 - // 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
1281 - // 'tab' => 'country',
1282 - // 'dependency' => [
1283 - // 'rules' => [
1284 - // [
1285 - // 'item' => 'general.shipping_form.shipping_state',
1286 - // 'value' => 'show',
1287 - // 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
1288 - // ],
1289 - // ],
1290 - // ],
1291 - // ],
1292 - // 'shipping_postcode_heading' => [
1293 - // 'id' => 'shipping_postcode_heading',
1294 - // 'type' => 'title',
1295 - // 'label' => esc_html__( 'Postcode / ZIP', 'shopbuilder' ),
1296 - // 'tab' => 'name',
1297 - // ],
1298 1279 'shipping_postcode' => [
1299 1280 'id' => 'shipping_postcode',
1300 1281 'label' => esc_html__( 'Postcode / ZIP', 'shopbuilder' ),
1301 1282 'type' => 'checkbox',
@@ -1306,47 +1287,18 @@
1306 1287 'value' => 'show',
1307 1288 'label' => 'Show Postcode / ZIP?',
1308 1289 ],
1309 1290 ],
1310 - // 'tab' => 'country',
1311 1291 ],
1312 - // 'shipping_postcode_label' => [
1313 - // 'id' => 'shipping_postcode_label',
1314 - // 'label' => esc_html__( 'Postcode / ZIP label', 'shopbuilder' ),
1315 - // 'type' => 'text',
1316 - // 'help' => esc_html__( 'Leave empty to set default. ', 'shopbuilder' ),
1317 - // 'tab' => 'country',
1318 - // 'dependency' => [
1319 - // 'rules' => [
1320 - // [
1321 - // 'item' => 'general.shipping_form.shipping_postcode',
1322 - // 'value' => 'show',
1323 - // 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
1324 - // ],
1325 - // ],
1326 - // ],
1327 - // ],
1328 - // 'shipping_postcode_placeholder' => [
1329 - // 'id' => 'shipping_postcode_placeholder',
1330 - // 'label' => esc_html__( 'Postcode / ZIP placeholder', 'shopbuilder' ),
1331 - // 'type' => 'text',
1332 - // 'help' => esc_html__( 'Leave empty to set default.', 'shopbuilder' ),
1333 - // 'tab' => 'country',
1334 - // 'dependency' => [
1335 - // 'rules' => [
1336 - // [
1337 - // 'item' => 'general.shipping_form.shipping_postcode',
1338 - // 'value' => 'show',
1339 - // 'operator' => '==', // 'operator' => 'any','in', !in' only valid for multiple value //
1340 - // ],
1341 - // ],
1342 - // ],
1343 - // ],
1344 1292
1345 1293 ],
1346 1294 ]
1347 1295 ),
1348 1296 ];
1297 +
1298 + if ( ! defined( 'ELEMENTOR_VERSION' ) ) {
1299 + unset( $list['optimization']['fields']['load_elementor_scripts'] );
1300 + }
1349 1301
1350 1302 return apply_filters( 'rtsb/core/general_settings/raw_list', $list );
1351 1303 }
1352 1304 }