WooCommerce Checkout Manager - Version 4.4.3

Version Description

  • Fix: woocommerce checkout hide field based on product id rebuilt
  • Fix: woocommerce checkout hide field based on product category rebuilt
Download this release

Release Info

Developer quadlayers
Plugin Icon 128x128 WooCommerce Checkout Manager
Version 4.4.3
Comparing to
See all releases

Code changes from version 4.4.2 to 4.4.3

assets/js/wooccm-admin.js CHANGED
@@ -1,5 +1,27 @@
1
  (function ($) {
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  /* Toggle gateway on/off.
4
  $('#wooccm_billing_settings_add').on('click', function () {
5
 
1
  (function ($) {
2
 
3
+ $.fn.serializeArrayAll = function () {
4
+ var o = {};
5
+ var a = this.serializeArray();
6
+ $.each(a, function () {
7
+ if (o[this.name] !== undefined) {
8
+ if (!o[this.name].push) {
9
+ o[this.name] = [o[this.name]];
10
+ }
11
+ o[this.name].push(this.value || '');
12
+ } else {
13
+ o[this.name] = this.value || '';
14
+ }
15
+ });
16
+ var $radio = $('input[type=radio],input[type=checkbox]', this);
17
+ $.each($radio, function () {
18
+ if (!o.hasOwnProperty(this.name)) {
19
+ o[this.name] = '';
20
+ }
21
+ });
22
+ return o;
23
+ };
24
+
25
  /* Toggle gateway on/off.
26
  $('#wooccm_billing_settings_add').on('click', function () {
27
 
assets/js/wooccm-admin.min.js CHANGED
@@ -1 +1 @@
1
- (function(a){a("#wooccm_billing_fields").on("click",".wooccm-field-toggle-enabled",function(){var b=a(this),d=b.closest("tr"),c=b.find(".woocommerce-input-toggle");a.ajax({url:woocommerce_admin.ajax_url,data:{action:"wooccm_toggle_field_enabled",nonce:wooccm.nonce,field_id:d.data("field_id")},dataType:"json",type:"POST",beforeSend:function(e){c.addClass("woocommerce-input-toggle--loading")},success:function(e){if(true===e.data){c.removeClass("woocommerce-input-toggle--enabled, woocommerce-input-toggle--disabled");c.addClass("woocommerce-input-toggle--enabled");c.removeClass("woocommerce-input-toggle--loading")}else{if(true!==e.data){c.removeClass("woocommerce-input-toggle--enabled, woocommerce-input-toggle--disabled");c.addClass("woocommerce-input-toggle--disabled");c.removeClass("woocommerce-input-toggle--loading")}}}});return false})})(jQuery);
1
+ (function(a){a.fn.serializeArrayAll=function(){var d={};var c=this.serializeArray();a.each(c,function(){if(d[this.name]!==undefined){if(!d[this.name].push){d[this.name]=[d[this.name]]}d[this.name].push(this.value||"")}else{d[this.name]=this.value||""}});var b=a("input[type=radio],input[type=checkbox]",this);a.each(b,function(){if(!d.hasOwnProperty(this.name)){d[this.name]=""}});return d};a("#wooccm_billing_fields").on("click",".wooccm-field-toggle-enabled",function(){var b=a(this),d=b.closest("tr"),c=b.find(".woocommerce-input-toggle");a.ajax({url:woocommerce_admin.ajax_url,data:{action:"wooccm_toggle_field_enabled",nonce:wooccm.nonce,field_id:d.data("field_id")},dataType:"json",type:"POST",beforeSend:function(e){c.addClass("woocommerce-input-toggle--loading")},success:function(e){if(true===e.data){c.removeClass("woocommerce-input-toggle--enabled, woocommerce-input-toggle--disabled");c.addClass("woocommerce-input-toggle--enabled");c.removeClass("woocommerce-input-toggle--loading")}else{if(true!==e.data){c.removeClass("woocommerce-input-toggle--enabled, woocommerce-input-toggle--disabled");c.addClass("woocommerce-input-toggle--disabled");c.removeClass("woocommerce-input-toggle--loading")}}}});return false})})(jQuery);
assets/js/wooccm-modal.js CHANGED
@@ -17,7 +17,6 @@
17
  var unblock = function ($node) {
18
  $node.removeClass('processing').unblock();
19
  };
20
-
21
  var wpmi = {
22
  __instance: undefined
23
  };
@@ -27,9 +26,9 @@
27
  'click .media-modal-backdrop': 'Close',
28
  'click .media-modal-close': 'Close',
29
  'click .media-modal-delete': 'Delete',
30
- 'click .media-modal-save': 'Save',
31
  'click .media-modal-prev': 'update',
32
  'click .media-modal-next': 'update',
 
33
  },
34
  templates: {},
35
  initialize: function (e) {
@@ -43,9 +42,7 @@
43
  },
44
  render: function (field_id) {
45
  'use strict';
46
-
47
  var $modal = this;
48
-
49
  $.ajax({
50
  url: woocommerce_admin.ajax_url,
51
  data: {
@@ -76,31 +73,25 @@
76
  },
77
  update: function (e) {
78
  'use strict';
79
-
80
  var $button = $(e.target),
81
  field_id = $button.data('field_id');
82
-
83
  this.render(field_id);
84
  },
85
  open: function (e) {
86
  'use strict';
87
-
88
  var $button = $(e.target),
89
  $tr = $button.closest('tr'),
90
  field_id = $tr.data('field_id');
91
-
92
  this.render(field_id);
93
-
94
  $('body').addClass('modal-open').append(this.$el);
95
-
96
  },
97
  /*preserveFocus: function (e) {
98
- 'use strict';
99
-
100
- if (this.$el[0] !== e.target && !this.$el.has(e.target).length) {
101
- this.$el.focus();
102
- }
103
- },*/
104
  Close: function (e) {
105
  'use strict';
106
  e.preventDefault();
@@ -113,18 +104,51 @@
113
  Save: function (e) {
114
  'use strict';
115
  e.preventDefault();
 
 
 
 
 
116
 
117
- var $modal = this;
118
-
119
-
120
- $modal.Close(e);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
121
  },
122
  Delete: function (e) {
123
  'use strict';
124
  e.preventDefault();
125
-
126
  var $modal = this;
127
-
128
  $modal.Close(e);
129
  }
130
  });
17
  var unblock = function ($node) {
18
  $node.removeClass('processing').unblock();
19
  };
 
20
  var wpmi = {
21
  __instance: undefined
22
  };
26
  'click .media-modal-backdrop': 'Close',
27
  'click .media-modal-close': 'Close',
28
  'click .media-modal-delete': 'Delete',
 
29
  'click .media-modal-prev': 'update',
30
  'click .media-modal-next': 'update',
31
+ 'submit .media-modal-form': 'Save',
32
  },
33
  templates: {},
34
  initialize: function (e) {
42
  },
43
  render: function (field_id) {
44
  'use strict';
 
45
  var $modal = this;
 
46
  $.ajax({
47
  url: woocommerce_admin.ajax_url,
48
  data: {
73
  },
74
  update: function (e) {
75
  'use strict';
 
76
  var $button = $(e.target),
77
  field_id = $button.data('field_id');
 
78
  this.render(field_id);
79
  },
80
  open: function (e) {
81
  'use strict';
 
82
  var $button = $(e.target),
83
  $tr = $button.closest('tr'),
84
  field_id = $tr.data('field_id');
 
85
  this.render(field_id);
 
86
  $('body').addClass('modal-open').append(this.$el);
 
87
  },
88
  /*preserveFocus: function (e) {
89
+ 'use strict';
90
+
91
+ if (this.$el[0] !== e.target && !this.$el.has(e.target).length) {
92
+ this.$el.focus();
93
+ }
94
+ },*/
95
  Close: function (e) {
96
  'use strict';
97
  e.preventDefault();
104
  Save: function (e) {
105
  'use strict';
106
  e.preventDefault();
107
+ var $form = $(e.target),
108
+ $modal = this.$el,
109
+ $spinner = $modal.find('.settings-save-status .spinner');
110
+ //$spinner = settings-save-status
111
+ //console.log($form.serialize());
112
 
113
+ $.ajax({
114
+ url: woocommerce_admin.ajax_url,
115
+ data: {
116
+ action: 'wooccm_save_field',
117
+ nonce: wooccm.nonce,
118
+ field_id: $form.data('field_id'),
119
+ //options_name: $tr.data('options_name'),
120
+ //options_key: $tr.data('options_key'),
121
+ field_data: $form.serializeArrayAll()
122
+ },
123
+ //data: $.param({field_data: $form.serializeArrayAll()}) + '&' + $.param({action: 'wooccm_save_field'}) + '&' + $.param({nonce: wooccm.nonce}),
124
+ dataType: 'json',
125
+ type: 'POST',
126
+ beforeSend: function () {
127
+ $spinner.addClass('is-active');
128
+ block($modal);
129
+ },
130
+ complete: function () {
131
+ $spinner.removeClass('is-active');
132
+ unblock($modal);
133
+ //$modal.Close(e);
134
+ },
135
+ error: function () {
136
+ alert('Error!');
137
+ },
138
+ success: function (response) {
139
+ console.log(response);
140
+ //$modal.$el.attr('tabindex', '0');
141
+ //$modal.$el.html($modal.templates.window(response.data));
142
+ //$(document).on('focusin', $modal.preserveFocus);
143
+ //$modal.$el.focus().trigger('wc-init-tabbed-panels');
144
+ }
145
+ });
146
+ return false;
147
  },
148
  Delete: function (e) {
149
  'use strict';
150
  e.preventDefault();
 
151
  var $modal = this;
 
152
  $modal.Close(e);
153
  }
154
  });
assets/js/wooccm-modal.min.js CHANGED
@@ -1 +1 @@
1
- (function(c){var d=function(f){return f.is(".processing")||f.parents(".processing").length};var e=function(f){if(!d(f)){f.addClass("processing").block({message:null,overlayCSS:{background:"#fff",opacity:0.6}})}};var b=function(f){f.removeClass("processing").unblock()};var a={__instance:undefined};a.Application=Backbone.View.extend({id:"wpmi_modal",events:{"click .media-modal-backdrop":"Close","click .media-modal-close":"Close","click .media-modal-delete":"Delete","click .media-modal-save":"Save","click .media-modal-prev":"update","click .media-modal-next":"update",},templates:{},initialize:function(f){_.bindAll(this,"open","update","render","Close","Save");this.init();this.open(f)},init:function(){this.templates.window=wp.template("wpmi-modal-window")},render:function(g){var f=this;c.ajax({url:woocommerce_admin.ajax_url,data:{action:"wooccm_edit_field",nonce:wooccm.nonce,field_id:g},dataType:"json",type:"POST",beforeSend:function(){},complete:function(){},error:function(){alert("Error!")},success:function(h){f.$el.attr("tabindex","0");f.$el.html(f.templates.window(h.data));f.$el.focus().trigger("wc-init-tabbed-panels")}})},update:function(h){var g=c(h.target),f=g.data("field_id");this.render(f)},open:function(i){var h=c(i.target),g=h.closest("tr"),f=g.data("field_id");this.render(f);c("body").addClass("modal-open").append(this.$el)},Close:function(f){f.preventDefault();this.undelegateEvents();c(document).off("focusin");c("body").removeClass("modal-open");this.remove();a.__instance=undefined},Save:function(g){g.preventDefault();var f=this;f.Close(g)},Delete:function(g){g.preventDefault();var f=this;f.Close(g)}});c("#wooccm_billing_settings_add").on("click",function(f){f.preventDefault();if(a.__instance===undefined){a.__instance=new a.Application(f)}});c(".wooccm_billing_settings_edit").on("click",function(f){f.preventDefault();if(a.__instance===undefined){a.__instance=new a.Application(f)}})})(jQuery);
1
+ (function(c){var d=function(f){return f.is(".processing")||f.parents(".processing").length};var e=function(f){if(!d(f)){f.addClass("processing").block({message:null,overlayCSS:{background:"#fff",opacity:0.6}})}};var b=function(f){f.removeClass("processing").unblock()};var a={__instance:undefined};a.Application=Backbone.View.extend({id:"wpmi_modal",events:{"click .media-modal-backdrop":"Close","click .media-modal-close":"Close","click .media-modal-delete":"Delete","click .media-modal-prev":"update","click .media-modal-next":"update","submit .media-modal-form":"Save",},templates:{},initialize:function(f){_.bindAll(this,"open","update","render","Close","Save");this.init();this.open(f)},init:function(){this.templates.window=wp.template("wpmi-modal-window")},render:function(g){var f=this;c.ajax({url:woocommerce_admin.ajax_url,data:{action:"wooccm_edit_field",nonce:wooccm.nonce,field_id:g},dataType:"json",type:"POST",beforeSend:function(){},complete:function(){},error:function(){alert("Error!")},success:function(h){f.$el.attr("tabindex","0");f.$el.html(f.templates.window(h.data));f.$el.focus().trigger("wc-init-tabbed-panels")}})},update:function(h){var g=c(h.target),f=g.data("field_id");this.render(f)},open:function(i){var h=c(i.target),g=h.closest("tr"),f=g.data("field_id");this.render(f);c("body").addClass("modal-open").append(this.$el)},Close:function(f){f.preventDefault();this.undelegateEvents();c(document).off("focusin");c("body").removeClass("modal-open");this.remove();a.__instance=undefined},Save:function(i){i.preventDefault();var f=c(i.target),g=this.$el,h=g.find(".settings-save-status .spinner");c.ajax({url:woocommerce_admin.ajax_url,data:{action:"wooccm_save_field",nonce:wooccm.nonce,field_id:f.data("field_id"),field_data:f.serializeArrayAll()},dataType:"json",type:"POST",beforeSend:function(){h.addClass("is-active");e(g)},complete:function(){h.removeClass("is-active");b(g)},error:function(){alert("Error!")},success:function(j){console.log(j)}});return false},Delete:function(g){g.preventDefault();var f=this;f.Close(g)}});c("#wooccm_billing_settings_add").on("click",function(f){f.preventDefault();if(a.__instance===undefined){a.__instance=new a.Application(f)}});c(".wooccm_billing_settings_edit").on("click",function(f){f.preventDefault();if(a.__instance===undefined){a.__instance=new a.Application(f)}})})(jQuery);
includes/templates/functions/add_functions.php CHANGED
@@ -581,235 +581,5 @@ jQuery(document).ready(function($){
581
 
582
  <?php
583
 
584
- // ================================ END!!! =====================================
585
- // =============================================================================
586
-
587
- // ----------------------------- CLEAR ---------------------------------
588
- // ---------------------------------------------------------------------
589
- // ---------------------------------------------------------------------
590
-
591
- $categoryarraycm = array();
592
- $productsarraycm = array();
593
-
594
- foreach( $options['buttons'] as $btn ) {
595
- foreach( $woocommerce->cart->cart_contents as $key => $values ) {
596
-
597
- $multiproductsx = $btn['single_p'];
598
- $show_field_single = $btn['single_px'];
599
- $multiproductsx_cat = $btn['single_p_cat'];
600
- $show_field_single_cat = $btn['single_px_cat'];
601
-
602
- $productsarraycm[] = $values['product_id'];
603
-
604
- // Products
605
- // hide field
606
-
607
- // without more
608
- if( !empty( $btn['single_p'] ) && empty( $btn['more_content'] ) ) {
609
-
610
- $multiarrayproductsx = explode( ',', $multiproductsx );
611
-
612
- if( in_array( $values['product_id'], $multiarrayproductsx ) && ( count( $woocommerce->cart->cart_contents ) < 2 ) ) {
613
- echo '
614
- <style type="text/css">
615
- .woocommerce form #customer_details #'.$btn['cow'].'_field,
616
- .woocommerce-page form #customer_details #'.$btn['cow'].'_field,
617
- .woocommerce form.checkout #'.$btn['cow'].'_field {
618
- display: none;
619
- }
620
- </style>';
621
- }
622
- }
623
-
624
- // show field without more
625
- if( !empty( $btn['single_px'] ) && empty( $btn['more_content'] ) ) {
626
-
627
- $show_field_array = explode( '||', $show_field_single );
628
-
629
- if( in_array( $values['product_id'], $show_field_array ) && ( count( $woocommerce->cart->cart_contents ) < 2 ) ) {
630
- echo '
631
- <style type="text/css">
632
- .woocommerce form #customer_details #'.$btn['cow'].'_field,
633
- .woocommerce-page form #customer_details #'.$btn['cow'].'_field,
634
- .woocommerce form.checkout #'.$btn['cow'].'_field {
635
- display: inline-block;
636
- }
637
- </style>';
638
- }
639
-
640
- if( !in_array( $values['product_id'], $show_field_array ) && ( count( $woocommerce->cart->cart_contents ) < 2 ) ) {
641
- echo '
642
- <style type="text/css">
643
- .woocommerce form #customer_details #'.$btn['cow'].'_field,
644
- .woocommerce-page form #customer_details #'.$btn['cow'].'_field,
645
- .woocommerce form.checkout #'.$btn['cow'].'_field {
646
- display: none;
647
- }
648
- </style>';
649
- }
650
- }
651
-
652
- // Category
653
- // hide field
654
- $terms = get_the_terms( $values['product_id'], 'product_cat' );
655
- if( !empty($terms) ) {
656
- foreach( $terms as $term ) {
657
-
658
- $categoryarraycm[] = $term->slug;
659
-
660
- // without more
661
-
662
- if( !empty( $btn['single_p_cat'] ) && empty( $btn['more_content'] ) ) {
663
-
664
- $multiarrayproductsx_cat = explode( ',', $multiproductsx_cat );
665
-
666
- if( in_array( $term->slug, $multiarrayproductsx_cat ) && ( count( $woocommerce->cart->cart_contents ) < 2 ) ) {
667
- echo '
668
- <style type="text/css">
669
- .woocommerce form #customer_details #'.$btn['cow'].'_field,
670
- .woocommerce-page form #customer_details #'.$btn['cow'].'_field,
671
- .woocommerce form.checkout #'.$btn['cow'].'_field {
672
- display: none;
673
- }
674
- </style>';
675
- }
676
- }
677
-
678
- // show field without more
679
- if( !empty( $btn['single_px_cat'] ) && empty( $btn['more_content'] ) ) {
680
-
681
- $show_field_array_cat = explode('||',$show_field_single_cat);
682
-
683
- if( in_array( $term->slug, $show_field_array_cat ) && ( count( $woocommerce->cart->cart_contents ) < 2 ) ) {
684
- echo '
685
- <style type="text/css">
686
- .woocommerce form #customer_details #'.$btn['cow'].'_field,
687
- .woocommerce-page form #customer_details #'.$btn['cow'].'_field,
688
- .woocommerce form.checkout #'.$btn['cow'].'_field {
689
- display: inline-block;
690
- }
691
- </style>';
692
- }
693
-
694
- if( !in_array( $term->slug, $show_field_array_cat ) && ( count( $woocommerce->cart->cart_contents ) < 2 ) ) {
695
- echo '
696
- <style type="text/css">
697
- .woocommerce form #customer_details #'.$btn['cow'].'_field,
698
- .woocommerce-page form #customer_details #'.$btn['cow'].'_field,
699
- .woocommerce form.checkout #'.$btn['cow'].'_field {
700
- display: none;
701
- }
702
- </style>';
703
- }
704
- }
705
-
706
- }
707
- }
708
- }
709
- // end cart
710
-
711
- // ===========================================================================================
712
-
713
- // Products
714
- // hide field
715
-
716
- // with more
717
- if( !empty( $btn['single_p'] ) && !empty( $btn['more_content'] ) ) {
718
-
719
- $multiarrayproductsx = explode( ',', $multiproductsx );
720
-
721
- if( array_intersect( $productsarraycm, $multiarrayproductsx ) ) {
722
- echo '
723
- <style type="text/css">
724
- .woocommerce form #customer_details #'.$btn['cow'].'_field,
725
- .woocommerce-page form #customer_details #'.$btn['cow'].'_field,
726
- .woocommerce form.checkout #'.$btn['cow'].'_field {
727
- display: none;
728
- }
729
- </style>';
730
- }
731
- }
732
-
733
- // show field with more
734
- if( !empty( $btn['single_px'] ) && !empty( $btn['more_content'] ) ) {
735
-
736
- $show_field_array = explode( '||', $show_field_single );
737
-
738
- if( array_intersect( $productsarraycm, $show_field_array ) ) {
739
- echo '
740
- <style type="text/css">
741
- .woocommerce form #customer_details #'.$btn['cow'].'_field,
742
- .woocommerce-page form #customer_details #'.$btn['cow'].'_field,
743
- .woocommerce form.checkout #'.$btn['cow'].'_field {
744
- display: inline-block;
745
- }
746
- </style>';
747
- }
748
-
749
- if( !array_intersect( $productsarraycm, $show_field_array ) ) {
750
- echo '
751
- <style type="text/css">
752
- .woocommerce form #customer_details #'.$btn['cow'].'_field,
753
- .woocommerce-page form #customer_details #'.$btn['cow'].'_field,
754
- .woocommerce form.checkout #'.$btn['cow'].'_field {
755
- display: none;
756
- }
757
- </style>';
758
- }
759
- }
760
-
761
- // Category
762
- // hide field
763
-
764
- // with more
765
- if( !empty( $btn['single_p_cat'] ) && !empty( $btn['more_content'] ) ) {
766
-
767
- $multiarrayproductsx_cat = explode( ',', $multiproductsx_cat );
768
-
769
- if( array_intersect( $categoryarraycm, $multiarrayproductsx_cat ) ) {
770
- echo '
771
- <style type="text/css">
772
- .woocommerce form #customer_details #'.$btn['cow'].'_field,
773
- .woocommerce-page form #customer_details #'.$btn['cow'].'_field,
774
- .woocommerce form.checkout #'.$btn['cow'].'_field {
775
- display: none;
776
- }
777
- </style>';
778
- }
779
- }
780
-
781
- // show field with more
782
- if( !empty( $btn['single_px_cat'] ) && !empty( $btn['more_content'] ) ) {
783
-
784
- $show_field_array_cat = explode( '||', $show_field_single_cat );
785
-
786
- if( array_intersect( $categoryarraycm, $show_field_array_cat ) ) {
787
- echo '
788
- <style type="text/css">
789
- .woocommerce form #customer_details #'.$btn['cow'].'_field,
790
- .woocommerce-page form #customer_details #'.$btn['cow'].'_field,
791
- .woocommerce form.checkout #'.$btn['cow'].'_field {
792
- display: inline-block;
793
- }
794
- </style>';
795
- }
796
-
797
- if( !array_intersect( $categoryarraycm, $show_field_array_cat ) ) {
798
- echo '
799
- <style type="text/css">
800
- .woocommerce form #customer_details #'.$btn['cow'].'_field,
801
- .woocommerce-page form #customer_details #'.$btn['cow'].'_field,
802
- .woocommerce form.checkout #'.$btn['cow'].'_field {
803
- display: none;
804
- }
805
- </style>';
806
- }
807
- }
808
-
809
- $categoryarraycm = array();
810
- $productsarraycm = array();
811
-
812
- } // btn cut
813
-
814
  }
815
  ?>
581
 
582
  <?php
583
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
584
  }
585
  ?>
includes/templates/functions/billing_functions.php CHANGED
@@ -608,226 +608,6 @@ function wooccm_billing_override_this() {
608
  </script>
609
 
610
  <?php
611
- // ================================ END!!! =====================================
612
- // =============================================================================
613
- // ----------------------------- CLEAR ---------------------------------
614
- // ---------------------------------------------------------------------
615
- // ---------------------------------------------------------------------
616
-
617
- $categoryarraycm = array();
618
- $productsarraycm = array();
619
-
620
- foreach ($options['billing_buttons'] as $btn) {
621
- foreach ($woocommerce->cart->cart_contents as $key => $values) {
622
-
623
- $multiproductsx = ( isset($btn['single_p']) ? $btn['single_p'] : '' );
624
- $show_field_single = ( isset($btn['single_px']) ? $btn['single_px'] : '' );
625
- $multiproductsx_cat = ( isset($btn['single_p_cat']) ? $btn['single_p_cat'] : '' );
626
- $show_field_single_cat = ( isset($btn['single_px_cat']) ? $btn['single_px_cat'] : '' );
627
-
628
- $productsarraycm[] = $values['product_id'];
629
-
630
- // Products
631
- // hide field
632
- // without more
633
- if (!empty($btn['single_p']) && empty($btn['more_content'])) {
634
-
635
- $multiarrayproductsx = explode(',', $multiproductsx);
636
-
637
- if (in_array($values['product_id'], $multiarrayproductsx) && ( count($woocommerce->cart->cart_contents) < 2 )) {
638
- echo '
639
- <style type="text/css">
640
- .woocommerce form #customer_details #billing_' . $btn['cow'] . '_field,
641
- .woocommerce-page form #customer_details #billing_' . $btn['cow'] . '_field,
642
- .woocommerce form.checkout #billing_' . $btn['cow'] . '_field {
643
- display: none;
644
- }
645
- </style>';
646
- }
647
- }
648
-
649
- // show field without more
650
- if (!empty($btn['single_px']) && empty($btn['more_content'])) {
651
-
652
- $show_field_array = explode('||', $show_field_single);
653
-
654
- if (in_array($values['product_id'], $show_field_array) && ( count($woocommerce->cart->cart_contents) < 2 )) {
655
- echo '
656
- <style type="text/css">
657
- .woocommerce form #customer_details #billing_' . $btn['cow'] . '_field,
658
- .woocommerce-page form #customer_details #billing_' . $btn['cow'] . '_field,
659
- .woocommerce form.checkout #billing_' . $btn['cow'] . '_field {
660
- display: inline-block;
661
- }
662
- </style>';
663
- }
664
-
665
- if (!in_array($values['product_id'], $show_field_array) && ( count($woocommerce->cart->cart_contents) < 2 )) {
666
- echo '
667
- <style type="text/css">
668
- .woocommerce form #customer_details #billing_' . $btn['cow'] . '_field,
669
- .woocommerce-page form #customer_details #billing_' . $btn['cow'] . '_field,
670
- .woocommerce form.checkout #billing_' . $btn['cow'] . '_field {
671
- display: none;
672
- }
673
- </style>';
674
- }
675
- }
676
-
677
- // Category
678
- // hide field
679
- /*$terms = get_the_terms($values['product_id'], 'product_cat');
680
- if (!empty($terms)) {
681
- foreach ($terms as $term) {
682
-
683
- $categoryarraycm[] = $term->slug;
684
-
685
- // without more
686
-
687
- if (!empty($btn['single_p_cat']) && empty($btn['more_content'])) {
688
-
689
- $multiarrayproductsx_cat = explode(',', $multiproductsx_cat);
690
-
691
- if (in_array($term->slug, $multiarrayproductsx_cat) && ( count($woocommerce->cart->cart_contents) < 2 )) {
692
- echo '
693
- <style type="text/css">
694
- .woocommerce form #customer_details #billing_' . $btn['cow'] . '_field,
695
- .woocommerce-page form #customer_details #billing_' . $btn['cow'] . '_field,
696
- .woocommerce form.checkout #billing_' . $btn['cow'] . '_field {
697
- display: none;
698
- }
699
- </style>';
700
- }
701
- }
702
-
703
- // show field without more
704
- /*if (!empty($btn['single_px_cat']) && empty($btn['more_content'])) {
705
-
706
- $show_field_array_cat = explode('||', $show_field_single_cat);
707
-
708
- if (in_array($term->slug, $show_field_array_cat) && ( count($woocommerce->cart->cart_contents) < 2 )) {
709
- echo '
710
- <style type="text/css">
711
- .woocommerce form #customer_details #billing_' . $btn['cow'] . '_field,
712
- .woocommerce-page form #customer_details #billing_' . $btn['cow'] . '_field,
713
- .woocommerce form.checkout #billing_' . $btn['cow'] . '_field {
714
- display: inline-block;
715
- }
716
- </style>';
717
- }
718
-
719
- if (!in_array($term->slug, $show_field_array_cat) && ( count($woocommerce->cart->cart_contents) < 2 )) {
720
- echo '
721
- <style type="text/css">
722
- .woocommerce form #customer_details #billing_' . $btn['cow'] . '_field,
723
- .woocommerce-page form #customer_details #billing_' . $btn['cow'] . '_field,
724
- .woocommerce form.checkout #billing_' . $btn['cow'] . '_field {
725
- display: none;
726
- }
727
- </style>';
728
- }
729
- }
730
- }
731
- }*/
732
- }
733
- // end cart
734
- // ===========================================================================================
735
- // Products
736
- // hide field
737
- // with more
738
- if (!empty($btn['single_p']) && !empty($btn['more_content'])) {
739
-
740
- $multiarrayproductsx = explode(',', $multiproductsx);
741
-
742
- if (array_intersect($productsarraycm, $multiarrayproductsx)) {
743
- echo '
744
- <style type="text/css">
745
- .woocommerce form #customer_details #billing_' . $btn['cow'] . '_field,
746
- .woocommerce-page form #customer_details #billing_' . $btn['cow'] . '_field,
747
- .woocommerce form.checkout #billing_' . $btn['cow'] . '_field {
748
- display: none;
749
- }
750
- </style>';
751
- }
752
- }
753
-
754
- // show field with more
755
- if (!empty($btn['single_px']) && !empty($btn['more_content'])) {
756
-
757
- $show_field_array = explode('||', $show_field_single);
758
-
759
- if (array_intersect($productsarraycm, $show_field_array)) {
760
- echo '
761
- <style type="text/css">
762
- .woocommerce form #customer_details #billing_' . $btn['cow'] . '_field,
763
- .woocommerce-page form #customer_details #billing_' . $btn['cow'] . '_field,
764
- .woocommerce form.checkout #billing_' . $btn['cow'] . '_field {
765
- display: inline-block;
766
- }
767
- </style>';
768
- }
769
-
770
- if (!array_intersect($productsarraycm, $show_field_array)) {
771
- echo '
772
- <style type="text/css">
773
- .woocommerce form #customer_details #billing_' . $btn['cow'] . '_field,
774
- .woocommerce-page form #customer_details #billing_' . $btn['cow'] . '_field,
775
- .woocommerce form.checkout #billing_' . $btn['cow'] . '_field {
776
- display: none;
777
- }
778
- </style>';
779
- }
780
- }
781
-
782
- // Category
783
- // hide field
784
- // with more
785
- /*if (!empty($btn['single_p_cat']) && !empty($btn['more_content'])) {
786
-
787
- $multiarrayproductsx_cat = explode(',', $multiproductsx_cat);
788
-
789
- if (array_intersect($categoryarraycm, $multiarrayproductsx_cat)) {
790
- echo '
791
- <style type="text/css">
792
- .woocommerce form #customer_details #billing_' . $btn['cow'] . '_field,
793
- .woocommerce-page form #customer_details #billing_' . $btn['cow'] . '_field,
794
- .woocommerce form.checkout #billing_' . $btn['cow'] . '_field {
795
- display: none;
796
- }
797
- </style>';
798
- }
799
- }
800
-
801
- // show field with more
802
- if (!empty($btn['single_px_cat']) && !empty($btn['more_content'])) {
803
-
804
- $show_field_array_cat = explode('||', $show_field_single_cat);
805
-
806
- if (array_intersect($categoryarraycm, $show_field_array_cat)) {
807
- echo '
808
- <style type="text/css">
809
- .woocommerce form #customer_details #billing_' . $btn['cow'] . '_field,
810
- .woocommerce-page form #customer_details #billing_' . $btn['cow'] . '_field,
811
- .woocommerce form.checkout #billing_' . $btn['cow'] . '_field {
812
- display: inline-block;
813
- }
814
- </style>';
815
- }
816
-
817
- if (!array_intersect($categoryarraycm, $show_field_array_cat)) {
818
- echo '
819
- <style type="text/css">
820
- .woocommerce form #customer_details #billing_' . $btn['cow'] . '_field,
821
- .woocommerce-page form #customer_details #billing_' . $btn['cow'] . '_field,
822
- .woocommerce form.checkout #billing_' . $btn['cow'] . '_field {
823
- display: none;
824
- }
825
- </style>';
826
- }
827
- }*/
828
 
829
- $categoryarraycm = array();
830
- $productsarraycm = array();
831
- } // btn cut
832
  }
833
  ?>
608
  </script>
609
 
610
  <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
611
 
 
 
 
612
  }
613
  ?>
includes/templates/functions/shipping_functions.php CHANGED
@@ -615,235 +615,5 @@ jQuery(document).ready(function($){
615
 
616
  <?php
617
 
618
- // ================================ END!!! =====================================
619
- // =============================================================================
620
-
621
- // ----------------------------- CLEAR ---------------------------------
622
- // ---------------------------------------------------------------------
623
- // ---------------------------------------------------------------------
624
-
625
- $categoryarraycm = '';
626
- $productsarraycm = '';
627
-
628
- foreach( $options['shipping_buttons'] as $btn ) {
629
- foreach( $woocommerce->cart->cart_contents as $key => $values ) {
630
-
631
- $multiproductsx = $btn['single_p'];
632
- $show_field_single = $btn['single_px'];
633
- $multiproductsx_cat = $btn['single_p_cat'];
634
- $show_field_single_cat = $btn['single_px_cat'];
635
-
636
- $productsarraycm[] = $values['product_id'];
637
-
638
- // Products
639
- // hide field
640
-
641
- // without more
642
- if( !empty( $btn['single_p'] ) && empty( $btn['more_content'] ) ) {
643
-
644
- $multiarrayproductsx = explode( ',', $multiproductsx );
645
-
646
- if( in_array( $values['product_id'], $multiarrayproductsx ) && ( count( $woocommerce->cart->cart_contents ) < 2 ) ) {
647
- echo '
648
- <style type="text/css">
649
- .woocommerce form #customer_details #shipping_'.$btn['cow'].'_field,
650
- .woocommerce-page form #customer_details #shipping_'.$btn['cow'].'_field,
651
- .woocommerce form.checkout #shipping_'.$btn['cow'].'_field {
652
- display: none;
653
- }
654
- </style>';
655
- }
656
- }
657
-
658
- // show field without more
659
- if( !empty( $btn['single_px'] ) && empty( $btn['more_content'] ) ) {
660
-
661
- $show_field_array = explode( '||', $show_field_single );
662
-
663
- if( in_array( $values['product_id'], $show_field_array ) && ( count( $woocommerce->cart->cart_contents ) < 2 ) ) {
664
- echo '
665
- <style type="text/css">
666
- .woocommerce form #customer_details #shipping_'.$btn['cow'].'_field,
667
- .woocommerce-page form #customer_details #shipping_'.$btn['cow'].'_field,
668
- .woocommerce form.checkout #shipping_'.$btn['cow'].'_field {
669
- display: inline-block;
670
- }
671
- </style>';
672
- }
673
-
674
- if( !in_array( $values['product_id'], $show_field_array ) && ( count( $woocommerce->cart->cart_contents ) < 2 ) ) {
675
- echo '
676
- <style type="text/css">
677
- .woocommerce form #customer_details #shipping_'.$btn['cow'].'_field,
678
- .woocommerce-page form #customer_details #shipping_'.$btn['cow'].'_field,
679
- .woocommerce form.checkout #shipping_'.$btn['cow'].'_field {
680
- display: none;
681
- }
682
- </style>';
683
- }
684
- }
685
-
686
- // Category
687
- // hide field
688
- $terms = get_the_terms( $values['product_id'], 'product_cat' );
689
- if( !empty($terms) ) {
690
- foreach( $terms as $term ) {
691
-
692
- $categoryarraycm[] = $term->slug;
693
-
694
- // without more
695
-
696
- if( !empty( $btn['single_p_cat'] ) && empty( $btn['more_content'] ) ) {
697
-
698
- $multiarrayproductsx_cat = explode( ',', $multiproductsx_cat );
699
-
700
- if( in_array( $term->slug, $multiarrayproductsx_cat ) && ( count( $woocommerce->cart->cart_contents ) < 2 ) ) {
701
- echo '
702
- <style type="text/css">
703
- .woocommerce form #customer_details #shipping_'.$btn['cow'].'_field,
704
- .woocommerce-page form #customer_details #shipping_'.$btn['cow'].'_field,
705
- .woocommerce form.checkout #shipping_'.$btn['cow'].'_field {
706
- display: none;
707
- }
708
- </style>';
709
- }
710
- }
711
-
712
- // show field without more
713
- if( !empty( $btn['single_px_cat'] ) && empty( $btn['more_content'] ) ) {
714
-
715
- $show_field_array_cat = explode('||',$show_field_single_cat);
716
-
717
- if( in_array( $term->slug, $show_field_array_cat ) && ( count( $woocommerce->cart->cart_contents ) < 2 ) ) {
718
- echo '
719
- <style type="text/css">
720
- .woocommerce form #customer_details #shipping_'.$btn['cow'].'_field,
721
- .woocommerce-page form #customer_details #shipping_'.$btn['cow'].'_field,
722
- .woocommerce form.checkout #shipping_'.$btn['cow'].'_field {
723
- display: inline-block;
724
- }
725
- </style>';
726
- }
727
-
728
- if( !in_array( $term->slug, $show_field_array_cat ) && ( count( $woocommerce->cart->cart_contents ) < 2 ) ) {
729
- echo '
730
- <style type="text/css">
731
- .woocommerce form #customer_details #shipping_'.$btn['cow'].'_field,
732
- .woocommerce-page form #customer_details #shipping_'.$btn['cow'].'_field,
733
- .woocommerce form.checkout #shipping_'.$btn['cow'].'_field {
734
- display: none;
735
- }
736
- </style>';
737
- }
738
- }
739
-
740
- }
741
- }
742
- }
743
- // end cart
744
-
745
- // ===========================================================================================
746
-
747
- // Products
748
- // hide field
749
-
750
- // with more
751
- if( !empty( $btn['single_p'] ) && !empty( $btn['more_content'] ) ) {
752
-
753
- $multiarrayproductsx = explode( ',', $multiproductsx );
754
-
755
- if( array_intersect( $productsarraycm, $multiarrayproductsx ) ) {
756
- echo '
757
- <style type="text/css">
758
- .woocommerce form #customer_details #shipping_'.$btn['cow'].'_field,
759
- .woocommerce-page form #customer_details #shipping_'.$btn['cow'].'_field,
760
- .woocommerce form.checkout #shipping_'.$btn['cow'].'_field {
761
- display: none;
762
- }
763
- </style>';
764
- }
765
- }
766
-
767
- // show field with more
768
- if( !empty( $btn['single_px'] ) && !empty( $btn['more_content'] ) ) {
769
-
770
- $show_field_array = explode( '||', $show_field_single );
771
-
772
- if( array_intersect( $productsarraycm, $show_field_array ) ) {
773
- echo '
774
- <style type="text/css">
775
- .woocommerce form #customer_details #shipping_'.$btn['cow'].'_field,
776
- .woocommerce-page form #customer_details #shipping_'.$btn['cow'].'_field,
777
- .woocommerce form.checkout #shipping_'.$btn['cow'].'_field {
778
- display: inline-block;
779
- }
780
- </style>';
781
- }
782
-
783
- if( !array_intersect( $productsarraycm, $show_field_array ) ) {
784
- echo '
785
- <style type="text/css">
786
- .woocommerce form #customer_details #shipping_'.$btn['cow'].'_field,
787
- .woocommerce-page form #customer_details #shipping_'.$btn['cow'].'_field,
788
- .woocommerce form.checkout #shipping_'.$btn['cow'].'_field {
789
- display: none;
790
- }
791
- </style>';
792
- }
793
- }
794
-
795
- // Category
796
- // hide field
797
-
798
- // with more
799
- if( !empty( $btn['single_p_cat'] ) && !empty( $btn['more_content'] ) ) {
800
-
801
- $multiarrayproductsx_cat = explode( ',', $multiproductsx_cat );
802
-
803
- if( array_intersect( $categoryarraycm, $multiarrayproductsx_cat ) ) {
804
- echo '
805
- <style type="text/css">
806
- .woocommerce form #customer_details #shipping_'.$btn['cow'].'_field,
807
- .woocommerce-page form #customer_details #shipping_'.$btn['cow'].'_field,
808
- .woocommerce form.checkout #shipping_'.$btn['cow'].'_field {
809
- display: none;
810
- }
811
- </style>';
812
- }
813
- }
814
-
815
- // show field with more
816
- if( !empty( $btn['single_px_cat'] ) && !empty( $btn['more_content'] ) ) {
817
-
818
- $show_field_array_cat = explode( '||', $show_field_single_cat );
819
-
820
- if( array_intersect( $categoryarraycm, $show_field_array_cat ) ) {
821
- echo '
822
- <style type="text/css">
823
- .woocommerce form #customer_details #shipping_'.$btn['cow'].'_field,
824
- .woocommerce-page form #customer_details #shipping_'.$btn['cow'].'_field,
825
- .woocommerce form.checkout #shipping_'.$btn['cow'].'_field {
826
- display: inline-block;
827
- }
828
- </style>';
829
- }
830
-
831
- if( !array_intersect( $categoryarraycm, $show_field_array_cat ) ) {
832
- echo '
833
- <style type="text/css">
834
- .woocommerce form #customer_details #shipping_'.$btn['cow'].'_field,
835
- .woocommerce-page form #customer_details #shipping_'.$btn['cow'].'_field,
836
- .woocommerce form.checkout #shipping_'.$btn['cow'].'_field {
837
- display: none;
838
- }
839
- </style>';
840
- }
841
- }
842
-
843
- $categoryarraycm = '';
844
- $productsarraycm = '';
845
-
846
- } // btn cut
847
-
848
  }
849
  ?>
615
 
616
  <?php
617
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
618
  }
619
  ?>
new/admin.php CHANGED
@@ -88,6 +88,35 @@ if (!class_exists('WOOCCM_Admin')) {
88
  wp_die();
89
  }
90
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
91
  function add_sections($sections = array()) {
92
 
93
  global $current_section;
@@ -225,6 +254,7 @@ if (!class_exists('WOOCCM_Admin')) {
225
  add_action('wp_ajax_wooccm_toggle_field_enabled', array($this, 'ajax_toggle_field_enabled'));
226
  add_action('wp_ajax_wooccm_add_field', array($this, 'ajax_add_field'));
227
  add_action('wp_ajax_wooccm_edit_field', array($this, 'ajax_edit_field'));
 
228
  }
229
 
230
  public static function instance() {
88
  wp_die();
89
  }
90
 
91
+ function ajax_save_field() {
92
+
93
+ if (current_user_can('manage_woocommerce') && check_ajax_referer('wooccm_admin', 'nonce')) {
94
+
95
+ if ($options = get_option('wccs_settings3')) {
96
+
97
+ if (array_key_exists('billing_buttons', $options)) {
98
+
99
+ $field_data = isset($_REQUEST['field_data']) ? $_REQUEST['field_data'] : false;
100
+ $field_id = isset($_REQUEST['field_id']) ? absint($_REQUEST['field_id']) : 0;
101
+
102
+ if (is_array($field_data)) {
103
+
104
+ $options['billing_buttons'][$field_id] = wp_parse_args($field_data, $options['billing_buttons'][$field_id]);
105
+
106
+ update_option('wccs_settings3', $options);
107
+
108
+ wp_send_json_success($field_data);
109
+ }
110
+
111
+ wp_send_json_error(esc_html__('Undefined field', 'woocommerce-checkout-manager'));
112
+ }
113
+ }
114
+ }
115
+
116
+ wp_send_json_error(esc_html__('Unknow error', 'woocommerce-checkout-managerS'));
117
+ wp_die();
118
+ }
119
+
120
  function add_sections($sections = array()) {
121
 
122
  global $current_section;
254
  add_action('wp_ajax_wooccm_toggle_field_enabled', array($this, 'ajax_toggle_field_enabled'));
255
  add_action('wp_ajax_wooccm_add_field', array($this, 'ajax_add_field'));
256
  add_action('wp_ajax_wooccm_edit_field', array($this, 'ajax_edit_field'));
257
+ add_action('wp_ajax_wooccm_save_field', array($this, 'ajax_save_field'));
258
  }
259
 
260
  public static function instance() {
new/admin/pages/billing.php CHANGED
@@ -116,485 +116,496 @@
116
  <div class="media-modal-backdrop">&nbsp;</div>
117
  <div tabindex="0" id="<?php echo esc_attr(WOOCCM_PREFIX . '_modal'); ?>" class="media-modal wp-core-ui upload-php" role="dialog" aria-modal="true" aria-labelledby="media-frame-title">
118
  <div class="media-modal-content" role="document">
119
- <div class="edit-attachment-frame mode-select hide-menu hide-router">
120
- <div class="edit-media-header">
121
- <button data-field_id="{{ data.prev_id}}" class="media-modal-prev left dashicons <# if ( data.prev_id < 0 ) { #>disabled<# } #>"><span class="screen-reader-text">Edit previous media item</span></button>
122
- <button data-field_id="{{ data.next_id}}" class="media-modal-next right dashicons <# if ( data.next_id == data.id ) { #>disabled<# } #>"><span class="screen-reader-text">Edit next media item</span></button>
123
- <button type="button" class="media-modal-close"><span class="media-modal-icon"><span class="screen-reader-text">Close dialog</span></span>
124
- </button>
125
- </div>
126
- <div class="media-frame-title">
127
- <h1>Edit field #{{ data.id }}</h1>
128
- </div>
129
- <div class="media-frame-content" style="bottom:61px;">
130
-
131
- <div class="attachment-details save-ready">
132
- <div class="attachment-media-view landscape">
133
 
134
- <div id="woocommerce-product-data">
135
- <div class="panel-wrap product_data">
136
- <ul class="product_data_tabs wc-tabs">
137
- <li class="general_options active">
138
- <a href="#general_product_data"><span><?php esc_html_e('General', 'woocommerce-checkout-manager'); ?></span></a>
139
- </li>
140
- <li class="inventory_options">
141
- <a href="#inventory_product_data"><span><?php esc_html_e('Options', 'woocommerce-checkout-manager'); ?></span></a>
142
- </li>
143
- <li class="shipping_options">
144
- <a href="#shipping_product_data"><span><?php esc_html_e('Conditional', 'woocommerce-checkout-manager'); ?></span></a>
145
- </li>
146
- <li class="linked_product_options">
147
- <a href="#linked_product_data"><span><?php esc_html_e('Amount', 'woocommerce-checkout-manager'); ?></span></a>
148
- </li>
149
- <li class="attribute_options">
150
- <a href="#product_attributes"><span><?php esc_html_e('Taxes', 'woocommerce-checkout-manager'); ?></span></a>
151
- </li>
152
- <li class="variations_options">
153
- <a href="#variable_product_options"><span><?php esc_html_e('Display', 'woocommerce-checkout-manager'); ?></span></a>
154
- </li>
155
- <li class="advanced_options">
156
- <a href="#advanced_product_data"><span><?php esc_html_e('Timing', 'woocommerce-checkout-manager'); ?></span></a>
157
- </li>
158
- <li class="marketplace-suggestions_options">
159
- <a href="#marketplace_suggestions"><span><?php esc_html_e('Advanced', 'woocommerce-checkout-manager'); ?></span></a>
160
- </li>
161
- </ul>
162
 
163
- <div id="general_product_data" class="panel woocommerce_options_panel" style="display: none;">
164
- <div class="options_group">
165
- <!--<p>
166
- <td class="billing-wccs-order-hidden">
167
- <input type="hidden" name="wccs_settings3[billing_buttons][{{data.id}}][order]" value="{{data.order}}">
168
- </p>-->
169
- <!--<p>
170
- <label><?php esc_html_e('Disabled', 'woocommerce-checkout-manager'); ?></label>
171
- <input name="wccs_settings3[billing_buttons][{{data.id}}][disabled]" type="checkbox" value="{{data.disabled}}">
172
- </p>-->
173
- <!--<p>
174
- <label><?php esc_html_e('Required', 'woocommerce-checkout-manager'); ?></label>
175
- <input name="wccs_settings3[billing_buttons][{{data.id}}][checkbox]" type="checkbox" title="Whether or not the checkout field is required" value="{{data.checkbox}}" checked="checked">
176
- </p>-->
177
- <p class="form-field">
178
- <label><?php esc_html_e('Name', 'woocommerce-checkout-manager'); ?></label>
179
- <input class="short" type="text" name="wccs_settings3[billing_buttons][{{data.id}}][cow]" placeholder="<?php esc_html_e('MyField', 'woocommerce-checkout-managert'); ?>" value="{{data.cow}}" readonly="readonly">
180
- <span class="description"><?php esc_html_e('To edit Abbreviations open General > Switches > Editing Of Abbreviation Fields.', 'woocommerce-checkout-managert'); ?></span>
181
- </p>
182
- </div>
183
- <div class="options_group">
184
- <p class="form-field">
185
- <label><?php esc_html_e('Position', 'woocommerce-checkout-manager'); ?></label>
186
- <select class="select short" name="wccs_settings3[billing_buttons][{{data.id}}][position]">
187
- <option <# if ( data.position == 'form-row-wide' ) { #>selected<# } #> value="form-row-wide"><?php esc_html_e('Wide', 'woocommerce-checkout-managert'); ?></option>
188
- <option <# if ( data.position == 'form-row-first' ) { #>selected<# } #> value="form-row-first"><?php esc_html_e('Left', 'woocommerce-checkout-managert'); ?></option>
189
- <option <# if ( data.position == 'form-row-last' ) { #>selected<# } #> value="form-row-last"><?php esc_html_e('Right', 'woocommerce-checkout-managert'); ?></option>
190
- </select>
191
- <span class="description"><?php esc_html_e('Placement of the checkout field.', 'woocommerce-checkout-managert'); ?></span>
192
- </p>
193
- <p class="form-field">
194
- <label><?php esc_html_e('Clear', 'woocommerce-checkout-manager'); ?></label>
195
- <input <# if ( data.clear_row == 'true' ) { #>checked<# } #> type="checkbox" name="wccs_settings3[billing_buttons][{{data.id}}][clear_row]" value="true">
196
- <span class="description"><?php esc_html_e('Applies a clear fix to the checkout field.', 'woocommerce-checkout-managert'); ?></span>
197
- </p>
198
- <p class="form-field">
199
- <label><?php esc_html_e('Extra class', 'woocommerce-checkout-manager'); ?></label>
200
- <input class="short" type="text" name="wccs_settings3[billing_buttons][{{data.id}}][extra_class]" value="{{data.extra_class}}">
201
- </p>
202
- </div>
203
- <div class="options_group">
204
- <p class="form-field">
205
- <label><?php esc_html_e('Label', 'woocommerce-checkout-manager'); ?></label>
206
- <input class="short" type="text" name="wccs_settings3[billing_buttons][{{data.id}}][label]" placeholder="<?php esc_html_e('My Field Name', 'woocommerce-checkout-managert'); ?>" value="{{data.label}}">
207
- <span class="description"><?php esc_html_e('Placeholder text for the checkout field.', 'woocommerce-checkout-managert'); ?></span>
208
- </p>
209
- <p class="form-field">
210
- <label><?php esc_html_e('Placeholder', 'woocommerce-checkout-manager'); ?></label>
211
- <input class="short" type="text" name="wccs_settings3[billing_buttons][{{data.id}}][placeholder]" title="" placeholder="<?php esc_html_e('Example red', 'woocommerce-checkout-managert'); ?>" value="{{data.placeholder}}">
212
- <span class="description"><?php esc_html_e('Placeholder text for the checkout field.', 'woocommerce-checkout-managert'); ?></span>
213
- </p>
214
- </div>
215
- </div>
216
- <div id="inventory_product_data" class="panel woocommerce_options_panel hidden" style="display: none;">
217
 
218
- <div class="options_group">
219
- <p class="form-field">
220
- <label><?php esc_html_e('Type', 'woocommerce-checkout-manager'); ?></label>
221
- <select class="select short" name="wccs_settings3[billing_buttons][{{data.id}}][type]">
222
- <option <# if ( data.type == 'wooccmtext' ) { #>selected<# } #> value="wooccmtext">Text Input</option>
223
- <option <# if ( data.type == 'wooccmtextarea' ) { #>selected<# } #> value="wooccmtextarea">Textarea</option>
224
- <option <# if ( data.type == 'wooccmpassword' ) { #>selected<# } #> value="wooccmpassword">Password</option>
225
- <option <# if ( data.type == 'wooccmradio' ) { #>selected<# } #> value="wooccmradio">Radio Buttons</option>
226
- <option <# if ( data.type == 'checkbox_wccm' ) { #>selected<# } #> value="checkbox_wccm">Check Box</option>
227
- <option <# if ( data.type == 'wooccmselect' ) { #>selected<# } #> value="wooccmselect">Select Options</option>
228
- <option <# if ( data.type == 'datepicker' ) { #>selected<# } #> value="datepicker">Date Picker</option>
229
- <option <# if ( data.type == 'time' ) { #>selected<# } #> value="time">Time Picker</option>
230
- <option <# if ( data.type == 'colorpicker' ) { #>selected<# } #> value="colorpicker">Color Picker</option>
231
- <option <# if ( data.type == 'heading' ) { #>selected<# } #> value="heading">Heading</option>
232
- <option <# if ( data.type == 'multiselect' ) { #>selected<# } #> value="multiselect">Multi-Select</option>
233
- <option <# if ( data.type == 'multicheckbox' ) { #>selected<# } #> value="multicheckbox">Multi-Checkbox</option>
234
- <option <# if ( data.type == 'wooccmcountry' ) { #>selected<# } #> value="wooccmcountry">Country</option>
235
- <option <# if ( data.type == 'wooccmstate' ) { #>selected<# } #> value="wooccmstate">State</option>
236
- <option <# if ( data.type == 'wooccmupload' ) { #>selected<# } #> value="wooccmupload">File Picker</option>
237
- </select>
238
- <span class="description"><?php esc_html_e('Type of the checkout field', 'woocommerce-checkout-managert'); ?></span>
239
- </p>
240
- </div>
241
- <div class="options_group">
242
- <!--
243
- 1326
244
- <p class="form-field">
245
- <label><?php esc_html_e('Adapt', 'woocommerce-checkout-manager'); ?></label>
246
- <input <# if ( data.fancy == 'country_select' ) { #>checked<# } #> type="checkbox" name="wccs_settings3[billing_buttons][{{data.id}}][fancy]" value="country_select">
247
- </p>
248
- -->
249
- <p class="form-field">
250
- <label><?php esc_html_e('Title', 'woocommerce-checkout-manager'); ?></label>
251
- <input class="short" type="text" name="wccs_settings3[billing_buttons][{{data.id}}][force_title2]" placeholder="<?php esc_html_e('Name Guide', 'woocommerce-checkout-manager'); ?>" value="{{data.force_title2}}">
252
- </p>
253
- <p class="form-field">
254
- <label><?php esc_html_e('Options', 'woocommerce-checkout-manager'); ?></label>
255
- <input class="short" type="text" name="wccs_settings3[billing_buttons][{{data.id}}][option_array]" placeholder="Option 1||Option 2||Option 3" value="{{data.option_array}}">
256
- </p>
257
- </div>
258
- </div>
 
 
 
 
 
 
 
 
 
 
 
259
 
260
- <div id="shipping_product_data" class="panel woocommerce_options_panel hidden" style="display: none;">
261
- <div class="options_group">
262
- <p class="form-field">
263
- <label><?php esc_html_e('Conditional', 'woocommerce-checkout-manager'); ?></label>
264
- <input <# if ( data.conditional_parent_use == 'true' ) { #>checked<# } #> type="checkbox" name="wccs_settings3[billing_buttons][{{data.id}}][conditional_parent_use]" value="true">
265
- </p>
266
- <p class="form-field">
267
- <label><?php esc_html_e('Conditional Parent', 'woocommerce-checkout-manager'); ?></label>
268
- <input <# if ( data.conditional_parent == 'true' ) { #>checked<# } #> type="checkbox" name="wccs_settings3[billing_buttons][{{data.id}}][conditional_parent]" value="true">
269
- </p>
270
- <p class="form-field">
271
- <label><?php esc_html_e('Conditional Tie', 'woocommerce-checkout-manager'); ?></label>
272
- <input class="short" type="text" name="wccs_settings3[billing_buttons][{{data.id}}][conditional_tie]" placeholder="<?php esc_html_e('Parent Abbr. Name', 'woocommerce-checkout-manager'); ?>" value="{{data.conditional_tie}}">
273
- </p>
274
- <p class="form-field">
275
- <label><?php esc_html_e('Chosen Value', 'woocommerce-checkout-manager'); ?></label>
276
- <input class="short" type="text" name="wccs_settings3[billing_buttons][{{data.id}}][chosen_valt]" placeholder="Yes" value="{{data.chosen_valt}}">
277
- </p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
278
  </div>
279
- </div>
280
 
281
- <div id="linked_product_data" class="panel woocommerce_options_panel hidden" style="display: none;">
282
-
283
- <div class="options_group">
284
- <p class="form-field">
285
- <label><?php esc_html_e('Add Amount', 'woocommerce-checkout-manager'); ?></label>
286
- <input <# if ( data.add_amount == 'true' ) { #>checked<# } #> type="checkbox" name="wccs_settings3[billing_buttons][{{data.id}}][add_amount]" value="true">
287
- </p>
288
- <p class="form-field">
289
- <label><?php esc_html_e('Amount Name', 'woocommerce-checkout-manager'); ?></label>
290
- <input class="short" name="wccs_settings3[billing_buttons][{{data.id}}][fee_name]" type="text" value="{{data.fee_name}}" placeholder="<?php esc_html_e('My Custom Charge', 'woocommerce-checkout-manager'); ?>">
291
- </p>
292
- <p class="form-field">
293
- <label><?php esc_html_e('Amount Total', 'woocommerce-checkout-manager'); ?></label>
294
- <input class="short" name="wccs_settings3[billing_buttons][{{data.id}}][add_amount_field]" type="text" value="{{data.add_amount_field}}" placeholder="50">
295
- </p>
 
 
 
 
296
  </div>
297
 
298
- </div>
299
 
300
- <div id="product_attributes" class="panel woocommerce_options_panel hidden" style="display: none;">
301
- <div class="options_group">
302
- <p class="form-field">
303
- <label><?php esc_html_e('Deny Checkout', 'woocommerce-checkout-manager'); ?></label>
304
- <input <# if ( data.deny_checkout == 'true' ) { #>checked<# } #> type="checkbox" name="wccs_settings3[billing_buttons][{{data.id}}][deny_checkout]" value="true">
305
- <span class="description"><?php esc_html_e('1326.', 'woocommerce-checkout-managert'); ?></span>
306
- </p>
307
- <p class="form-field">
308
- <label><?php esc_html_e('Tax Remove', 'woocommerce-checkout-manager'); ?></label>
309
- <input <# if ( data.tax_remove == 'true' ) { #>checked<# } #> type="checkbox" name="wccs_settings3[billing_buttons][{{data.id}}][tax_remove]" value="true">
310
- </p>
311
- <p class="form-field">
312
- <label><?php esc_html_e('Deny Receipt', 'woocommerce-checkout-manager'); ?></label>
313
- <input <# if ( data.deny_receipt == 'true' ) { #>checked<# } #> type="checkbox" name="wccs_settings3[billing_buttons][{{data.id}}][deny_receipt]" value="true">
314
- </p>
315
- <p class="form-field">
316
- <label><?php esc_html_e('Default Color', 'woocommerce-checkout-manager'); ?></label>
317
- <input class="short" type="text" name="wccs_settings3[billing_buttons][{{data.id}}][colorpickerd]" id="billing-colorpic0" placeholder="#000000" value="{{data.colorpickerd}}">
318
- </p>
319
- <p class="form-field">
320
- <label><?php esc_html_e('Picker Type', 'woocommerce-checkout-manager'); ?></label>
321
- <select class="select short" name="wccs_settings3[billing_buttons][{{data.id}}][colorpickertype]">
322
- <option <# if ( data.colorpickertype == 'farbtastic' ) { #>selected<# } #> value="farbtastic" >Farbtastic</option>
323
- <option <# if ( data.colorpickertype == 'iris' ) { #>selected<# } #> value="iris">Iris</option>
324
- </select>
325
- </p>
326
- </div>
327
- </div>
328
 
329
- <div id="variable_product_options" class="panel woocommerce_options_panel hidden" style="display: none;">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
330
 
331
- <div class="options_group">
332
- <p class="form-field">
333
- <label><?php esc_html_e('User Role', 'woocommerce-checkout-manager'); ?></label>
334
- <input <# if ( data.user_role == 'user_role' ) { #>checked<# } #> type="checkbox" name="wccs_settings3[billing_buttons][{{data.id}}][user_role]" value="user_role">
335
- </p>
336
- <p class="form-field">
337
- <label><?php esc_html_e('Show for Roles', 'woocommerce-checkout-manager'); ?></label>
338
- <input class="short" type="text" name="wccs_settings3[billing_buttons][{{data.id}}][role_options]" placeholder="Option 1||Option 2||Option 3" value="{{data.role_options}}">
339
- </p>
340
- <p class="form-field">
341
- <label><?php esc_html_e('Hide for Roles', 'woocommerce-checkout-manager'); ?></label>
342
- <input class="short" type="text" name="wccs_settings3[billing_buttons][{{data.id}}][role_options2]" placeholder="Option 1||Option 2||Option 3" value="{{data.role_options2}}">
343
- </p>
344
  </div>
345
 
346
- <div class="options_group">
347
- <p class="form-field">
348
- <label><?php esc_html_e('More', 'woocommerce-checkout-manager'); ?></label>
349
- <input <# if ( data.more_content == '1' ) { #>checked<# } #> type="checkbox" name="wccs_settings3[billing_buttons][{{data.id}}][more_content]" value="1">
350
- </p>
351
- <p class="form-field">
352
- <label><?php esc_html_e('Hide Field from Product', 'woocommerce-checkout-manager'); ?></label>
353
- <input class="short" type="text" name="wccs_settings3[billing_buttons][{{data.id}}][single_p]" placeholder="Product ID(s) e.g 1674||1233" value="{{data.single_p}}">
354
- </p>
355
- <p class="form-field">
356
- <label><?php esc_html_e('Show Field for Product', 'woocommerce-checkout-manager'); ?></label>
357
- <input class="short" type="text" name="wccs_settings3[billing_buttons][{{data.id}}][single_px]" placeholder="Product ID(s) e.g 1674||1233" value="{{data.single_px}}">
358
- </p>
359
- <p class="form-field">
360
- <label><?php esc_html_e('Hide Field from Category', 'woocommerce-checkout-manager'); ?></label>
361
- <input class="short" type="text" name="wccs_settings3[billing_buttons][{{data.id}}][single_p_cat]" placeholder="Category Slug(s) e.g my-cat||my-cat2" value="{{data.single_p_cat}}">
362
- </p>
363
- <p class="form-field">
364
- <label><?php esc_html_e('Show Field for Category', 'woocommerce-checkout-manager'); ?></label>
365
- <input class="short" type="text" name="wccs_settings3[billing_buttons][{{data.id}}][single_px_cat]" placeholder="Category Slug(s) e.g my-cat||my-cat2" value="{{data.sigle_px_cat}}">
366
- </p>
367
- </div>
368
- </div>
369
 
370
- <div id="advanced_product_data" class="panel woocommerce_options_panel hidden" style="display: none;">
 
 
 
 
 
 
 
 
 
 
 
 
 
371
 
372
- <div class="options_group">
373
- <p class="form-field">
374
- <label><?php esc_html_e('Start Hour', 'woocommerce-checkout-manager'); ?></label>
375
- <input class="short" type="text" placeholder="6" name="wccs_settings3[billing_buttons][{{data.id}}][start_hour]" value="{{data.start_hour}}">
376
- </p>
377
- <p class="form-field">
378
- <label><?php esc_html_e('End Hour', 'woocommerce-checkout-manager'); ?></label>
379
- <input class="short" type="text" placeholder="9" name="wccs_settings3[billing_buttons][{{data.id}}][end_hour]" value="{{data.end_hour}}">
380
- </p>
381
- <p class="form-field">
382
- <label><?php esc_html_e('Interval Min.', 'woocommerce-checkout-manager'); ?></label>
383
- <input class="short" type="text" placeholder="15" name="wccs_settings3[billing_buttons][{{data.id}}][interval_min]" value="{{data.interval_min}}">
384
- </p>
385
- <p class="form-field">
386
- <label><?php esc_html_e('Manual Min.', 'woocommerce-checkout-manager'); ?></label>
387
- <input class="short" type="text" placeholder="0, 10, 20, 30, 40" name="wccs_settings3[billing_buttons][{{data.id}}][manual_min]" value="{{data.manual_min}}">
388
- </p>
 
 
 
 
 
389
  </div>
390
 
391
- <div class="options_group">
392
- <p class="form-field">
393
- <label><?php esc_html_e('Date Format', 'woocommerce-checkout-manager'); ?></label>
394
- <input class="short" type="text" placeholder="dd-mm-yy" name="wccs_settings3[billing_buttons][{{data.id}}][format_date]" value="{{data.format_date}}">
395
- </p>
396
- <p class="form-field">
397
- <label><?php esc_html_e('Days Before', 'woocommerce-checkout-manager'); ?></label>
398
- <input class="short" type="text" placeholder="+3" name="wccs_settings3[billing_buttons][{{data.id}}][min_before]" value="{{data.min_before}}">
399
- </p>
400
- <p class="form-field">
401
- <label><?php esc_html_e('Days After', 'woocommerce-checkout-manager'); ?></label>
402
- <input class="short" type="text" placeholder="3" name="wccs_settings3[billing_buttons][{{data.id}}][max_after]" value="{{data.max_after}}">
403
- </p>
404
- <p class="form-field">
405
- <label><?php esc_html_e('Days Enabler', 'woocommerce-checkout-manager'); ?></label>
406
- <input <# if ( data.days_disabler == 'true' ) { #>checked<# } #> type="checkbox" name="wccs_settings3[billing_buttons][{{data.id}}][days_disabler]" value="true">
407
- </p>
408
- <p class="form-field">
409
- <label><?php esc_html_e('Sundays', 'woocommerce-checkout-manager'); ?></label>
410
- <input <# if ( data.days_disabler0 == '1' ) { #>checked<# } #> type="checkbox" name="wccs_settings3[billing_buttons][{{data.id}}][days_disabler0]" value="1">
411
- </p>
412
- <p class="form-field">
413
- <label><?php esc_html_e('Mondays Mondays', 'woocommerce-checkout-manager'); ?></label>
414
- <input <# if ( data.days_disabler1 == '1' ) { #>checked<# } #> type="checkbox" name="wccs_settings3[billing_buttons][{{data.id}}][days_disabler1]" value="1">
415
- </p>
416
- <p class="form-field">
417
- <label><?php esc_html_e('Tuesdays', 'woocommerce-checkout-manager'); ?></label>
418
- <input <# if ( data.days_disabler2 == '1' ) { #>checked<# } #> type="checkbox" name="wccs_settings3[billing_buttons][{{data.id}}][days_disabler2]" value="1">
419
- </p>
420
- <p class="form-field">
421
- <label><?php esc_html_e('Wednesdays', 'woocommerce-checkout-manager'); ?></label>
422
- <input <# if ( data.days_disabler3 == '1' ) { #>checked<# } #> type="checkbox" name="wccs_settings3[billing_buttons][{{data.id}}][days_disabler3]" value="1">
423
- </p>
424
- <p class="form-field">
425
- <label><?php esc_html_e('Thursdays', 'woocommerce-checkout-manager'); ?></label>
426
- <input <# if ( data.days_disabler4 == '1' ) { #>checked<# } #> type="checkbox" name="wccs_settings3[billing_buttons][{{data.id}}][days_disabler4]" value="1">
427
- </p>
428
- <p class="form-field">
429
- <label><?php esc_html_e('Fridays', 'woocommerce-checkout-manager'); ?></label>
430
- <input <# if ( data.days_disabler5 == '1' ) { #>checked<# } #> type="checkbox" name="wccs_settings3[billing_buttons][{{data.id}}][days_disabler5]" value="1">
431
- </p>
432
- <p class="form-field">
433
- <label><?php esc_html_e('Satudays', 'woocommerce-checkout-manager'); ?></label>
434
- <input <# if ( data.days_disabler6 == '1' ) { #>checked<# } #> type="checkbox" name="wccs_settings3[billing_buttons][{{data.id}}][days_disabler6]" value="1">
435
- </p>
436
- </div>
437
 
438
- <div class="options_group">
439
- <span class="spongagge">Min Date</span>
440
- <p class="form-field">
441
- <input class="short" type="text" name="wccs_settings3[billing_buttons][{{data.id}}][single_yy]" placeholder="2013" title="yy" value="{{data.single_yy}}">
442
- </p>
443
- <p class="form-field">
444
- <input class="short" type="text" name="wccs_settings3[billing_buttons][{{data.id}}][single_mm]" placeholder="10" title="mm" value="{{data.single_mm}}">
445
- </p>
446
- <p class="form-field">
447
- <input class="short" type="text" name="wccs_settings3[billing_buttons][{{data.id}}][single_dd]" placeholder="25" title="dd" value="{{data.single_dd}}">
448
- </p>
449
- </div>
450
- <div class="options_group">
451
- <span class="spongagge">Max Date</span>
452
- <p class="form-field">
453
- <input class="short" type="text" name="wccs_settings3[billing_buttons][{{data.id}}][single_max_yy]" placeholder="2013" title="yy" value="{{data.single_max_yy}}">
454
- </p>
455
- <p class="form-field">
456
- <input class="short" type="text" name="wccs_settings3[billing_buttons][{{data.id}}][single_max_mm]" placeholder="10" title="mm" value="{{data.single_max_mm}}">
457
- </p>
458
- <p class="form-field">
459
- <input class="short" type="text" name="wccs_settings3[billing_buttons][{{data.id}}][single_max_dd]" placeholder="25" title="dd" value="{{data.single_max_dd}}">
460
- </p>
461
- </div>
462
 
463
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
464
 
465
- <div id="marketplace_suggestions" class="panel woocommerce_options_panel hidden" style="display: none;">
466
- <div class="marketplace-suggestions-container showing-suggestion" data-marketplace-suggestions-context="product-edit-meta-tab-header">
467
- <div class="marketplace-suggestion-container" data-suggestion-slug="product-edit-meta-tab-header">
468
- <div class="marketplace-suggestion-container-content">
469
- <h4>Recommended extensions</h4></div>
470
- <div class="marketplace-suggestion-container-cta"></div>
 
 
 
 
 
 
 
 
 
 
 
 
 
471
  </div>
 
472
  </div>
473
- <div class="marketplace-suggestions-container showing-suggestion" data-marketplace-suggestions-context="product-edit-meta-tab-body">
474
- <div class="marketplace-suggestion-container" data-suggestion-slug="product-edit-name-your-price"><img src="https://woocommerce.com/wp-content/plugins/wccom-plugins//marketplace-suggestions/icons/name-your-price.svg" class="marketplace-suggestion-icon">
475
- <div class="marketplace-suggestion-container-content">
476
- <h4>Name Your Price</h4>
477
- <p>Let customers pay what they want - useful for donations, tips and more</p>
478
- </div>
479
- <div class="marketplace-suggestion-container-cta"><a href="https://woocommerce.com/products/name-your-price/?wccom-site=http%3A%2F%2Flocalhost%2Fwoocommerce-checkout&amp;wccom-back=%2Fwoocommerce-checkout%2Fwp-admin%2Fpost.php%3Fpost%3D6%26%23038%3Baction%3Dedit&amp;wccom-woo-version=3.7.0&amp;utm_source=editproduct&amp;utm_campaign=marketplacesuggestions&amp;utm_medium=product" target="blank" class="button">Learn More</a>
480
- <a class="suggestion-dismiss" title="Dismiss this suggestion" href="#"></a>
481
  </div>
482
  </div>
483
- <div class="marketplace-suggestion-container" data-suggestion-slug="product-edit-variation-images"><img src="https://woocommerce.com/wp-content/plugins/wccom-plugins//marketplace-suggestions/icons/additional-variation-images.svg" class="marketplace-suggestion-icon">
484
- <div class="marketplace-suggestion-container-content">
485
- <h4>Additional Variation Images</h4>
486
- <p>Showcase your products in the best light with a image for each variation</p>
 
 
 
 
 
487
  </div>
488
- <div class="marketplace-suggestion-container-cta"><a href="https://woocommerce.com/products/woocommerce-additional-variation-images/?wccom-site=http%3A%2F%2Flocalhost%2Fwoocommerce-checkout&amp;wccom-back=%2Fwoocommerce-checkout%2Fwp-admin%2Fpost.php%3Fpost%3D6%26%23038%3Baction%3Dedit&amp;wccom-woo-version=3.7.0&amp;utm_source=editproduct&amp;utm_campaign=marketplacesuggestions&amp;utm_medium=product" target="blank" class="button">Learn More</a>
489
- <a class="suggestion-dismiss" title="Dismiss this suggestion" href="#"></a>
 
 
 
 
 
 
490
  </div>
491
- </div>
492
- <div class="marketplace-suggestion-container" data-suggestion-slug="product-edit-woocommerce-one-page-checkout"><img src="https://woocommerce.com/wp-content/plugins/wccom-plugins//marketplace-suggestions/icons/one-page-checkout.svg" class="marketplace-suggestion-icon">
493
- <div class="marketplace-suggestion-container-content">
494
- <h4>One Page Checkout</h4>
495
- <p>Don't make customers click around - let them choose products, checkout &amp; pay all on one page</p>
 
 
 
496
  </div>
497
- <div class="marketplace-suggestion-container-cta"><a href="https://woocommerce.com/products/woocommerce-one-page-checkout/?wccom-site=http%3A%2F%2Flocalhost%2Fwoocommerce-checkout&amp;wccom-back=%2Fwoocommerce-checkout%2Fwp-admin%2Fpost.php%3Fpost%3D6%26%23038%3Baction%3Dedit&amp;wccom-woo-version=3.7.0&amp;utm_source=editproduct&amp;utm_campaign=marketplacesuggestions&amp;utm_medium=product" target="blank" class="button">Learn More</a>
498
- <a class="suggestion-dismiss" title="Dismiss this suggestion" href="#"></a>
 
 
 
 
 
 
499
  </div>
500
  </div>
501
- <div class="marketplace-suggestion-container" data-suggestion-slug="product-edit-min-max-quantities"><img src="https://woocommerce.com/wp-content/plugins/wccom-plugins//marketplace-suggestions/icons/min-max-quantities.svg" class="marketplace-suggestion-icon">
502
- <div class="marketplace-suggestion-container-content">
503
- <h4>Min/Max Quantities</h4>
504
- <p>Specify minimum and maximum allowed product quantities for orders to be completed</p>
505
- </div>
506
- <div class="marketplace-suggestion-container-cta"><a href="https://woocommerce.com/products/min-max-quantities/?wccom-site=http%3A%2F%2Flocalhost%2Fwoocommerce-checkout&amp;wccom-back=%2Fwoocommerce-checkout%2Fwp-admin%2Fpost.php%3Fpost%3D6%26%23038%3Baction%3Dedit&amp;wccom-woo-version=3.7.0&amp;utm_source=editproduct&amp;utm_campaign=marketplacesuggestions&amp;utm_medium=product" target="blank" class="button">Learn More</a>
507
- <a class="suggestion-dismiss" title="Dismiss this suggestion" href="#"></a>
508
  </div>
509
  </div>
510
- </div>
511
- <div class="marketplace-suggestions-container showing-suggestion" data-marketplace-suggestions-context="product-edit-meta-tab-footer">
512
- <div class="marketplace-suggestion-container" data-suggestion-slug="product-edit-meta-tab-footer-browse-all">
513
- <div class="marketplace-suggestion-container-content has-manage-link"><a class="marketplace-suggestion-manage-link linkout" href="http://localhost/woocommerce-checkout/wp-admin/admin.php?page=wc-settings&amp;tab=advanced&amp;section=woocommerce_com">Manage suggestions</a></div>
514
- <div class="marketplace-suggestion-container-cta"><a href="https://woocommerce.com/product-category/woocommerce-extensions/?wccom-site=http%3A%2F%2Flocalhost%2Fwoocommerce-checkout&amp;wccom-back=%2Fwoocommerce-checkout%2Fwp-admin%2Fpost.php%3Fpost%3D6%26%23038%3Baction%3Dedit&amp;wccom-woo-version=3.7.0&amp;utm_source=editproduct&amp;utm_campaign=marketplacesuggestions&amp;utm_medium=product" target="blank" class="linkout">Browse all extensions<span class="dashicons dashicons-external"></span></a></div>
515
- </div>
516
- </div>
517
- <div class="marketplace-suggestions-metabox-nosuggestions-placeholder hidden">
518
- <img src="https://woocommerce.com/wp-content/plugins/wccom-plugins/marketplace-suggestions/icons/get_more_options.svg" class="marketplace-suggestion-icon">
519
- <div class="marketplace-suggestion-placeholder-content">
520
- <h4>Enhance your products</h4>
521
- <p>Extensions can add new functionality to your product pages that make your store stand out</p>
522
  </div>
523
- <a href="https://woocommerce.com/product-category/woocommerce-extensions/?utm_source=editproduct&amp;utm_campaign=marketplacesuggestions&amp;utm_medium=product" target="blank" class="button">Browse the Marketplace</a>
524
- <br>
525
- <a class="marketplace-suggestion-manage-link" href="http://localhost/woocommerce-checkout/wp-admin/admin.php?page=wc-settings&amp;tab=advanced&amp;section=woocommerce_com">Manage suggestions</a>
526
  </div>
 
527
  </div>
528
- <div class="clear"></div>
529
  </div>
530
- </div>
531
 
532
- </div>
533
- <div class="attachment-info">
534
- <span class="settings-save-status">
535
- <span class="spinner"></span>
536
- <span class="saved">Saved.</span>
537
- </span>
538
- <div class="details">
539
- <div class="filename"><strong>Field id:</strong> #{{data.id}}</div>
540
- <div class="filename"><strong>Filed slug:</strong> {{data.cow}}</div>
541
  </div>
 
 
 
 
 
 
 
 
 
 
 
542
 
543
- <div class="settings">
544
- <label class="setting" data-setting="alt">
545
- <span class="name"><?php esc_html_e('Label', 'woocommerce-checkout-manager'); ?></span>
546
- <input type="text" name="wccs_settings3[billing_buttons][{{data.id}}][label]" placeholder="<?php esc_html_e('My Field Name', 'woocommerce-checkout-managert'); ?>" value="{{data.label}}">
547
- </label>
548
- <p class="description"><?php esc_html_e('Label text for the checkout field.', 'woocommerce-checkout-managert'); ?></p>
549
- <label class="setting" data-setting="title">
550
- <span class="name"><?php esc_html_e('Placeholder', 'woocommerce-checkout-manager'); ?></span>
551
- <input type="text" name="wccs_settings3[billing_buttons][{{data.id}}][placeholder]" title="" placeholder="<?php esc_html_e('Example red', 'woocommerce-checkout-managert'); ?>" value="{{data.placeholder}}">
552
- </label>
553
- <p class="description"><?php esc_html_e('Placeholder text for the checkout field.', 'woocommerce-checkout-managert'); ?></p>
554
- <label class="setting">
555
- <span class="name"><?php esc_html_e('Position', 'woocommerce-checkout-manager'); ?></span>
556
- <select class="select short" name="wccs_settings3[billing_buttons][{{data.id}}][position]">
557
- <option <# if ( data.position == 'form-row-wide' ) { #>selected<# } #> value="form-row-wide"><?php esc_html_e('Wide', 'woocommerce-checkout-managert'); ?></option>
558
- <option <# if ( data.position == 'form-row-first' ) { #>selected<# } #> value="form-row-first"><?php esc_html_e('Left', 'woocommerce-checkout-managert'); ?></option>
559
- <option <# if ( data.position == 'form-row-last' ) { #>selected<# } #> value="form-row-last"><?php esc_html_e('Right', 'woocommerce-checkout-managert'); ?></option>
560
- </select>
561
- </label>
562
- <p class="description"><?php esc_html_e('Placement of the checkout field.', 'woocommerce-checkout-managert'); ?></p>
563
- <label class="setting">
564
- <span class="name"><?php esc_html_e('Clear', 'woocommerce-checkout-manager'); ?></span>
565
- <input <# if ( data.clear_row == 'true' ) { #>checked<# } #> type="checkbox" name="wccs_settings3[billing_buttons][{{data.id}}][clear_row]" value="true">
566
- </label>
567
- <p class="description"><?php esc_html_e('Applies a clear fix to the checkout field.', 'woocommerce-checkout-managert'); ?></p>
568
- <label class="setting">
569
- <span class="name"><?php esc_html_e('Extra class', 'woocommerce-checkout-manager'); ?></span>
570
- <input class="short" type="text" name="wccs_settings3[billing_buttons][{{data.id}}][extra_class]" value="{{data.extra_class}}">
571
- </label>
572
 
573
- <div class="attachment-compat">
574
- <form class="compat-item"></form>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
575
  </div>
576
- </div>
577
 
578
- <div class="actions">
579
- <a target="_blank" class="view-attachment" href="<?php echo wc_get_page_permalink('checkout'); ?>"><?php esc_html_e('View checkout page', 'woocommerce-checkout-managert'); ?></a> |
580
- <a target="_blank" href="<?php echo WOOCCM_PURCHASE_URL; ?>"><?php esc_html_e('Get premium version', 'woocommerce-checkout-managert'); ?></a> |
581
- <a target="_blank" href="<?php echo WOOCCM_PURCHASE_URL; ?>"><?php esc_html_e('Get premium version', 'woocommerce-checkout-managert'); ?></a>
582
- </div>
583
 
 
584
  </div>
585
- </div>
586
 
587
- </div>
588
- <div class="media-frame-toolbar" style="left:0;">
589
- <div class="media-toolbar">
590
- <div class="media-toolbar-secondary"></div>
591
- <div class="media-toolbar-primary search-form">
592
- <button type="button" class="media-modal-save button button-primary media-button button-large"><?php esc_html_e('Save'); ?></button>
593
- <button type="button" class="media-modal-delete button button-secondary media-button button-large"><?php esc_html_e('Delete'); ?></button>
 
594
  </div>
595
  </div>
596
  </div>
597
- </div>
598
  </div>
599
  </div>
600
  </script>
116
  <div class="media-modal-backdrop">&nbsp;</div>
117
  <div tabindex="0" id="<?php echo esc_attr(WOOCCM_PREFIX . '_modal'); ?>" class="media-modal wp-core-ui upload-php" role="dialog" aria-modal="true" aria-labelledby="media-frame-title">
118
  <div class="media-modal-content" role="document">
119
+ <form class="media-modal-form" method="POST" data-field_id="{{data.id}}">
120
+ <div class="edit-attachment-frame mode-select hide-menu hide-router">
121
+ <div class="edit-media-header">
122
+ <button data-field_id="{{ data.prev_id}}" class="media-modal-prev left dashicons <# if ( data.prev_id < 0 ) { #>disabled<# } #>"><span class="screen-reader-text"><?php esc_html_e('Edit previous media item'); ?></span></button>
123
+ <button data-field_id="{{ data.next_id}}" class="media-modal-next right dashicons <# if ( data.next_id == data.id ) { #>disabled<# } #>"><span class="screen-reader-text"><?php esc_html_e('Edit next media item'); ?></span></button>
124
+ <button type="button" class="media-modal-close"><span class="media-modal-icon"><span class="screen-reader-text"><?php esc_html_e('Close dialog'); ?></span></span>
125
+ </button>
126
+ </div>
127
+ <div class="media-frame-title">
128
+ <h1><?php esc_html_e('Edit field', 'woocommerce-checkout-manager'); ?> #{{ data.id }}</h1>
129
+ </div>
130
+ <div class="media-frame-content" style="bottom:61px;">
 
 
131
 
132
+ <div class="attachment-details">
133
+ <div class="attachment-media-view landscape" style="overflow: hidden;">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
134
 
135
+ <div id="woocommerce-product-data">
136
+ <div class="panel-wrap product_data" style="overflow:visible;">
137
+ <ul class="product_data_tabs wc-tabs">
138
+ <li class="general_options active">
139
+ <a href="#general_product_data"><span><?php esc_html_e('General', 'woocommerce-checkout-manager'); ?></span></a>
140
+ </li>
141
+ <li class="shipping_options">
142
+ <a href="#shipping_product_data"><span><?php esc_html_e('Conditional', 'woocommerce-checkout-manager'); ?></span></a>
143
+ </li>
144
+ <li class="linked_product_options">
145
+ <a href="#linked_product_data"><span><?php esc_html_e('Amount', 'woocommerce-checkout-manager'); ?></span></a>
146
+ </li>
147
+ <li class="variations_options">
148
+ <a href="#variable_product_options"><span><?php esc_html_e('Display', 'woocommerce-checkout-manager'); ?></span></a>
149
+ </li>
150
+ <li class="advanced_options">
151
+ <a href="#advanced_product_data"><span><?php esc_html_e('Timing', 'woocommerce-checkout-manager'); ?></span></a>
152
+ </li>
153
+ <li class="marketplace-suggestions_options">
154
+ <a href="#marketplace_suggestions"><span><?php esc_html_e('Advanced', 'woocommerce-checkout-manager'); ?></span></a>
155
+ </li>
156
+ </ul>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
157
 
158
+ <div id="general_product_data" class="panel woocommerce_options_panel" style="display: none;">
159
+ <div class="options_group">
160
+ <!--<p>
161
+ <td class="billing-wccs-order-hidden">
162
+ <input type="hidden" name="order" value="{{data.order}}">
163
+ </p>-->
164
+ <!--<p>
165
+ <label><?php esc_html_e('Disabled', 'woocommerce-checkout-manager'); ?></label>
166
+ <input name="disabled" type="checkbox" value="{{data.disabled}}">
167
+ </p>-->
168
+ <!--<p>
169
+ <label><?php esc_html_e('Required', 'woocommerce-checkout-manager'); ?></label>
170
+ <input name="checkbox" type="checkbox" title="Whether or not the checkout field is required" value="{{data.checkbox}}" checked="checked">
171
+ </p>-->
172
+ <p class="form-field">
173
+ <label><?php esc_html_e('Name', 'woocommerce-checkout-manager'); ?></label>
174
+ <input class="short" type="text" name="cow" placeholder="<?php esc_html_e('MyField', 'woocommerce-checkout-manager'); ?>" value="{{data.cow}}" readonly="readonly">
175
+ <span class="description"><?php esc_html_e('To edit Abbreviations open General > Switches > Editing Of Abbreviation Fields.', 'woocommerce-checkout-manager'); ?></span>
176
+ </p>
177
+ </div>
178
+ <!--<div class="options_group">
179
+ <p class="form-field">
180
+ <label><?php esc_html_e('Position', 'woocommerce-checkout-manager'); ?></label>
181
+ <select class="select short" name="position">
182
+ <option <# if ( data.position == 'form-row-wide' ) { #>selected<# } #> value="form-row-wide"><?php esc_html_e('Wide', 'woocommerce-checkout-manager'); ?></option>
183
+ <option <# if ( data.position == 'form-row-first' ) { #>selected<# } #> value="form-row-first"><?php esc_html_e('Left', 'woocommerce-checkout-manager'); ?></option>
184
+ <option <# if ( data.position == 'form-row-last' ) { #>selected<# } #> value="form-row-last"><?php esc_html_e('Right', 'woocommerce-checkout-manager'); ?></option>
185
+ </select>
186
+ <span class="description"><?php esc_html_e('Placement of the checkout field.', 'woocommerce-checkout-manager'); ?></span>
187
+ </p>
188
+ <p class="form-field">
189
+ <label><?php esc_html_e('Clear', 'woocommerce-checkout-manager'); ?></label>
190
+ <input <# if ( data.clear_row == 'true' ) { #>checked<# } #> type="checkbox" name="clear_row" value="true">
191
+ <span class="description"><?php esc_html_e('Applies a clear fix to the checkout field.', 'woocommerce-checkout-manager'); ?></span>
192
+ </p>
193
+ <p class="form-field">
194
+ <label><?php esc_html_e('Extra class', 'woocommerce-checkout-manager'); ?></label>
195
+ <input class="short" type="text" name="extra_class" value="{{data.extra_class}}">
196
+ </p>
197
+ </div>-->
198
+ <!--<div class="options_group">
199
+ <p class="form-field">
200
+ <label><?php esc_html_e('Label', 'woocommerce-checkout-manager'); ?></label>
201
+ <input class="short" type="text" name="label" placeholder="<?php esc_html_e('My Field Name', 'woocommerce-checkout-manager'); ?>" value="{{data.label}}">
202
+ <span class="description"><?php esc_html_e('Placeholder text for the checkout field.', 'woocommerce-checkout-manager'); ?></span>
203
+ </p>
204
+ <p class="form-field">
205
+ <label><?php esc_html_e('Placeholder', 'woocommerce-checkout-manager'); ?></label>
206
+ <input class="short" type="text" name="placeholder" title="" placeholder="<?php esc_html_e('Example red', 'woocommerce-checkout-manager'); ?>" value="{{data.placeholder}}">
207
+ <span class="description"><?php esc_html_e('Placeholder text for the checkout field.', 'woocommerce-checkout-manager'); ?></span>
208
+ </p>
209
+ </div>
210
 
211
+ <div class="options_group">
212
+ <p class="form-field">
213
+ <label><?php esc_html_e('Type', 'woocommerce-checkout-manager'); ?></label>
214
+ <select class="select short" name="type">
215
+ <option <# if ( data.type == 'wooccmtext' ) { #>selected<# } #> value="wooccmtext"><?php esc_html_e('Text Input', 'woocommerce-checkout-manager'); ?></option>
216
+ <option <# if ( data.type == 'wooccmtextarea' ) { #>selected<# } #> value="wooccmtextarea"><?php esc_html_e('Textarea', 'woocommerce-checkout-manager'); ?></option>
217
+ <option <# if ( data.type == 'wooccmpassword' ) { #>selected<# } #> value="wooccmpassword"><?php esc_html_e('Password', 'woocommerce-checkout-manager'); ?></option>
218
+ <option <# if ( data.type == 'wooccmradio' ) { #>selected<# } #> value="wooccmradio"><?php esc_html_e('Radio Buttons', 'woocommerce-checkout-manager'); ?></option>
219
+ <option <# if ( data.type == 'checkbox_wccm' ) { #>selected<# } #> value="checkbox_wccm"><?php esc_html_e('Check Box', 'woocommerce-checkout-manager'); ?></option>
220
+ <option <# if ( data.type == 'wooccmselect' ) { #>selected<# } #> value="wooccmselect"><?php esc_html_e('Select Options', 'woocommerce-checkout-manager'); ?></option>
221
+ <option <# if ( data.type == 'datepicker' ) { #>selected<# } #> value="datepicker"><?php esc_html_e('Date Picker', 'woocommerce-checkout-manager'); ?></option>
222
+ <option <# if ( data.type == 'time' ) { #>selected<# } #> value="time"><?php esc_html_e('Time Picker', 'woocommerce-checkout-manager'); ?></option>
223
+ <option <# if ( data.type == 'colorpicker' ) { #>selected<# } #> value="colorpicker"><?php esc_html_e('Color Picker', 'woocommerce-checkout-manager'); ?></option>
224
+ <option <# if ( data.type == 'heading' ) { #>selected<# } #> value="heading"><?php esc_html_e('Heading', 'woocommerce-checkout-manager'); ?></option>
225
+ <option <# if ( data.type == 'multiselect' ) { #>selected<# } #> value="multiselect"><?php esc_html_e('Multi-Select', 'woocommerce-checkout-manager'); ?></option>
226
+ <option <# if ( data.type == 'multicheckbox' ) { #>selected<# } #> value="multicheckbox"><?php esc_html_e('Multi-Checkbox', 'woocommerce-checkout-manager'); ?></option>
227
+ <option <# if ( data.type == 'wooccmcountry' ) { #>selected<# } #> value="wooccmcountry"><?php esc_html_e('Country', 'woocommerce-checkout-manager'); ?></option>
228
+ <option <# if ( data.type == 'wooccmstate' ) { #>selected<# } #> value="wooccmstate"><?php esc_html_e('State', 'woocommerce-checkout-manager'); ?></option>
229
+ <option <# if ( data.type == 'wooccmupload' ) { #>selected<# } #> value="wooccmupload"><?php esc_html_e('File Picker', 'woocommerce-checkout-manager'); ?></option>
230
+ </select>
231
+ <span class="description"><?php esc_html_e('Type of the checkout field', 'woocommerce-checkout-manager'); ?></span>
232
+ </p>
233
+ </div>-->
234
+ <div class="options_group">
235
+ <!--
236
+ 1326
237
+ <p class="form-field">
238
+ <label><?php esc_html_e('Adapt', 'woocommerce-checkout-manager'); ?></label>
239
+ <input <# if ( data.fancy == 'country_select' ) { #>checked<# } #> type="checkbox" name="fancy" value="country_select">
240
+ </p>
241
+ -->
242
+ <p class="form-field">
243
+ <label><?php esc_html_e('Title', 'woocommerce-checkout-manager'); ?></label>
244
+ <input class="short" type="text" name="force_title2" placeholder="<?php esc_html_e('Name Guide', 'woocommerce-checkout-manager'); ?>" value="{{data.force_title2}}">
245
+ </p>
246
+ <p class="form-field">
247
+ <label><?php esc_html_e('Options', 'woocommerce-checkout-manager'); ?></label>
248
+ <input class="short" type="text" name="option_array" placeholder="Option 1||Option 2||Option 3" value="{{data.option_array}}">
249
+ </p>
250
+ </div>
251
  </div>
 
252
 
253
+ <div id="shipping_product_data" class="panel woocommerce_options_panel hidden" style="display: none;">
254
+ <div class="options_group">
255
+ <p class="form-field">
256
+ <label><?php esc_html_e('Conditional', 'woocommerce-checkout-manager'); ?></label>
257
+ <input <# if ( data.conditional_parent_use == 'true' ) { #>checked<# } #> type="checkbox" name="conditional_parent_use" value="true">
258
+ </p>
259
+ <p class="form-field">
260
+ <label><?php esc_html_e('Conditional Parent', 'woocommerce-checkout-manager'); ?></label>
261
+ <input <# if ( data.conditional_parent == 'true' ) { #>checked<# } #> type="checkbox" name="conditional_parent" value="true">
262
+ </p>
263
+ <p class="form-field">
264
+ <label><?php esc_html_e('Conditional Tie', 'woocommerce-checkout-manager'); ?></label>
265
+ <input class="short" type="text" name="conditional_tie" placeholder="<?php esc_html_e('Parent Abbr. Name', 'woocommerce-checkout-manager'); ?>" value="{{data.conditional_tie}}">
266
+ </p>
267
+ <p class="form-field">
268
+ <label><?php esc_html_e('Chosen Value', 'woocommerce-checkout-manager'); ?></label>
269
+ <input class="short" type="text" name="chosen_valt" placeholder="Yes" value="{{data.chosen_valt}}">
270
+ </p>
271
+ </div>
272
  </div>
273
 
274
+ <div id="linked_product_data" class="panel woocommerce_options_panel hidden" style="display: none;">
275
 
276
+ <div class="options_group">
277
+ <p class="form-field">
278
+ <label><?php esc_html_e('Add Amount', 'woocommerce-checkout-manager'); ?></label>
279
+ <input <# if ( data.add_amount == 'true' ) { #>checked<# } #> type="checkbox" name="add_amount" value="true">
280
+ </p>
281
+ <p class="form-field">
282
+ <label><?php esc_html_e('Amount Name', 'woocommerce-checkout-manager'); ?></label>
283
+ <input class="short" name="fee_name" type="text" value="{{data.fee_name}}" placeholder="<?php esc_html_e('My Custom Charge', 'woocommerce-checkout-manager'); ?>">
284
+ </p>
285
+ <p class="form-field">
286
+ <label><?php esc_html_e('Amount Total', 'woocommerce-checkout-manager'); ?></label>
287
+ <input class="short" name="add_amount_field" type="text" value="{{data.add_amount_field}}" placeholder="50">
288
+ </p>
289
+ </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
290
 
291
+ <div class="options_group">
292
+ <p class="form-field">
293
+ <label><?php esc_html_e('Deny Checkout', 'woocommerce-checkout-manager'); ?></label>
294
+ <input <# if ( data.deny_checkout == 'true' ) { #>checked<# } #> type="checkbox" name="deny_checkout" value="true">
295
+ <span class="description"><?php esc_html_e('1326.', 'woocommerce-checkout-manager'); ?></span>
296
+ </p>
297
+ <p class="form-field">
298
+ <label><?php esc_html_e('Tax Remove', 'woocommerce-checkout-manager'); ?></label>
299
+ <input <# if ( data.tax_remove == 'true' ) { #>checked<# } #> type="checkbox" name="tax_remove" value="true">
300
+ </p>
301
+ <p class="form-field">
302
+ <label><?php esc_html_e('Deny Receipt', 'woocommerce-checkout-manager'); ?></label>
303
+ <input <# if ( data.deny_receipt == 'true' ) { #>checked<# } #> type="checkbox" name="deny_receipt" value="true">
304
+ </p>
305
+ <p class="form-field">
306
+ <label><?php esc_html_e('Default Color', 'woocommerce-checkout-manager'); ?></label>
307
+ <input class="short" type="text" name="colorpickerd" id="billing-colorpic0" placeholder="#000000" value="{{data.colorpickerd}}">
308
+ </p>
309
+ <p class="form-field">
310
+ <label><?php esc_html_e('Picker Type', 'woocommerce-checkout-manager'); ?></label>
311
+ <select class="select short" name="colorpickertype">
312
+ <option <# if ( data.colorpickertype == 'farbtastic' ) { #>selected<# } #> value="farbtastic"><?php esc_html_e('Farbtastic', 'woocommerce-checkout-manager'); ?></option>
313
+ <option <# if ( data.colorpickertype == 'iris' ) { #>selected<# } #> value="iris"><?php esc_html_e('Iris', 'woocommerce-checkout-manager'); ?></option>
314
+ </select>
315
+ </p>
316
+ </div>
317
 
 
 
 
 
 
 
 
 
 
 
 
 
 
318
  </div>
319
 
320
+ <div id="variable_product_options" class="panel woocommerce_options_panel hidden" style="display: none;">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
321
 
322
+ <div class="options_group">
323
+ <p class="form-field">
324
+ <label><?php esc_html_e('User Role', 'woocommerce-checkout-manager'); ?></label>
325
+ <input <# if ( data.user_role == 'user_role' ) { #>checked<# } #> type="checkbox" name="user_role" value="user_role">
326
+ </p>
327
+ <p class="form-field">
328
+ <label><?php esc_html_e('Show for Roles', 'woocommerce-checkout-manager'); ?></label>
329
+ <input class="short" type="text" name="role_options" placeholder="Option 1||Option 2||Option 3" value="{{data.role_options}}">
330
+ </p>
331
+ <p class="form-field">
332
+ <label><?php esc_html_e('Hide for Roles', 'woocommerce-checkout-manager'); ?></label>
333
+ <input class="short" type="text" name="role_options2" placeholder="Option 1||Option 2||Option 3" value="{{data.role_options2}}">
334
+ </p>
335
+ </div>
336
 
337
+ <div class="options_group">
338
+ <p class="form-field">
339
+ <label><?php esc_html_e('More', 'woocommerce-checkout-manager'); ?></label>
340
+ <input <# if ( data.more_content == '1' ) { #>checked<# } #> type="checkbox" name="more_content" value="1">
341
+ </p>
342
+ <p class="form-field">
343
+ <label><?php esc_html_e('Hide Field from Product', 'woocommerce-checkout-manager'); ?></label>
344
+ <input class="short" type="text" name="single_p" placeholder="Product ID(s) e.g 1674||1233" value="{{data.single_p}}">
345
+ </p>
346
+ <p class="form-field">
347
+ <label><?php esc_html_e('Show Field for Product', 'woocommerce-checkout-manager'); ?></label>
348
+ <input class="short" type="text" name="single_px" placeholder="Product ID(s) e.g 1674||1233" value="{{data.single_px}}">
349
+ </p>
350
+ <p class="form-field">
351
+ <label><?php esc_html_e('Hide Field from Category', 'woocommerce-checkout-manager'); ?></label>
352
+ <input class="short" type="text" name="single_p_cat" placeholder="Category Slug(s) e.g my-cat||my-cat2" value="{{data.single_p_cat}}">
353
+ </p>
354
+ <p class="form-field">
355
+ <label><?php esc_html_e('Show Field for Category', 'woocommerce-checkout-manager'); ?></label>
356
+ <input class="short" type="text" name="single_px_cat" placeholder="my-cat-slug||my-cat2-slug" value="{{data.sigle_px_cat}}">
357
+ </p>
358
+ </div>
359
  </div>
360
 
361
+ <div id="advanced_product_data" class="panel woocommerce_options_panel hidden" style="display: none;">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
362
 
363
+ <div class="options_group">
364
+ <p class="form-field">
365
+ <label><?php esc_html_e('Start Hour', 'woocommerce-checkout-manager'); ?></label>
366
+ <input class="short" type="text" placeholder="6" name="start_hour" value="{{data.start_hour}}">
367
+ </p>
368
+ <p class="form-field">
369
+ <label><?php esc_html_e('End Hour', 'woocommerce-checkout-manager'); ?></label>
370
+ <input class="short" type="text" placeholder="9" name="end_hour" value="{{data.end_hour}}">
371
+ </p>
372
+ <p class="form-field">
373
+ <label><?php esc_html_e('Interval Min.', 'woocommerce-checkout-manager'); ?></label>
374
+ <input class="short" type="text" placeholder="15" name="interval_min" value="{{data.interval_min}}">
375
+ </p>
376
+ <p class="form-field">
377
+ <label><?php esc_html_e('Manual Min.', 'woocommerce-checkout-manager'); ?></label>
378
+ <input class="short" type="text" placeholder="0, 10, 20, 30, 40" name="manual_min" value="{{data.manual_min}}">
379
+ </p>
380
+ </div>
 
 
 
 
 
 
381
 
382
+ <div class="options_group">
383
+ <p class="form-field">
384
+ <label><?php esc_html_e('Date Format', 'woocommerce-checkout-manager'); ?></label>
385
+ <input class="short" type="text" placeholder="dd-mm-yy" name="format_date" value="{{data.format_date}}">
386
+ </p>
387
+ <p class="form-field">
388
+ <label><?php esc_html_e('Days Before', 'woocommerce-checkout-manager'); ?></label>
389
+ <input class="short" type="text" placeholder="+3" name="min_before" value="{{data.min_before}}">
390
+ </p>
391
+ <p class="form-field">
392
+ <label><?php esc_html_e('Days After', 'woocommerce-checkout-manager'); ?></label>
393
+ <input class="short" type="text" placeholder="3" name="max_after" value="{{data.max_after}}">
394
+ </p>
395
+ <p class="form-field">
396
+ <label><?php esc_html_e('Days Enabler', 'woocommerce-checkout-manager'); ?></label>
397
+ <input <# if ( data.days_disabler == 'true' ) { #>checked<# } #> type="checkbox" name="days_disabler" value="true">
398
+ </p>
399
+ <p class="form-field">
400
+ <label><?php esc_html_e('Sundays', 'woocommerce-checkout-manager'); ?></label>
401
+ <input <# if ( data.days_disabler0 == '1' ) { #>checked<# } #> type="checkbox" name="days_disabler0" value="1">
402
+ </p>
403
+ <p class="form-field">
404
+ <label><?php esc_html_e('Mondays', 'woocommerce-checkout-manager'); ?></label>
405
+ <input <# if ( data.days_disabler1 == '1' ) { #>checked<# } #> type="checkbox" name="days_disabler1" value="1">
406
+ </p>
407
+ <p class="form-field">
408
+ <label><?php esc_html_e('Tuesdays', 'woocommerce-checkout-manager'); ?></label>
409
+ <input <# if ( data.days_disabler2 == '1' ) { #>checked<# } #> type="checkbox" name="days_disabler2" value="1">
410
+ </p>
411
+ <p class="form-field">
412
+ <label><?php esc_html_e('Wednesdays', 'woocommerce-checkout-manager'); ?></label>
413
+ <input <# if ( data.days_disabler3 == '1' ) { #>checked<# } #> type="checkbox" name="days_disabler3" value="1">
414
+ </p>
415
+ <p class="form-field">
416
+ <label><?php esc_html_e('Thursdays', 'woocommerce-checkout-manager'); ?></label>
417
+ <input <# if ( data.days_disabler4 == '1' ) { #>checked<# } #> type="checkbox" name="days_disabler4" value="1">
418
+ </p>
419
+ <p class="form-field">
420
+ <label><?php esc_html_e('Fridays', 'woocommerce-checkout-manager'); ?></label>
421
+ <input <# if ( data.days_disabler5 == '1' ) { #>checked<# } #> type="checkbox" name="days_disabler5" value="1">
422
+ </p>
423
+ <p class="form-field">
424
+ <label><?php esc_html_e('Satudays', 'woocommerce-checkout-manager'); ?></label>
425
+ <input <# if ( data.days_disabler6 == '1' ) { #>checked<# } #> type="checkbox" name="days_disabler6" value="1">
426
+ </p>
427
+ </div>
428
 
429
+ <div class="options_group">
430
+ <p class="form-field dimensions_field">
431
+ <label for="product_length"><?php esc_html_e('Min Date', 'woocommerce-checkout-manager'); ?></label>
432
+ <span class="wrap">
433
+ <input style="width:29%" type="text" name="single_yy" placeholder="2013" title="yy" value="{{data.single_yy}}">
434
+ <input style="width:29%" type="text" name="single_mm" placeholder="10" title="mm" value="{{data.single_mm}}">
435
+ <input style="width:29%" type="text" name="single_dd" placeholder="25" title="dd" value="{{data.single_dd}}">
436
+ </span>
437
+ <span class="woocommerce-help-tip"></span>
438
+ </p>
439
+ <p class="form-field dimensions_field">
440
+ <label for="product_length"><?php esc_html_e('Max Date', 'woocommerce-checkout-manager'); ?></label>
441
+ <span class="wrap">
442
+ <input style="width:29%" type="text" name="single_max_yy" placeholder="2013" title="yy" value="{{data.single_max_yy}}">
443
+ <input style="width:29%" type="text" name="single_max_mm" placeholder="10" title="mm" value="{{data.single_max_mm}}">
444
+ <input style="width:29%" type="text" name="single_max_dd" placeholder="25" title="dd" value="{{data.single_max_dd}}">
445
+ </span>
446
+ <span class="woocommerce-help-tip"></span>
447
+ </p>
448
  </div>
449
+
450
  </div>
451
+
452
+ <div id="marketplace_suggestions" class="panel woocommerce_options_panel hidden" style="display: none;">
453
+ <div class="marketplace-suggestions-container showing-suggestion" data-marketplace-suggestions-context="product-edit-meta-tab-header">
454
+ <div class="marketplace-suggestion-container" data-suggestion-slug="product-edit-meta-tab-header">
455
+ <div class="marketplace-suggestion-container-content">
456
+ <h4>Recommended extensions</h4></div>
457
+ <div class="marketplace-suggestion-container-cta"></div>
 
458
  </div>
459
  </div>
460
+ <div class="marketplace-suggestions-container showing-suggestion" data-marketplace-suggestions-context="product-edit-meta-tab-body">
461
+ <div class="marketplace-suggestion-container" data-suggestion-slug="product-edit-name-your-price"><img src="https://woocommerce.com/wp-content/plugins/wccom-plugins//marketplace-suggestions/icons/name-your-price.svg" class="marketplace-suggestion-icon">
462
+ <div class="marketplace-suggestion-container-content">
463
+ <h4>Name Your Price</h4>
464
+ <p>Let customers pay what they want - useful for donations, tips and more</p>
465
+ </div>
466
+ <div class="marketplace-suggestion-container-cta"><a href="https://woocommerce.com/products/name-your-price/?wccom-site=http%3A%2F%2Flocalhost%2Fwoocommerce-checkout&amp;wccom-back=%2Fwoocommerce-checkout%2Fwp-admin%2Fpost.php%3Fpost%3D6%26%23038%3Baction%3Dedit&amp;wccom-woo-version=3.7.0&amp;utm_source=editproduct&amp;utm_campaign=marketplacesuggestions&amp;utm_medium=product" target="blank" class="button">Learn More</a>
467
+ <a class="suggestion-dismiss" title="Dismiss this suggestion" href="#"></a>
468
+ </div>
469
  </div>
470
+ <div class="marketplace-suggestion-container" data-suggestion-slug="product-edit-variation-images"><img src="https://woocommerce.com/wp-content/plugins/wccom-plugins//marketplace-suggestions/icons/additional-variation-images.svg" class="marketplace-suggestion-icon">
471
+ <div class="marketplace-suggestion-container-content">
472
+ <h4>Additional Variation Images</h4>
473
+ <p>Showcase your products in the best light with a image for each variation</p>
474
+ </div>
475
+ <div class="marketplace-suggestion-container-cta"><a href="https://woocommerce.com/products/woocommerce-additional-variation-images/?wccom-site=http%3A%2F%2Flocalhost%2Fwoocommerce-checkout&amp;wccom-back=%2Fwoocommerce-checkout%2Fwp-admin%2Fpost.php%3Fpost%3D6%26%23038%3Baction%3Dedit&amp;wccom-woo-version=3.7.0&amp;utm_source=editproduct&amp;utm_campaign=marketplacesuggestions&amp;utm_medium=product" target="blank" class="button">Learn More</a>
476
+ <a class="suggestion-dismiss" title="Dismiss this suggestion" href="#"></a>
477
+ </div>
478
  </div>
479
+ <div class="marketplace-suggestion-container" data-suggestion-slug="product-edit-woocommerce-one-page-checkout"><img src="https://woocommerce.com/wp-content/plugins/wccom-plugins//marketplace-suggestions/icons/one-page-checkout.svg" class="marketplace-suggestion-icon">
480
+ <div class="marketplace-suggestion-container-content">
481
+ <h4>One Page Checkout</h4>
482
+ <p>Don't make customers click around - let them choose products, checkout &amp; pay all on one page</p>
483
+ </div>
484
+ <div class="marketplace-suggestion-container-cta"><a href="https://woocommerce.com/products/woocommerce-one-page-checkout/?wccom-site=http%3A%2F%2Flocalhost%2Fwoocommerce-checkout&amp;wccom-back=%2Fwoocommerce-checkout%2Fwp-admin%2Fpost.php%3Fpost%3D6%26%23038%3Baction%3Dedit&amp;wccom-woo-version=3.7.0&amp;utm_source=editproduct&amp;utm_campaign=marketplacesuggestions&amp;utm_medium=product" target="blank" class="button">Learn More</a>
485
+ <a class="suggestion-dismiss" title="Dismiss this suggestion" href="#"></a>
486
+ </div>
487
  </div>
488
+ <div class="marketplace-suggestion-container" data-suggestion-slug="product-edit-min-max-quantities"><img src="https://woocommerce.com/wp-content/plugins/wccom-plugins//marketplace-suggestions/icons/min-max-quantities.svg" class="marketplace-suggestion-icon">
489
+ <div class="marketplace-suggestion-container-content">
490
+ <h4>Min/Max Quantities</h4>
491
+ <p>Specify minimum and maximum allowed product quantities for orders to be completed</p>
492
+ </div>
493
+ <div class="marketplace-suggestion-container-cta"><a href="https://woocommerce.com/products/min-max-quantities/?wccom-site=http%3A%2F%2Flocalhost%2Fwoocommerce-checkout&amp;wccom-back=%2Fwoocommerce-checkout%2Fwp-admin%2Fpost.php%3Fpost%3D6%26%23038%3Baction%3Dedit&amp;wccom-woo-version=3.7.0&amp;utm_source=editproduct&amp;utm_campaign=marketplacesuggestions&amp;utm_medium=product" target="blank" class="button">Learn More</a>
494
+ <a class="suggestion-dismiss" title="Dismiss this suggestion" href="#"></a>
495
+ </div>
496
  </div>
497
  </div>
498
+ <div class="marketplace-suggestions-container showing-suggestion" data-marketplace-suggestions-context="product-edit-meta-tab-footer">
499
+ <div class="marketplace-suggestion-container" data-suggestion-slug="product-edit-meta-tab-footer-browse-all">
500
+ <div class="marketplace-suggestion-container-content has-manage-link"><a class="marketplace-suggestion-manage-link linkout" href="http://localhost/woocommerce-checkout/wp-admin/admin.php?page=wc-settings&amp;tab=advanced&amp;section=woocommerce_com">Manage suggestions</a></div>
501
+ <div class="marketplace-suggestion-container-cta"><a href="https://woocommerce.com/product-category/woocommerce-extensions/?wccom-site=http%3A%2F%2Flocalhost%2Fwoocommerce-checkout&amp;wccom-back=%2Fwoocommerce-checkout%2Fwp-admin%2Fpost.php%3Fpost%3D6%26%23038%3Baction%3Dedit&amp;wccom-woo-version=3.7.0&amp;utm_source=editproduct&amp;utm_campaign=marketplacesuggestions&amp;utm_medium=product" target="blank" class="linkout">Browse all extensions<span class="dashicons dashicons-external"></span></a></div>
 
 
 
502
  </div>
503
  </div>
504
+ <div class="marketplace-suggestions-metabox-nosuggestions-placeholder hidden">
505
+ <img src="https://woocommerce.com/wp-content/plugins/wccom-plugins/marketplace-suggestions/icons/get_more_options.svg" class="marketplace-suggestion-icon">
506
+ <div class="marketplace-suggestion-placeholder-content">
507
+ <h4>Enhance your products</h4>
508
+ <p>Extensions can add new functionality to your product pages that make your store stand out</p>
509
+ </div>
510
+ <a href="https://woocommerce.com/product-category/woocommerce-extensions/?utm_source=editproduct&amp;utm_campaign=marketplacesuggestions&amp;utm_medium=product" target="blank" class="button">Browse the Marketplace</a>
511
+ <br>
512
+ <a class="marketplace-suggestion-manage-link" href="http://localhost/woocommerce-checkout/wp-admin/admin.php?page=wc-settings&amp;tab=advanced&amp;section=woocommerce_com">Manage suggestions</a>
 
 
 
513
  </div>
 
 
 
514
  </div>
515
+ <div class="clear"></div>
516
  </div>
 
517
  </div>
 
518
 
 
 
 
 
 
 
 
 
 
519
  </div>
520
+ <div class="attachment-info">
521
+ <span class="settings-save-status">
522
+ <span class="spinner"></span>
523
+ <span class="saved"><?php esc_html_e('Saved.'); ?></span>
524
+ </span>
525
+ <div class="details">
526
+ <div class="filename"><strong><?php esc_html_e('Field id', 'woocommerce-checkout-manager'); ?>:</strong> #{{data.id}}</div>
527
+ <div class="filename"><strong><?php esc_html_e('Filed slug', 'woocommerce-checkout-manager'); ?>:</strong> {{data.cow}}</div>
528
+ </div>
529
+
530
+ <div class="settings">
531
 
532
+ <label class="setting" data-setting="label">
533
+ <span class="name"><?php esc_html_e('Type', 'woocommerce-checkout-manager'); ?></span>
534
+ <select name="type">
535
+ <option <# if ( data.type == 'wooccmtext' ) { #>selected<# } #> value="wooccmtext"><?php esc_html_e('Text Input', 'woocommerce-checkout-manager'); ?></option>
536
+ <option <# if ( data.type == 'wooccmtextarea' ) { #>selected<# } #> value="wooccmtextarea"><?php esc_html_e('Textarea', 'woocommerce-checkout-manager'); ?></option>
537
+ <option <# if ( data.type == 'wooccmpassword' ) { #>selected<# } #> value="wooccmpassword"><?php esc_html_e('Password', 'woocommerce-checkout-manager'); ?></option>
538
+ <option <# if ( data.type == 'wooccmradio' ) { #>selected<# } #> value="wooccmradio"><?php esc_html_e('Radio Buttons', 'woocommerce-checkout-manager'); ?></option>
539
+ <option <# if ( data.type == 'checkbox_wccm' ) { #>selected<# } #> value="checkbox_wccm"><?php esc_html_e('Check Box', 'woocommerce-checkout-manager'); ?></option>
540
+ <option <# if ( data.type == 'wooccmselect' ) { #>selected<# } #> value="wooccmselect"><?php esc_html_e('Select Options', 'woocommerce-checkout-manager'); ?></option>
541
+ <option <# if ( data.type == 'datepicker' ) { #>selected<# } #> value="datepicker"><?php esc_html_e('Date Picker', 'woocommerce-checkout-manager'); ?></option>
542
+ <option <# if ( data.type == 'time' ) { #>selected<# } #> value="time"><?php esc_html_e('Time Picker', 'woocommerce-checkout-manager'); ?></option>
543
+ <option <# if ( data.type == 'colorpicker' ) { #>selected<# } #> value="colorpicker"><?php esc_html_e('Color Picker', 'woocommerce-checkout-manager'); ?></option>
544
+ <option <# if ( data.type == 'heading' ) { #>selected<# } #> value="heading"><?php esc_html_e('Heading', 'woocommerce-checkout-manager'); ?></option>
545
+ <option <# if ( data.type == 'multiselect' ) { #>selected<# } #> value="multiselect"><?php esc_html_e('Multi-Select', 'woocommerce-checkout-manager'); ?></option>
546
+ <option <# if ( data.type == 'multicheckbox' ) { #>selected<# } #> value="multicheckbox"><?php esc_html_e('Multi-Checkbox', 'woocommerce-checkout-manager'); ?></option>
547
+ <option <# if ( data.type == 'wooccmcountry' ) { #>selected<# } #> value="wooccmcountry"><?php esc_html_e('Country', 'woocommerce-checkout-manager'); ?></option>
548
+ <option <# if ( data.type == 'wooccmstate' ) { #>selected<# } #> value="wooccmstate"><?php esc_html_e('State', 'woocommerce-checkout-manager'); ?></option>
549
+ <option <# if ( data.type == 'wooccmupload' ) { #>selected<# } #> value="wooccmupload"><?php esc_html_e('File Picker', 'woocommerce-checkout-manager'); ?></option>
550
+ </select>
551
+ </label>
552
+ <p class="description"><?php esc_html_e('Type of the checkout field', 'woocommerce-checkout-manager'); ?></p>
 
 
 
 
 
 
 
 
553
 
554
+ <label class="setting" data-setting="label">
555
+ <span class="name"><?php esc_html_e('Label', 'woocommerce-checkout-manager'); ?></span>
556
+ <input type="text" name="label" placeholder="<?php esc_html_e('My Field Name', 'woocommerce-checkout-manager'); ?>" value="{{data.label}}">
557
+ </label>
558
+ <p class="description"><?php esc_html_e('Label text for the checkout field.', 'woocommerce-checkout-manager'); ?></p>
559
+ <label class="setting" data-setting="placeholder">
560
+ <span class="name"><?php esc_html_e('Placeholder', 'woocommerce-checkout-manager'); ?></span>
561
+ <input type="text" name="placeholder" title="" placeholder="<?php esc_html_e('Example red', 'woocommerce-checkout-manager'); ?>" value="{{data.placeholder}}">
562
+ </label>
563
+ <p class="description"><?php esc_html_e('Placeholder text for the checkout field.', 'woocommerce-checkout-manager'); ?></p>
564
+ <label class="setting" data-setting="position">
565
+ <span class="name"><?php esc_html_e('Position', 'woocommerce-checkout-manager'); ?></span>
566
+ <select class="select short" name="position">
567
+ <option <# if ( data.position == 'form-row-wide' ) { #>selected<# } #> value="form-row-wide"><?php esc_html_e('Wide', 'woocommerce-checkout-manager'); ?></option>
568
+ <option <# if ( data.position == 'form-row-first' ) { #>selected<# } #> value="form-row-first"><?php esc_html_e('Left', 'woocommerce-checkout-manager'); ?></option>
569
+ <option <# if ( data.position == 'form-row-last' ) { #>selected<# } #> value="form-row-last"><?php esc_html_e('Right', 'woocommerce-checkout-manager'); ?></option>
570
+ </select>
571
+ </label>
572
+ <p class="description"><?php esc_html_e('Placement of the checkout field.', 'woocommerce-checkout-manager'); ?></p>
573
+ <label class="setting" data-setting="clear_row">
574
+ <span class="name"><?php esc_html_e('Clear', 'woocommerce-checkout-manager'); ?></span>
575
+ <input <# if ( data.clear_row == 'true' ) { #>checked<# } #> type="checkbox" name="clear_row" value="true">
576
+ </label>
577
+ <p class="description"><?php esc_html_e('Applies a clear fix to the checkout field.', 'woocommerce-checkout-manager'); ?></p>
578
+ <label class="setting" data-setting="extra_class">
579
+ <span class="name"><?php esc_html_e('Extra class', 'woocommerce-checkout-manager'); ?></span>
580
+ <input class="short" type="text" name="extra_class" value="{{data.extra_class}}">
581
+ </label>
582
+
583
+ <div class="attachment-compat">
584
+ <form class="compat-item"></form>
585
+ </div>
586
  </div>
 
587
 
588
+ <div class="actions">
589
+ <a target="_blank" class="view-attachment" href="<?php echo wc_get_page_permalink('checkout'); ?>"><?php esc_html_e('View checkout page', 'woocommerce-checkout-manager'); ?></a> |
590
+ <a target="_blank" href="<?php echo WOOCCM_PURCHASE_URL; ?>"><?php esc_html_e('Get premium version', 'woocommerce-checkout-manager'); ?></a> |
591
+ <a target="_blank" href="<?php echo WOOCCM_PURCHASE_URL; ?>"><?php esc_html_e('Get premium version', 'woocommerce-checkout-manager'); ?></a>
592
+ </div>
593
 
594
+ </div>
595
  </div>
 
596
 
597
+ </div>
598
+ <div class="media-frame-toolbar" style="left:0;">
599
+ <div class="media-toolbar">
600
+ <div class="media-toolbar-secondary"></div>
601
+ <div class="media-toolbar-primary search-form">
602
+ <button type="submit" class="media-modal-save button button-primary media-button button-large"><?php esc_html_e('Save'); ?></button>
603
+ <button type="button" class="media-modal-delete button button-secondary media-button button-large"><?php esc_html_e('Delete'); ?></button>
604
+ </div>
605
  </div>
606
  </div>
607
  </div>
608
+ </form>
609
  </div>
610
  </div>
611
  </script>
new/fields_handler.php CHANGED
@@ -7,78 +7,129 @@ if (!class_exists('WOOCCM_Fields_Handler')) {
7
  protected static $instance;
8
  protected static $i = 0;
9
 
10
- function remove_by_category($field, $key) {
11
 
12
- if (empty($field['disabled'])) {
13
 
14
  if (count($cart_contents = WC()->cart->get_cart_contents())) {
15
 
16
- $categoryarraycm = array();
17
 
18
- $multiproductsx_cat = ( isset($field['single_p_cat']) ? $field['single_p_cat'] : '' );
19
- $show_field_single_cat = ( isset($field['single_px_cat']) ? $field['single_px_cat'] : '' );
20
 
21
- $show_field_array_cat = explode('||', $show_field_single_cat);
22
-
23
- $multiarrayproductsx_cat = explode(',', $multiproductsx_cat);
24
 
25
  foreach ($cart_contents as $key => $values) {
 
 
 
 
26
 
 
 
 
27
  // hide field
28
  // -----------------------------------------------------------------
29
- if (!empty($terms = get_the_terms($values['product_id'], 'product_cat'))) {
 
 
 
 
30
 
31
- foreach ($terms as $term) {
 
 
 
 
 
 
 
 
 
32
 
33
- $categoryarraycm[] = $term->slug;
 
 
34
 
35
- // hide field without more
36
- // -------------------------------------------------------------
37
- if (!empty($field['single_p_cat']) && empty($field['more_content'])) {
 
 
 
 
38
 
39
- if (in_array($term->slug, $multiarrayproductsx_cat) && ( count($cart_contents) < 2 )) {
40
- $field['disabled'] = true;
41
- }
42
- }
 
 
 
 
 
 
 
 
 
43
 
44
- // show field without more
45
- // -------------------------------------------------------------
46
- if (!empty($field['single_px_cat']) && empty($field['more_content'])) {
47
 
48
- if (in_array($term->slug, $show_field_array_cat) && ( count($cart_contents) < 2 )) {
49
- $field['disabled'] = false;
50
- }
51
 
52
- if (!in_array($term->slug, $show_field_array_cat) && ( count($cart_contents) < 2 )) {
53
- $field['disabled'] = true;
54
- }
55
- }
56
- }
57
 
58
- // hide field with more
59
- // ---------------------------------------------------------------
60
- if (!empty($btn['single_p_cat']) && !empty($btn['more_content'])) {
61
 
62
- //$multiarrayproductsx_cat = explode(',', $multiproductsx_cat);
63
 
64
- if (array_intersect($categoryarraycm, $multiarrayproductsx_cat)) {
65
- $field['disabled'] = true;
66
- }
 
 
 
 
 
67
  }
 
68
 
69
- // show field with more
70
- // ---------------------------------------------------------------
71
- if (!empty($btn['single_px_cat']) && !empty($btn['more_content'])) {
 
 
 
 
 
 
 
72
 
73
- //$show_field_array_cat = explode('||', $show_field_single_cat);
 
 
74
 
75
- if (array_intersect($categoryarraycm, $show_field_array_cat)) {
76
- $field['disabled'] = false;
77
- }
 
 
 
 
78
 
79
- if (!array_intersect($categoryarraycm, $show_field_array_cat)) {
80
- $field['disabled'] = true;
81
- }
 
 
 
 
 
82
  }
83
  }
84
  }
@@ -168,9 +219,11 @@ if (!class_exists('WOOCCM_Fields_Handler')) {
168
 
169
  function init() {
170
 
171
- // Remove by category
172
- add_filter('wooccm_checkout_field_filter', array($this, 'remove_by_category'), 10, 2);
173
 
 
 
174
  // Remove fields
175
  // -----------------------------------------------------------------------
176
  add_filter('woocommerce_checkout_fields', array($this, 'remove_checkout_fields'));
7
  protected static $instance;
8
  protected static $i = 0;
9
 
10
+ function disable_by_category($field, $key) {
11
 
12
+ if (empty($field['disabled']) && (!empty($field['single_p_cat']) || !empty($field['single_px_cat']))) {
13
 
14
  if (count($cart_contents = WC()->cart->get_cart_contents())) {
15
 
16
+ $hide_cats_array = (array) explode(',', @$field['single_p_cat']);
17
 
18
+ $show_cats_array = (array) explode('||', @$field['single_px_cat']);
 
19
 
20
+ $product_cats = array();
 
 
21
 
22
  foreach ($cart_contents as $key => $values) {
23
+ if ($cats = wp_get_post_terms($values['product_id'], 'product_cat', array('orderby' => 'name', 'order' => 'ASC', 'fields' => 'slugs'))) {
24
+ $product_cats += $cats;
25
+ }
26
+ }
27
 
28
+ // field without more
29
+ // -------------------------------------------------------------------
30
+ if (empty($field['more_content']) && count($cart_contents) < 2) {
31
  // hide field
32
  // -----------------------------------------------------------------
33
+ if (!empty($field['single_p_cat'])) {
34
+ if (array_intersect($product_cats, $hide_cats_array)) {
35
+ $field['disabled'] = true;
36
+ }
37
+ }
38
 
39
+ // show field
40
+ // -----------------------------------------------------------------
41
+ if (!empty($field['single_px_cat'])) {
42
+ if (array_intersect($product_cats, $show_cats_array)) {
43
+ $field['disabled'] = false;
44
+ } else {
45
+ $field['disabled'] = true;
46
+ }
47
+ }
48
+ }
49
 
50
+ // field with more
51
+ // -------------------------------------------------------------------
52
+ if (!empty($field['more_content'])) {
53
 
54
+ // hide field
55
+ // -------------------------------------------------------------
56
+ if (!empty($field['single_p_cat'])) {
57
+ if (array_intersect($product_cats, $hide_cats_array)) {
58
+ $field['disabled'] = true;
59
+ }
60
+ }
61
 
62
+ // show field
63
+ // ---------------------------------------------------------------
64
+ if (!empty($field['single_px_cat'])) {
65
+ if (array_intersect($product_cats, $show_cats_array)) {
66
+ $field['disabled'] = false;
67
+ } else {
68
+ //error_log('disabled 4');
69
+ $field['disabled'] = true;
70
+ }
71
+ }
72
+ }
73
+ }
74
+ }
75
 
76
+ return $field;
77
+ }
 
78
 
79
+ function disable_by_product($field, $key) {
 
 
80
 
81
+ if (empty($field['disabled']) && (!empty($field['single_p']) || !empty($field['single_px']))) {
82
+
83
+ if (count($cart_contents = WC()->cart->get_cart_contents())) {
84
+
85
+ $hide_ids_array = (array) explode(',', @$field['single_p']);
86
 
87
+ $show_ids_array = (array) explode('||', @$field['single_px']);
 
 
88
 
89
+ $product_ids = array_column($cart_contents, 'product_id');
90
 
91
+ // field without more
92
+ // -------------------------------------------------------------------
93
+ if (empty($field['more_content']) && count($cart_contents) < 2) {
94
+ // hide field
95
+ // -----------------------------------------------------------------
96
+ if (!empty($field['single_p'])) {
97
+ if (array_intersect($product_ids, $hide_ids_array)) {
98
+ $field['disabled'] = true;
99
  }
100
+ }
101
 
102
+ // show field
103
+ // -----------------------------------------------------------------
104
+ if (!empty($field['single_px'])) {
105
+ if (array_intersect($product_ids, $show_ids_array)) {
106
+ $field['disabled'] = false;
107
+ } else {
108
+ $field['disabled'] = true;
109
+ }
110
+ }
111
+ }
112
 
113
+ // field with more
114
+ // -------------------------------------------------------------------
115
+ if (!empty($field['more_content'])) {
116
 
117
+ // hide field
118
+ // -------------------------------------------------------------
119
+ if (!empty($field['single_p'])) {
120
+ if (array_intersect($product_ids, $hide_ids_array)) {
121
+ $field['disabled'] = true;
122
+ }
123
+ }
124
 
125
+ // show field
126
+ // ---------------------------------------------------------------
127
+ if (!empty($field['single_px'])) {
128
+ if (array_intersect($product_ids, $show_ids_array)) {
129
+ $field['disabled'] = false;
130
+ } else {
131
+ //error_log('disabled 4');
132
+ $field['disabled'] = true;
133
  }
134
  }
135
  }
219
 
220
  function init() {
221
 
222
+ // Remove by product
223
+ add_filter('wooccm_checkout_field_filter', array($this, 'disable_by_product'), 10, 2);
224
 
225
+ // Remove by category
226
+ add_filter('wooccm_checkout_field_filter', array($this, 'disable_by_category'), 10, 2);
227
  // Remove fields
228
  // -----------------------------------------------------------------------
229
  add_filter('woocommerce_checkout_fields', array($this, 'remove_checkout_fields'));
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://quadlayers.com/
4
  Tags: woocommerce, woocommerce checkout, field manager, checkout editor, checkout field, shipping field, billing field, order field, additional field
5
  Requires at least: 3.0
6
  Tested up to: 5.2.3
7
- Stable tag: 4.4.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -137,6 +137,10 @@ Example:
137
 
138
  == Changelog ==
139
 
 
 
 
 
140
  = 4.4.2 =
141
  * Fix: woocommerce checkout remove field based on categories
142
 
4
  Tags: woocommerce, woocommerce checkout, field manager, checkout editor, checkout field, shipping field, billing field, order field, additional field
5
  Requires at least: 3.0
6
  Tested up to: 5.2.3
7
+ Stable tag: 4.4.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
137
 
138
  == Changelog ==
139
 
140
+ = 4.4.3 =
141
+ * Fix: woocommerce checkout hide field based on product id rebuilt
142
+ * Fix: woocommerce checkout hide field based on product category rebuilt
143
+
144
  = 4.4.2 =
145
  * Fix: woocommerce checkout remove field based on categories
146
 
woocommerce-checkout-manager.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Plugin Name: WooCommerce Checkout Manager
4
  * Description: Manages WooCommerce Checkout, the advanced way.
5
- * Version: 4.4.2
6
  * Author: QuadLayers
7
  * Author URI: https://www.quadlayers.com
8
  * Copyright: 2019 QuadLayers (https://www.quadlayers.com)
@@ -16,7 +16,7 @@ if (!defined('WOOCCM_PLUGIN_NAME')) {
16
  define('WOOCCM_PLUGIN_NAME', 'WooCommerce Checkout Manager');
17
  }
18
  if (!defined('WOOCCM_PLUGIN_VERSION')) {
19
- define('WOOCCM_PLUGIN_VERSION', '4.4.2');
20
  }
21
  if (!defined('WOOCCM_PLUGIN_FILE')) {
22
  define('WOOCCM_PLUGIN_FILE', __FILE__);
@@ -158,6 +158,8 @@ if (!class_exists('WOOCCM')) {
158
 
159
  function register_scripts() {
160
 
 
 
161
  wp_register_script('wc-admin-meta-boxes', WC()->plugin_url() . '/assets/js/admin/meta-boxes.js', array('jquery', 'jquery-ui-datepicker', 'jquery-ui-sortable', 'accounting', 'round', 'wc-enhanced-select', 'plupload-all', 'stupidtable', 'jquery-tiptip'), WC_VERSION);
162
 
163
  wp_register_script('wooccm-modal', plugins_url('assets/js/wooccm-modal.js', WOOCCM_PLUGIN_FILE), array('jquery', 'wc-admin-meta-boxes', 'backbone'), WOOCCM_PLUGIN_VERSION, true);
@@ -209,6 +211,28 @@ if (!class_exists('WOOCCM')) {
209
  wp_enqueue_script('wooccm-admin');
210
  // only for backend maybe orders
211
  wp_enqueue_script('wooccm-order-upload');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
212
  }
213
 
214
  function add_frontend_scripts() {
@@ -329,6 +353,7 @@ if (!class_exists('WOOCCM')) {
329
  add_action('wp_enqueue_scripts', array($this, 'add_frontend_scripts'));
330
  add_action('admin_enqueue_scripts', array($this, 'add_admin_scripts'));
331
  add_action('admin_notices', array($this, 'add_notices'));
 
332
  add_filter('plugin_action_links_' . plugin_basename(WOOCCM_PLUGIN_FILE), array($this, 'add_action_links'));
333
  }
334
 
2
  /**
3
  * Plugin Name: WooCommerce Checkout Manager
4
  * Description: Manages WooCommerce Checkout, the advanced way.
5
+ * Version: 4.4.3
6
  * Author: QuadLayers
7
  * Author URI: https://www.quadlayers.com
8
  * Copyright: 2019 QuadLayers (https://www.quadlayers.com)
16
  define('WOOCCM_PLUGIN_NAME', 'WooCommerce Checkout Manager');
17
  }
18
  if (!defined('WOOCCM_PLUGIN_VERSION')) {
19
+ define('WOOCCM_PLUGIN_VERSION', '4.4.3');
20
  }
21
  if (!defined('WOOCCM_PLUGIN_FILE')) {
22
  define('WOOCCM_PLUGIN_FILE', __FILE__);
158
 
159
  function register_scripts() {
160
 
161
+ wp_register_style('woocommerce_admin_marketplace_styles', WC()->plugin_url() . '/assets/css/marketplace-suggestions.css', array(), WC_VERSION);
162
+
163
  wp_register_script('wc-admin-meta-boxes', WC()->plugin_url() . '/assets/js/admin/meta-boxes.js', array('jquery', 'jquery-ui-datepicker', 'jquery-ui-sortable', 'accounting', 'round', 'wc-enhanced-select', 'plupload-all', 'stupidtable', 'jquery-tiptip'), WC_VERSION);
164
 
165
  wp_register_script('wooccm-modal', plugins_url('assets/js/wooccm-modal.js', WOOCCM_PLUGIN_FILE), array('jquery', 'wc-admin-meta-boxes', 'backbone'), WOOCCM_PLUGIN_VERSION, true);
211
  wp_enqueue_script('wooccm-admin');
212
  // only for backend maybe orders
213
  wp_enqueue_script('wooccm-order-upload');
214
+
215
+ wp_enqueue_style('woocommerce_admin_marketplace_styles');
216
+ }
217
+
218
+ function admin_head() {
219
+ ?>
220
+ <style>
221
+ body #adminmenu #toplevel_page_woocommerce a[href="<?php echo admin_url('admin.php?page=wc-settings&tab=wooccm'); ?>"]:before {
222
+ content: 'BETA';
223
+ color: #fff;
224
+ background-color: #21c2f8;
225
+ padding: 1px 7px;
226
+ font-size: 9px;
227
+ font-weight: 700;
228
+ border-radius: 10px;
229
+ position: absolute;
230
+ right: 15px;
231
+ line-height: 16px;
232
+ font-style: italic;
233
+ }
234
+ </style>
235
+ <?php
236
  }
237
 
238
  function add_frontend_scripts() {
353
  add_action('wp_enqueue_scripts', array($this, 'add_frontend_scripts'));
354
  add_action('admin_enqueue_scripts', array($this, 'add_admin_scripts'));
355
  add_action('admin_notices', array($this, 'add_notices'));
356
+ add_action('admin_head', array($this, 'admin_head'));
357
  add_filter('plugin_action_links_' . plugin_basename(WOOCCM_PLUGIN_FILE), array($this, 'add_action_links'));
358
  }
359