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