PluginProbe ʕ •ᴥ•ʔ
ShopEngine Elementor WooCommerce Builder Addon – All in One WooCommerce Solution / 4.8.6
ShopEngine Elementor WooCommerce Builder Addon – All in One WooCommerce Solution v4.8.6
4.9.2 4.9.1 4.9.0 2.0.0 2.1.0 2.2.0 2.2.1 2.2.2 2.3.0 2.4.0 2.5.0 2.5.1 3.0.0 3.1.0 3.1.1 4.0.0 4.0.1 4.1.0 4.1.1 4.2.0 4.2.1 4.3.0 4.3.1 4.4.0 4.5.0 4.5.1 4.6.0 4.6.1 4.6.2 4.6.3 4.6.4 4.6.5 4.6.6 4.6.7 4.6.8 4.6.9 4.7.0 4.7.1 4.7.2 4.7.3 4.7.4 4.7.5 4.7.6 4.7.7 4.7.8 4.7.9 4.8.0 4.8.1 4.8.2 4.8.3 4.8.4 4.8.5 4.8.6 4.8.7 4.8.8 4.8.9 trunk 0.1.2-beta 0.1.3-beta 0.1.4-beta 1.0.0 1.1.0 1.1.1 1.1.2 1.1.3 1.2.0 1.2.1 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.4.0 1.4.1 1.5.0 1.5.1 1.6.0 1.6.1 1.7.0 1.8.0 1.8.1 1.9.0
shopengine / widgets / checkout-payment / checkout-payment.php
shopengine / widgets / checkout-payment Last commit date
screens 3 years ago checkout-payment-config.php 4 years ago checkout-payment.php 3 years ago
checkout-payment.php
790 lines
1 <?php
2
3 namespace Elementor;
4
5 use ShopEngine\Widgets\Products;
6
7 defined('ABSPATH') || exit;
8
9 class ShopEngine_Checkout_Payment extends \ShopEngine\Base\Widget
10 {
11
12 public function config() {
13 return new ShopEngine_Checkout_Payment_Config();
14 }
15
16 protected function register_controls() {
17 /**
18 ---------------------------------
19 Content Section
20 ------------------------------------
21 */
22
23 $this->start_controls_section(
24 'shopengine_content_section',
25 [
26 'label' => esc_html__('Content Style', 'shopengine'),
27 'tab' => Controls_Manager::TAB_STYLE,
28 ]
29 );
30
31 $this->add_control(
32 'shopengine_payment_label_text_color',
33 [
34 'label' => esc_html__('Label Text Color', 'shopengine'),
35 'type' => Controls_Manager::COLOR,
36 'alpha' => false,
37 'default' => '#3A3A3A',
38 'selectors' => [
39 '{{WRAPPER}} .shopengine-checkout-payment .wc_payment_method label' => 'color: {{VALUE}} !important;',
40 ],
41 ]
42 );
43
44 $this->add_control(
45 'shopengine_payment_url_clr',
46 [
47 'label' => esc_html__('Url Color', 'shopengine'),
48 'type' => Controls_Manager::COLOR,
49 'alpha' => false,
50 'default' => '#4169E1',
51 'selectors' => [
52 '{{WRAPPER}} .shopengine-checkout-payment a' => 'color: {{VALUE}};',
53 ],
54 ]
55 );
56
57 $this->add_control(
58 'shopengine_payment_url_hover_clr',
59 [
60 'label' => esc_html__('Url hover Color', 'shopengine'),
61 'type' => Controls_Manager::COLOR,
62 'alpha' => false,
63 'default' => '#3A3A3A',
64 'selectors' => [
65 '{{WRAPPER}} .shopengine-checkout-payment a:hover' => 'color: {{VALUE}};',
66 ],
67 ]
68 );
69
70 $this->add_control(
71 'shopengine_payment_description_text_color',
72 [
73 'label' => esc_html__('Description Text Color', 'shopengine'),
74 'type' => Controls_Manager::COLOR,
75 'alpha' => false,
76 'default' => '#979797',
77 'selectors' => [
78 '{{WRAPPER}} .shopengine-checkout-payment #payment .payment_methods .payment_box' => 'color: {{VALUE}};',
79 '{{WRAPPER}} .shopengine-checkout-payment #payment .payment_methods .payment_box p' => 'color: {{VALUE}};',
80 '{{WRAPPER}} .shopengine-checkout-payment #payment .payment_methods .payment_box a' => 'color: {{VALUE}};',
81 '{{WRAPPER}} .shopengine-checkout-payment #payment .woocommerce-privacy-policy-text p' => 'color: {{VALUE}};',
82 ],
83 ]
84 );
85
86 $this->add_group_control(
87 Group_Control_Typography::get_type(),
88 [
89 'name' => 'shopengine_payment_label_typography',
90 'label' => esc_html__('Label Typography', 'shopengine'),
91 'selector' => '{{WRAPPER}} .shopengine-checkout-payment .wc_payment_method label',
92 'exclude' => ['font_family', 'letter_spacing', 'text_decoration', 'text_transform', 'font_style', 'letter_spacing'],
93
94 'fields_options' => [
95 'typography' => [
96 'default' => 'custom',
97 ],
98 'font_weight' => [
99 'default' => '600',
100 ],
101 'font_size' => [
102 'label' => esc_html__('Font Size (px)', 'shopengine'),
103 'default' => [
104 'size' => '14',
105 'unit' => 'px',
106 ],
107 'size_units' => ['px'],
108 ],
109 'line_height' => [
110 'label' => esc_html__('Line Height (px)', 'shopengine'),
111 'default' => [
112 'size' => '17',
113 'unit' => 'px',
114 ],
115 'size_units' => ['px'],
116 ],
117 ],
118 ]
119 );
120
121 $this->add_group_control(
122 Group_Control_Typography::get_type(),
123 [
124 'name' => 'shopengine_payment_content_typography',
125 'label' => esc_html__('Body typography', 'shopengine'),
126 'selector' => '{{WRAPPER}} .shopengine-checkout-payment #payment :is(.payment_box, .woocommerce-terms-and-conditions-wrapper, .payment_method_paypal) :is(p)',
127 'exclude' => ['font_family', 'letter_spacing', 'text_decoration', 'text_transform', 'font_style', 'letter_spacing'],
128 'fields_options' => [
129 'typography' => [
130 'default' => 'custom',
131 ],
132 'font_weight' => [
133 'default' => '400',
134 ],
135 'font_size' => [
136 'label' => esc_html__('Font Size (px)', 'shopengine'),
137 'default' => [
138 'size' => '13',
139 'unit' => 'px',
140 ],
141 'size_units' => ['px'],
142 ],
143 'line_height' => [
144 'label' => esc_html__('Line-Height (px)', 'shopengine'),
145 'default' => [
146 'size' => '16',
147 'unit' => 'px',
148 ],
149 'size_units' => ['px'],
150 ],
151 ],
152 ]
153 );
154
155
156 $this->end_controls_section(); // end ./ content section
157
158 /*
159 ---------------------------------
160 checkbox Section
161 ------------------------------------
162 */
163
164 $this->start_controls_section(
165 'shopengine_payment_methods',
166 [
167 'label' => esc_html__('Payment Methods', 'shopengine'),
168 'tab' => Controls_Manager::TAB_STYLE,
169 ]
170 );
171
172 $this->add_control(
173 'shopengine_payment_methods_checkboxes',
174 [
175 'label' => esc_html__('Checkboxes', 'shopengine'),
176 'type' => Controls_Manager::HEADING,
177 ]
178 );
179
180 $this->add_control(
181 'shopengine_payment_method_radio_input_color',
182 [
183 'label' => esc_html__('Radio Input Checked Color', 'shopengine'),
184 'type' => Controls_Manager::COLOR,
185 'alpha' => false,
186 'default' => '#000',
187 'selectors' => [
188 '{{WRAPPER}} .shopengine-checkout-payment #payment .wc_payment_method input[type="radio"]' => 'accent-color: {{VALUE}};'
189 ],
190 ]
191 );
192
193 $this->add_responsive_control(
194 'shopengine_payment_methods_checkbox_position_y',
195 [
196 'label' => esc_html__('Checkbox Position (Y)', 'shopengine'),
197 'type' => Controls_Manager::SLIDER,
198 'size_units' => ['px'],
199 'range' => [
200 'px' => [
201 'min' => -100,
202 'max' => 100,
203 'step' => 1,
204 ],
205 ],
206 'default' => [
207 'unit' => 'px',
208 'size' => 0,
209 ],
210 'selectors' => [
211 '{{WRAPPER}} .shopengine-checkout-payment #payment .wc_payment_method input[type="radio"]' => 'transform: translateY({{SIZE}}{{UNIT}});'
212 ],
213 ]
214 );
215
216 $this->add_responsive_control(
217 'shopengine_payment_methods_checkbox_margin',
218 [
219 'label' => esc_html__('Margin (px)', 'shopengine'),
220 'type' => Controls_Manager::DIMENSIONS,
221 'size_units' => ['px'],
222 'default' => [
223 'top' => '0',
224 'right' => '8',
225 'bottom' => '0',
226 'left' => '0',
227 'unit' => 'px',
228 'isLinked' => false,
229 ],
230 'selectors' => [
231 '{{WRAPPER}} .shopengine-checkout-payment #payment .wc_payment_method input[type="radio"]' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
232 '.rtl {{WRAPPER}} .shopengine-checkout-payment #payment .wc_payment_method input[type="radio"]' => 'margin: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}};',
233
234 ],
235 'separator' => 'before',
236 ]
237 );
238
239 $this->add_control(
240 'shopengine_payment_methods_list',
241 [
242 'label' => esc_html__('Payment Methods List', 'shopengine'),
243 'type' => Controls_Manager::HEADING,
244 'separator' => 'before',
245 ]
246 );
247
248 $this->add_responsive_control(
249 'shopengine_payment_methods_list_padding',
250 [
251 'label' => esc_html__('Padding (px)', 'shopengine'),
252 'type' => Controls_Manager::DIMENSIONS,
253 'size_units' => ['px'],
254 'default' => [
255 'top' => '10',
256 'right' => '0',
257 'bottom' => '10',
258 'left' => '0',
259 'unit' => 'px',
260 'isLinked' => false,
261 ],
262 'selectors' => [
263 '{{WRAPPER}} .shopengine-checkout-payment #payment .payment_methods li' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
264 '.rtl {{WRAPPER}} .shopengine-checkout-payment #payment .payment_methods li' => 'padding: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}} !important;',
265 ],
266 ]
267 );
268
269 $this->add_group_control(
270 Group_Control_Border::get_type(),
271 [
272 'name' => 'shopengine_payment_methods_list_border_between',
273 'label' => esc_html__('Border', 'shopengine'),
274 'selector' => '{{WRAPPER}} .shopengine-checkout-payment #payment .payment_methods li',
275 'separator' => 'before',
276 'fields_options' => [
277 'width' => [
278 'selectors' => [
279 '{{WRAPPER}} .shopengine-checkout-payment #payment .payment_methods li' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
280 '.rtl {{WRAPPER}} .shopengine-checkout-payment #payment .payment_methods li' => 'border-width: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}}',
281 ]
282 ]
283 ],
284 ]
285 );
286
287 $this->add_control(
288 'shopengine_payment_methods_description',
289 [
290 'label' => esc_html__('Payment Methods Description', 'shopengine'),
291 'type' => Controls_Manager::HEADING,
292 'separator' => 'before',
293 ]
294 );
295
296 $this->add_responsive_control(
297 'shopengine_payment_methods_description_padding',
298 [
299 'label' => esc_html__('Padding (px)', 'shopengine'),
300 'type' => Controls_Manager::DIMENSIONS,
301 'size_units' => ['px'],
302 'default' => [
303 'top' => '13',
304 'right' => '0',
305 'bottom' => '0',
306 'left' => '0',
307 'unit' => 'px',
308 'isLinked' => false,
309 ],
310 'selectors' => [
311 '{{WRAPPER}} .shopengine-checkout-payment #payment .payment_methods .payment_box p' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
312 '.rtl {{WRAPPER}} .shopengine-checkout-payment #payment .payment_methods .payment_box p' => 'padding: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}} !important;',
313 ],
314 ]
315 );
316
317 $this->end_controls_section(); // end ./ checkbox Section
318
319 $this->start_controls_section(
320 'shopengine_agreement_checkbox_section',
321 [
322 'label' => esc_html__('Agreement Checkbox', 'shopengine'),
323 'tab' => Controls_Manager::TAB_STYLE,
324 ]
325 );
326
327 $url = wp_customize_url().'?autofocus[section]=woocommerce_checkout';
328
329 $this->add_control(
330 'shopengine_agreement_checkbox_important_note',
331 [
332 'type' => \Elementor\Controls_Manager::RAW_HTML,
333 'raw' => __('If you do not find the checkbox option please go to <a target="_blank" href="'.esc_url($url).'"> Appearance > Customize > Woocommerce > Checkout </a> and set your terms & condition page', 'shopengine'),
334 'content_classes' => 'elementor-panel-alert elementor-panel-alert-info',
335 ]
336 );
337
338 $this->add_control(
339 'shopengine_agreement_label_text_color',
340 [
341 'label' => esc_html__('Label Text Color', 'shopengine'),
342 'type' => Controls_Manager::COLOR,
343 'alpha' => false,
344 'default' => '#3A3A3A',
345 'selectors' => [
346 '{{WRAPPER}} .woocommerce-form__label-for-checkbox .woocommerce-terms-and-conditions-checkbox-text' => 'color: {{VALUE}} !important;',
347 ],
348 ]
349 );
350
351 $this->add_control(
352 'shopengine_agreement_link_text_color',
353 [
354 'label' => esc_html__('Link Text Color', 'shopengine'),
355 'type' => Controls_Manager::COLOR,
356 'alpha' => false,
357 'default' => '#3A3A3A',
358 'selectors' => [
359 '{{WRAPPER}} .shopengine .woocommerce-terms-and-conditions-wrapper a' => 'color: {{VALUE}} !important;',
360 ],
361 ]
362 );
363
364 $this->add_control(
365 'shopengine_agreement_checkbox_checked_color',
366 [
367 'label' => esc_html__('Checkbox Input Checked Color', 'shopengine'),
368 'type' => Controls_Manager::COLOR,
369 'alpha' => false,
370 'default' => '#000',
371 'selectors' => [
372 '{{WRAPPER}} .woocommerce-form__label-for-checkbox .woocommerce-form__input-checkbox' => 'accent-color: {{VALUE}};'
373 ],
374 ]
375 );
376
377
378 $this->add_group_control(
379 Group_Control_Typography::get_type(),
380 [
381 'name' => 'shopengine_agreement_checkbox_label_typography',
382 'label' => esc_html__('Label typography', 'shopengine'),
383 'selector' => '{{WRAPPER}} .woocommerce-form__label-for-checkbox .woocommerce-terms-and-conditions-checkbox-text',
384 'exclude' => ['font_family', 'letter_spacing', 'text_decoration', 'text_transform', 'font_style', 'letter_spacing'],
385
386 'fields_options' => [
387 'typography' => [
388 'default' => 'custom',
389 ],
390 'font_weight' => [
391 'default' => '600',
392 ],
393 'font_size' => [
394 'label' => esc_html__('Font Size (px)', 'shopengine'),
395 'default' => [
396 'size' => '14',
397 'unit' => 'px',
398 ],
399 'size_units' => ['px'],
400 ],
401 'line_height' => [
402 'label' => esc_html__('Line Height (px)', 'shopengine'),
403 'default' => [
404 'size' => '17',
405 'unit' => 'px',
406 ],
407 'size_units' => ['px'],
408 ],
409 ],
410 ]
411 );
412
413 $this->add_group_control(
414 Group_Control_Typography::get_type(),
415 [
416 'name' => 'shopengine_agreement_checkbox_link_typography',
417 'label' => esc_html__('Link typography', 'shopengine'),
418 'selector' => '{{WRAPPER}} .shopengine-checkout-payment .woocommerce-terms-and-conditions-wrapper span a',
419 'exclude' => ['font_family', 'letter_spacing', 'text_decoration', 'text_transform', 'font_style', 'letter_spacing'],
420
421 'fields_options' => [
422 'typography' => [
423 'default' => 'custom',
424 ],
425 'font_weight' => [
426 'default' => '600',
427 ],
428 'font_size' => [
429 'label' => esc_html__('Font Size (px)', 'shopengine'),
430 'default' => [
431 'size' => '14',
432 'unit' => 'px',
433 ],
434 'size_units' => ['px'],
435 ],
436 'line_height' => [
437 'label' => esc_html__('Line Height (px)', 'shopengine'),
438 'default' => [
439 'size' => '17',
440 'unit' => 'px',
441 ],
442 'size_units' => ['px'],
443 ],
444 ],
445 ]
446 );
447
448 $this->add_responsive_control(
449 'shopengine_agreement_checkbox_margin',
450 [
451 'label' => esc_html__('Margin (px)', 'shopengine'),
452 'type' => Controls_Manager::DIMENSIONS,
453 'size_units' => ['px'],
454 'default' => [
455 'top' => '0',
456 'right' => '8',
457 'bottom' => '0',
458 'left' => '0',
459 'unit' => 'px',
460 'isLinked' => false,
461 ],
462 'selectors' => [
463 '{{WRAPPER}} .woocommerce-terms-and-conditions-wrapper' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
464 '.rtl {{WRAPPER}} .woocommerce-terms-and-conditions-wrapper' => 'margin: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}};',
465
466 ],
467 ]
468 );
469
470 $this->end_controls_section();
471
472 /*
473 ---------------------------------
474 button
475 ------------------------------------
476 */
477
478 $this->start_controls_section(
479 'shopengine_payment_order_button',
480 [
481 'label' => esc_html__('Button', 'shopengine'),
482 'tab' => Controls_Manager::TAB_STYLE,
483 ]
484 );
485
486 $this->add_control(
487 'shopengine_full_width_order_btn',
488 [
489 'label' => esc_html__('Full width button', 'shopengine'),
490 'type' => Controls_Manager::SWITCHER,
491 'label_on' => esc_html__('Show', 'shopengine'),
492 'label_off' => esc_html__('Hide', 'shopengine'),
493 'return_value' => 'yes',
494 'default' => 'yes',
495 ]
496 );
497
498 $this->add_responsive_control(
499 'shopengine_payment_order_button_space_between',
500 [
501 'label' => esc_html__('Space In-between
502 ', 'shopengine'),
503 'type' => Controls_Manager::SLIDER,
504 'size_units' => ['px'],
505 'range' => [
506 'px' => [
507 'min' => 0,
508 'max' => 100,
509 'step' => 5,
510 ],
511 ],
512 'default' => [
513 'unit' => 'px',
514 'size' => 20,
515 ],
516 'condition' => [
517 'shopengine_full_width_order_btn' => 'yes',
518 ],
519 'selectors' => [
520 '{{WRAPPER}} .shopengine-checkout-payment .form-row.place-order' => 'grid-template-columns: 100%; grid-gap: {{SIZE}}{{UNIT}} 0;',
521 ],
522 ]
523 );
524
525 $this->add_responsive_control(
526 'shopengine_payment_order_button_padding',
527 [
528 'label' => esc_html__('Padding', 'shopengine'),
529 'type' => Controls_Manager::DIMENSIONS,
530 'size_units' => ['px'],
531 'default' => [
532 'top' => '15',
533 'right' => '21',
534 'bottom' => '15',
535 'left' => '21',
536 'unit' => 'px',
537 'isLinked' => false,
538 ],
539 'selectors' => [
540 '{{WRAPPER}} .shopengine-checkout-payment #payment #place_order' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
541 '.rtl {{WRAPPER}} .shopengine-checkout-payment #payment #place_order' => 'padding: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}} !important;',
542 ],
543 ]
544 );
545
546 $this->add_group_control(
547 Group_Control_Border::get_type(),
548 [
549 'name' => 'shopengine_input_border',
550 'label' => esc_html__('Border', 'shopengine'),
551 'fields_options' => [
552 'border' => [
553 'default' => 'solid',
554 'responsive' => false,
555 'selectors' => [
556 '{{WRAPPER}} .shopengine-checkout-payment #payment #place_order' => 'border-style: {{VALUE}};',
557 ],
558 ],
559
560 'width' => [
561 'label' => esc_html__('Border Width', 'shopengine'),
562 'default' => [
563 'top' => '1',
564 'right' => '1',
565 'bottom' => '1',
566 'left' => '1',
567 'unit' => 'px',
568 ],
569 'selectors' => [
570 '{{WRAPPER}} .shopengine-checkout-payment #payment #place_order' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
571 '.rtl {{WRAPPER}} .shopengine-checkout-payment #payment #place_order' => 'border-width: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}};',
572 ],
573 'responsive' => false,
574 ],
575
576 'color' => [
577 'label' => esc_html__('Border Color', 'shopengine'),
578 'alpha' => false,
579 'responsive' => false,
580 'selectors' => [
581 '{{WRAPPER}} .shopengine-checkout-payment #payment #place_order' => 'border-color: {{VALUE}};',
582 ],
583 ],
584
585 ],
586 'separator' => 'before'
587 ]
588 );
589
590 $this->add_control(
591 'shopengine_payment_order_button_radius',
592 [
593 'label' => esc_html__('Border Radius', 'shopengine'),
594 'type' => Controls_Manager::DIMENSIONS,
595 'size_units' => ['px'],
596 'default' => [
597 'top' => '3',
598 'right' => '3',
599 'bottom' => '3',
600 'left' => '3',
601 'unit' => 'px',
602 'isLinked' => true,
603 ],
604 'selectors' => [
605 '{{WRAPPER}} .shopengine-checkout-payment #payment #place_order' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
606 '.rtl {{WRAPPER}} .shopengine-checkout-payment #payment #place_order' => 'border-radius: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}} !important;',
607 ],
608 'separator' => 'after'
609 ]
610 );
611
612 $this->add_group_control(
613 Group_Control_Typography::get_type(),
614 [
615 'name' => 'shopengine_payment_order_button_typography',
616 'label' => esc_html__('Button Typography', 'shopengine'),
617 'selector' => '{{WRAPPER}} .shopengine-checkout-payment #payment #place_order',
618 'exclude' => ['font_family', 'letter_spacing', 'font_style'],
619 'fields_options' => [
620 'typography' => [
621 'default' => 'custom',
622 ],
623 'font_weight' => [
624 'default' => '500',
625 ],
626 'font_size' => [
627 'label' => esc_html__('Font Size (px)', 'shopengine'),
628 'default' => [
629 'size' => '15',
630 'unit' => 'px',
631 ],
632 'size_units' => ['px'],
633 ],
634 'text_decoration' => [
635 'default' => 'none',
636 ],
637 ],
638 ]
639 );
640
641 $this->add_group_control(
642 Group_Control_Box_Shadow::get_type(),
643 [
644 'name' => 'shopengine_payment_order_button_shadow',
645 'label' => esc_html__('Box Shadow', 'shopengine'),
646 'selector' => '{{WRAPPER}} .shopengine-checkout-payment #payment #place_order',
647 ]
648 );
649
650 $this->start_controls_tabs('shopengine_payment_order_button_tabs');
651
652 $this->start_controls_tab(
653 'shopengine_payment_order_button_tabs_normal',
654 [
655 'label' => esc_html__('Normal', 'shopengine'),
656 ]
657 );
658
659 $this->add_control(
660 'shopengine_payment_order_button_tabs_normal_clr',
661 [
662 'label' => esc_html__('Color', 'shopengine'),
663 'type' => Controls_Manager::COLOR,
664 'default' => '#ffffff',
665 'alpha' => false,
666 'selectors' => [
667 '{{WRAPPER}} .shopengine-checkout-payment #payment #place_order' => 'color: {{VALUE}}',
668 ],
669 ]
670 );
671
672 $this->add_control(
673 'shopengine_payment_order_button_tabs_normal_bg',
674 [
675 'label' => esc_html__('Background', 'shopengine'),
676 'type' => Controls_Manager::COLOR,
677 'default' => '#3A3A3A',
678 'alpha' => false,
679 'selectors' => [
680 '{{WRAPPER}} .shopengine-checkout-payment #payment #place_order' => 'background: {{VALUE}}',
681 ],
682 ]
683 );
684
685 $this->end_controls_tab();
686
687 $this->start_controls_tab(
688 'shopengine_payment_order_button_tabs_hover',
689 [
690 'label' => esc_html__('Hover', 'shopengine'),
691 ]
692 );
693
694 $this->add_control(
695 'shopengine_payment_order_button_tabs_hover_clr',
696 [
697 'label' => esc_html__('Color', 'shopengine'),
698 'type' => Controls_Manager::COLOR,
699 'alpha' => false,
700 'default' => '#ffffff',
701 'selectors' => [
702 '{{WRAPPER}} .shopengine-checkout-payment #payment #place_order:hover' => 'color: {{VALUE}}',
703 ],
704 ]
705 );
706
707 $this->add_control(
708 'shopengine_payment_order_button_tabs_hover_bg',
709 [
710 'label' => esc_html__('Background', 'shopengine'),
711 'type' => Controls_Manager::COLOR,
712 'default' => '#101010',
713 'alpha' => false,
714 'selectors' => [
715 '{{WRAPPER}} .shopengine-checkout-payment #payment #place_order:hover' => 'background: {{VALUE}}',
716 ],
717 ]
718 );
719
720
721 $this->end_controls_tab();
722 $this->end_controls_tabs();
723
724 $this->add_responsive_control(
725 'shopengine_payment_order_button_wrap_margin',
726 [
727 'label' => esc_html__('Wrap Margin (px)', 'shopengine'),
728 'type' => Controls_Manager::DIMENSIONS,
729 'size_units' => ['px'],
730 'default' => [
731 'top' => '10',
732 'right' => '0',
733 'bottom' => '0',
734 'left' => '0',
735 'unit' => 'px',
736 'isLinked' => false,
737 ],
738 'selectors' => [
739 '{{WRAPPER}} .shopengine-checkout-payment #payment .form-row.place-order' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
740 '.rtl {{WRAPPER}} .shopengine-checkout-payment #payment .form-row.place-order' => 'margin: {{TOP}}{{UNIT}} {{LEFT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{RIGHT}}{{UNIT}} !important;',
741 ],
742 'separator' => 'before',
743 ]
744 );
745
746 $this->end_controls_section(); // end ./ button
747
748
749 /**
750 * Section: Global Font
751 */
752 $this->start_controls_section(
753 'shopengine_section_style_global',
754 [
755 'label' => esc_html__('Global Font', 'shopengine'),
756 'tab' => Controls_Manager::TAB_STYLE,
757 ]
758 );
759 $this->add_control(
760 'shopengine_archive_products_font_family',
761 [
762 'label' => esc_html__('Font Family', 'shopengine'),
763 'description' => esc_html__('This font family is set for this specific widget.', 'shopengine'),
764 'type' => Controls_Manager::FONT,
765 'selectors' => [
766 '{{WRAPPER}} .shopengine-checkout-payment .wc_payment_method label,
767 {{WRAPPER}} .shopengine-checkout-payment #payment :is(.payment_box, .woocommerce-terms-and-conditions-wrapper, .payment_method_paypal) :is(p),
768 {{WRAPPER}} .shopengine-checkout-payment #payment #place_order' => 'font-family: {{VALUE}};',
769 ],
770 ]
771 );
772 $this->end_controls_section();
773 }
774
775 /**
776 * Render widget output on the frontend.
777 *
778 * Written in PHP and used to generate the final HTML.
779 *
780 * @since 1.0.0
781 * @access protected
782 */
783 protected function screen() {
784
785 $tpl = Products::instance()->get_widget_template($this->get_name());
786
787 include $tpl;
788 }
789 }
790