WooCommerce Checkout Manager - Version 4.4.8

Version Description

  • Improvement: backward compatibility with new panel
Download this release

Release Info

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

Code changes from version 4.4.6 to 4.4.8

Files changed (37) hide show
  1. assets/css/wooccm-admin.css +18 -0
  2. assets/css/wooccm-admin.css.map +1 -0
  3. assets/js/wooccm-admin.js +142 -40
  4. assets/js/wooccm-admin.min.js +1 -1
  5. assets/js/wooccm-checkout.js +62 -2
  6. assets/js/wooccm-checkout.min.js +1 -1
  7. assets/js/wooccm-modal.js +8 -0
  8. assets/js/wooccm-modal.min.js +1 -1
  9. assets/less/wooccm-admin.less +22 -0
  10. changelog.txt +25 -0
  11. includes/classes/field_filters.php +0 -966
  12. includes/templates/admin/woocheckout-additional-tbody.php +74 -74
  13. includes/templates/admin/woocheckout-additional-thead.php +2 -2
  14. includes/templates/admin/woocheckout-additional.php +39 -46
  15. includes/templates/admin/woocheckout-billing-tbody.php +72 -72
  16. includes/templates/admin/woocheckout-billing-thead.php +2 -2
  17. includes/templates/admin/woocheckout-billing.php +8 -26
  18. includes/templates/admin/woocheckout-shipping-tbody.php +72 -72
  19. includes/templates/admin/woocheckout-shipping-thead.php +2 -2
  20. includes/templates/admin/woocheckout-shipping.php +75 -81
  21. includes/templates/functions/billing_functions.php +1 -1
  22. new/admin.php +0 -273
  23. new/admin/meta-boxes/html-order-uploads.php +0 -61
  24. new/admin/pages/additional.php +0 -8
  25. new/admin/pages/advanced.php +0 -29
  26. new/admin/pages/billing.php +0 -646
  27. new/admin/pages/general.php +0 -133
  28. new/admin/pages/orders.php +0 -8
  29. new/admin/pages/shipping.php +0 -8
  30. new/checkout.php +0 -8
  31. new/fields_conditional.php +12 -14
  32. new/fields_filters.php +64 -75
  33. new/fields_handler.php +8 -4
  34. new/fields_init.php +311 -0
  35. new/fields_register.php +21 -15
  36. readme.txt +7 -1
  37. woocommerce-checkout-manager.php +9 -8
assets/css/wooccm-admin.css ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .woocommerce_options_panel .select2-container {
2
+ width: 80%!important;
3
+ line-height: 16px;
4
+ }
5
+ .woocommerce_options_panel .select2-container .select2-selection--multiple {
6
+ line-height: 16px;
7
+ min-height: 30px;
8
+ box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.07);
9
+ }
10
+ .woocommerce_options_panel .select2-container--default .select2-selection--multiple .select2-selection__rendered li {
11
+ margin: 3px 3px 0 0;
12
+ }
13
+ .woocommerce_options_panel .select2-container--default.select2-container--focus .select2-selection--multiple {
14
+ border-color: #5b9dd9!important;
15
+ box-shadow: 0 0 2px rgba(30, 140, 190, 0.8) !important;
16
+ outline: 2px solid transparent!important;
17
+ }
18
+ /*# sourceMappingURL=wooccm-admin.css.map */
assets/css/wooccm-admin.css.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"sources":["../less/wooccm-admin.less"],"names":[],"mappings":"AAAA,0BACE;EACE,oBAAA;EACA,iBAAA;;AAHJ,0BACE,mBAKE;EACE,iBAAA;EACA,gBAAA;EACA,+CAAA;;AATN,0BAaE,4BAA4B,6BAA6B,6BAA6B;EACpF,mBAAA;;AAdJ,0BAgBE,4BAA2B,yBAA0B;EACnD,+BAAA;EACA,2CAAA;EACA,wCAAA","file":"wooccm-admin.css"}
assets/js/wooccm-admin.js CHANGED
@@ -22,46 +22,148 @@
22
  return o;
23
  };
24
 
25
- /* Toggle gateway on/off.
26
- $('#wooccm_billing_settings_add').on('click', function () {
27
-
28
- var $button = $(this),
29
- $table = $('table#wooccm_billing_fields'),
30
- $tr = $table.find('tbody > tr'),
31
- $new = $tr.last().clone();
32
-
33
- // $table.find('tbody').append($new);
34
-
35
- var data = {
36
- action: 'wooccm_add_field',
37
- nonce: wooccm.nonce,
38
- //field_id: $tr.data('field_id')
39
- };
40
-
41
- $.ajax({
42
- url: woocommerce_admin.ajax_url,
43
- data: data,
44
- dataType: 'json',
45
- type: 'POST',
46
- success: function (response) {
47
-
48
- if (true === response.data) {
49
- //$toggle.removeClass('woocommerce-input-toggle--enabled, woocommerce-input-toggle--disabled');
50
- //$toggle.addClass('woocommerce-input-toggle--enabled');
51
- //$toggle.removeClass('woocommerce-input-toggle--loading');
52
- } else if (true !== response.data) {
53
- //$toggle.removeClass('woocommerce-input-toggle--enabled, woocommerce-input-toggle--disabled');
54
- //$toggle.addClass('woocommerce-input-toggle--disabled');
55
- //$toggle.removeClass('woocommerce-input-toggle--loading');
56
- } //else if ('needs_setup' === response.data) {
57
- //window.location.href = $link.attr('href');
58
- //}
59
- }
60
- });
61
- return false;
62
- });*/
63
-
64
- $('#wooccm_billing_fields').on('click', '.wooccm-field-toggle-enabled', function () {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
65
 
66
  var $link = $(this),
67
  $tr = $link.closest('tr'),
22
  return o;
23
  };
24
 
25
+ function getEnhancedSelectFormatString() {
26
+ return {
27
+ 'language': {
28
+ errorLoading: function () {
29
+ // Workaround for https://github.com/select2/select2/issues/4355 instead of i18n_ajax_error.
30
+ return wc_enhanced_select_params.i18n_searching;
31
+ },
32
+ inputTooLong: function (args) {
33
+ var overChars = args.input.length - args.maximum;
34
+
35
+ if (1 === overChars) {
36
+ return wc_enhanced_select_params.i18n_input_too_long_1;
37
+ }
38
+
39
+ return wc_enhanced_select_params.i18n_input_too_long_n.replace('%qty%', overChars);
40
+ },
41
+ inputTooShort: function (args) {
42
+ var remainingChars = args.minimum - args.input.length;
43
+
44
+ if (1 === remainingChars) {
45
+ return wc_enhanced_select_params.i18n_input_too_short_1;
46
+ }
47
+
48
+ return wc_enhanced_select_params.i18n_input_too_short_n.replace('%qty%', remainingChars);
49
+ },
50
+ loadingMore: function () {
51
+ return wc_enhanced_select_params.i18n_load_more;
52
+ },
53
+ maximumSelected: function (args) {
54
+ if (args.maximum === 1) {
55
+ return wc_enhanced_select_params.i18n_selection_too_long_1;
56
+ }
57
+
58
+ return wc_enhanced_select_params.i18n_selection_too_long_n.replace('%qty%', args.maximum);
59
+ },
60
+ noResults: function () {
61
+ return wc_enhanced_select_params.i18n_no_matches;
62
+ },
63
+ searching: function () {
64
+ return wc_enhanced_select_params.i18n_searching;
65
+ }
66
+ }
67
+ };
68
+ }
69
+
70
+ $(document).on('wooccm-enhanced-select', function (e) {
71
+
72
+ $('.wooccm-enhanced-select').filter(':not(.enhanced)').each(function () {
73
+ var select2_args = $.extend({
74
+ minimumResultsForSearch: 10,
75
+ allowClear: $(this).data('allow_clear') ? true : false,
76
+ placeholder: $(this).data('placeholder')
77
+ }, getEnhancedSelectFormatString());
78
+
79
+ $(this).selectWoo(select2_args).addClass('enhanced');
80
+ });
81
+
82
+ $('.wooccm-product-search').filter(':not(.enhanced)').each(function () {
83
+
84
+ var select2_args = {
85
+ allowClear: $(this).data('allow_clear') ? true : false,
86
+ placeholder: $(this).data('placeholder'),
87
+ minimumInputLength: $(this).data('minimum_input_length') ? $(this).data('minimum_input_length') : '3',
88
+ escapeMarkup: function (m) {
89
+ return m;
90
+ },
91
+ ajax: {
92
+ url: wc_enhanced_select_params.ajax_url,
93
+ dataType: 'json',
94
+ delay: 250,
95
+ data: function (params) {
96
+ return {
97
+ term: params.term,
98
+ action: $(this).data('action') || 'wooccm_select_search_products',
99
+ security: wc_enhanced_select_params.search_products_nonce,
100
+ selected: $(this).select2('val') || 0,
101
+ exclude: $(this).data('exclude'),
102
+ include: $(this).data('include'),
103
+ limit: $(this).data('limit'),
104
+ display_stock: $(this).data('display_stock')
105
+ };
106
+ },
107
+ processResults: function (data) {
108
+ var terms = [];
109
+ if (data) {
110
+ $.each(data, function (id, text) {
111
+ terms.push({id: id, text: text});
112
+ });
113
+ }
114
+ return {
115
+ results: terms
116
+ };
117
+ },
118
+ cache: true
119
+ }
120
+ };
121
+
122
+ select2_args = $.extend(select2_args, getEnhancedSelectFormatString());
123
+
124
+ $(this).selectWoo(select2_args).addClass('enhanced');
125
+
126
+ if ($(this).data('sortable')) {
127
+ var $select = $(this);
128
+ var $list = $(this).next('.select2-container').find('ul.select2-selection__rendered');
129
+
130
+ $list.sortable({
131
+ placeholder: 'ui-state-highlight select2-selection__choice',
132
+ forcePlaceholderSize: true,
133
+ items: 'li:not(.select2-search__field)',
134
+ tolerance: 'pointer',
135
+ stop: function () {
136
+ $($list.find('.select2-selection__choice').get().reverse()).each(function () {
137
+ var id = $(this).data('data').id;
138
+ var option = $select.find('option[value="' + id + '"]')[0];
139
+ $select.prepend(option);
140
+ });
141
+ }
142
+ });
143
+ // Keep multiselects ordered alphabetically if they are not sortable.
144
+ } else if ($(this).prop('multiple')) {
145
+ $(this).on('change', function () {
146
+ var $children = $(this).children();
147
+ $children.sort(function (a, b) {
148
+ var atext = a.text.toLowerCase();
149
+ var btext = b.text.toLowerCase();
150
+
151
+ if (atext > btext) {
152
+ return 1;
153
+ }
154
+ if (atext < btext) {
155
+ return -1;
156
+ }
157
+ return 0;
158
+ });
159
+ $(this).html($children);
160
+ });
161
+ }
162
+ });
163
+
164
+ });
165
+
166
+ $(document).on('click', '.wooccm-field-toggle-enabled', function () {
167
 
168
  var $link = $(this),
169
  $tr = $link.closest('tr'),
assets/js/wooccm-admin.min.js CHANGED
@@ -1 +1 @@
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);
1
+ (function(b){b.fn.serializeArrayAll=function(){var e={};var d=this.serializeArray();b.each(d,function(){if(e[this.name]!==undefined){if(!e[this.name].push){e[this.name]=[e[this.name]]}e[this.name].push(this.value||"")}else{e[this.name]=this.value||""}});var c=b("input[type=radio],input[type=checkbox]",this);b.each(c,function(){if(!e.hasOwnProperty(this.name)){e[this.name]=""}});return e};function a(){return{language:{errorLoading:function(){return wc_enhanced_select_params.i18n_searching},inputTooLong:function(c){var d=c.input.length-c.maximum;if(1===d){return wc_enhanced_select_params.i18n_input_too_long_1}return wc_enhanced_select_params.i18n_input_too_long_n.replace("%qty%",d)},inputTooShort:function(c){var d=c.minimum-c.input.length;if(1===d){return wc_enhanced_select_params.i18n_input_too_short_1}return wc_enhanced_select_params.i18n_input_too_short_n.replace("%qty%",d)},loadingMore:function(){return wc_enhanced_select_params.i18n_load_more},maximumSelected:function(c){if(c.maximum===1){return wc_enhanced_select_params.i18n_selection_too_long_1}return wc_enhanced_select_params.i18n_selection_too_long_n.replace("%qty%",c.maximum)},noResults:function(){return wc_enhanced_select_params.i18n_no_matches},searching:function(){return wc_enhanced_select_params.i18n_searching}}}}b(document).on("wooccm-enhanced-select",function(c){b(".wooccm-enhanced-select").filter(":not(.enhanced)").each(function(){var d=b.extend({minimumResultsForSearch:10,allowClear:b(this).data("allow_clear")?true:false,placeholder:b(this).data("placeholder")},a());b(this).selectWoo(d).addClass("enhanced")});b(".wooccm-product-search").filter(":not(.enhanced)").each(function(){var f={allowClear:b(this).data("allow_clear")?true:false,placeholder:b(this).data("placeholder"),minimumInputLength:b(this).data("minimum_input_length")?b(this).data("minimum_input_length"):"3",escapeMarkup:function(g){return g},ajax:{url:wc_enhanced_select_params.ajax_url,dataType:"json",delay:250,data:function(g){return{term:g.term,action:b(this).data("action")||"wooccm_select_search_products",security:wc_enhanced_select_params.search_products_nonce,selected:b(this).select2("val")||0,exclude:b(this).data("exclude"),include:b(this).data("include"),limit:b(this).data("limit"),display_stock:b(this).data("display_stock")}},processResults:function(h){var g=[];if(h){b.each(h,function(j,i){g.push({id:j,text:i})})}return{results:g}},cache:true}};f=b.extend(f,a());b(this).selectWoo(f).addClass("enhanced");if(b(this).data("sortable")){var e=b(this);var d=b(this).next(".select2-container").find("ul.select2-selection__rendered");d.sortable({placeholder:"ui-state-highlight select2-selection__choice",forcePlaceholderSize:true,items:"li:not(.select2-search__field)",tolerance:"pointer",stop:function(){b(d.find(".select2-selection__choice").get().reverse()).each(function(){var h=b(this).data("data").id;var g=e.find('option[value="'+h+'"]')[0];e.prepend(g)})}})}else{if(b(this).prop("multiple")){b(this).on("change",function(){var g=b(this).children();g.sort(function(i,h){var k=i.text.toLowerCase();var j=h.text.toLowerCase();if(k>j){return 1}if(k<j){return -1}return 0});b(this).html(g)})}}})});b(document).on("click",".wooccm-field-toggle-enabled",function(){var c=b(this),e=c.closest("tr"),d=c.find(".woocommerce-input-toggle");b.ajax({url:woocommerce_admin.ajax_url,data:{action:"wooccm_toggle_field_enabled",nonce:wooccm.nonce,field_id:e.data("field_id")},dataType:"json",type:"POST",beforeSend:function(f){d.addClass("woocommerce-input-toggle--loading")},success:function(f){if(true===f.data){d.removeClass("woocommerce-input-toggle--enabled, woocommerce-input-toggle--disabled");d.addClass("woocommerce-input-toggle--enabled");d.removeClass("woocommerce-input-toggle--loading")}else{if(true!==f.data){d.removeClass("woocommerce-input-toggle--enabled, woocommerce-input-toggle--disabled");d.addClass("woocommerce-input-toggle--disabled");d.removeClass("woocommerce-input-toggle--loading")}}}});return false})})(jQuery);
assets/js/wooccm-checkout.js CHANGED
@@ -142,7 +142,7 @@
142
  e.preventDefault();
143
  var $form = $('form.checkout'),
144
  $place_order = $(this),
145
- $results = $('#wooccm_checkout_attachment_results'),
146
  $fields = $('.wooccmupload-field'),
147
  fields = $fields.length;
148
  $fields.each(function (i, field) {
@@ -196,7 +196,7 @@
196
  //$place_order.html(wooccm.uploading);
197
  },
198
  success: function (response) {
199
- $results.removeClass('woocommerce-message');
200
  if (response.success) {
201
  //console.log(response.data);
202
  $attachment_ids.val(response.data);
@@ -235,6 +235,66 @@
235
  $(document).on('change', '.wooccm-add-checkout-fees', function (e) {
236
  $('body').trigger('update_checkout');
237
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
238
  // Color fields
239
  // ---------------------------------------------------------------------------
240
 
142
  e.preventDefault();
143
  var $form = $('form.checkout'),
144
  $place_order = $(this),
145
+ //$results = $('#wooccm_checkout_attachment_results'),
146
  $fields = $('.wooccmupload-field'),
147
  fields = $fields.length;
148
  $fields.each(function (i, field) {
196
  //$place_order.html(wooccm.uploading);
197
  },
198
  success: function (response) {
199
+ //$results.removeClass('woocommerce-message');
200
  if (response.success) {
201
  //console.log(response.data);
202
  $attachment_ids.val(response.data);
235
  $(document).on('change', '.wooccm-add-checkout-fees', function (e) {
236
  $('body').trigger('update_checkout');
237
  });
238
+
239
+ // Conditional
240
+ // ---------------------------------------------------------------------------
241
+
242
+ $('.wooccm-conditional-child').each(function (i, field) {
243
+
244
+ var $field = $(field),
245
+ $parent = $('.wooccm-field-' + $field.find('[data-conditional-parent]').data('conditional-parent')),
246
+ show_if_value = $field.find('[data-conditional-parent-value]').data('conditional-parent-value');
247
+
248
+ if ($parent.length) {
249
+
250
+ $parent.on('change keyup', function (e) {
251
+
252
+ var $this = $(e.target),
253
+ value = $this.val();
254
+
255
+ if ($this.prop('type') == 'checkbox') {
256
+ value = $this.is(':checked');
257
+ }
258
+
259
+ if (show_if_value == value || ($.isArray(value) && value.indexOf(show_if_value) > -1)) {
260
+ $field.fadeIn();
261
+ } else {
262
+ $field.fadeOut();
263
+ }
264
+
265
+ });
266
+
267
+ $parent.find('select').trigger('change');
268
+ $parent.find('textarea').trigger('keyup');
269
+ $parent.find('input[type=button]').trigger('click');
270
+ $parent.find('input[type=radio]:checked').trigger('keyup');
271
+ $parent.find('input[type=checkbox]:checked').trigger('keyup');
272
+ $parent.find('input[type=color]').trigger('keyup');
273
+ $parent.find('input[type=date]').trigger('keyup');
274
+ $parent.find('input[type=datetime-local]').trigger('keyup');
275
+ $parent.find('input[type=email]').trigger('keyup');
276
+ $parent.find('input[type=file]').trigger('keyup');
277
+ $parent.find('input[type=hidden]').trigger('keyup');
278
+ $parent.find('input[type=image]').trigger('keyup');
279
+ $parent.find('input[type=month]').trigger('keyup');
280
+ $parent.find('input[type=number]').trigger('keyup');
281
+ $parent.find('input[type=password]').trigger('keyup');
282
+ $parent.find('input[type=range]').trigger('keyup');
283
+ $parent.find('input[type=reset]').trigger('keyup');
284
+ $parent.find('input[type=search]').trigger('keyup');
285
+ $parent.find('input[type=submit]').trigger('keyup');
286
+ $parent.find('input[type=tel]').trigger('keyup');
287
+ $parent.find('input[type=text]').trigger('keyup');
288
+ $parent.find('input[type=time]').trigger('keyup');
289
+ $parent.find('input[type=url]').trigger('keyup');
290
+ $parent.find('input[type=week]').trigger('keyup');
291
+
292
+ } else {
293
+ $field.show();
294
+ }
295
+
296
+ });
297
+
298
  // Color fields
299
  // ---------------------------------------------------------------------------
300
 
assets/js/wooccm-checkout.min.js CHANGED
@@ -1 +1 @@
1
- (function(d){var e=function(g){return g.is(".processing")||g.parents(".processing").length};var f=function(g){if(!e(g)){g.addClass("processing").block({message:null,overlayCSS:{background:"#fff",opacity:0.6}})}};var a=function(g){g.removeClass("processing").unblock()};var c=function(m,k,l,g,j){var n=d(m),o;if(j.match("image.*")){o="image"}else{if(j.match("application/ms.*")){l=wooccm.icons.spreadsheet;o="spreadsheet"}else{if(j.match("application/x.*")){l=wooccm.icons.archive;o="application"}else{if(j.match("audio.*")){l=wooccm.icons.audio;o="audio"}else{if(j.match("text.*")){l=wooccm.icons.text;o="text"}else{if(j.match("video.*")){l=wooccm.icons.video;o="video"}else{l=wooccm.icons.interactive;o="interactive"}}}}}}var h='<span data-file_id="'+k+'" title="'+g+'" class="wooccmupload_file">\n <span class="wooccmupload_file_container">\n <a title="'+g+'" class="wooccmupload_file_delete" class="wooccm_dele wooccm-btn wooccm-btn-danger">×</a>\n <span class="wooccmupload_file_image_container">\n <img class="'+o+'" alt="'+g+'" src="'+l+'"/>\n </span>\n </span>\n </span>';n.append(h).fadeIn()};var b=[];d(".wooccmupload-field").each(function(h,l){var j=d(l),k=j.find("[type=file]"),g=j.find(".wooccmupload_button"),m=j.find(".wooccmupload_list");b[j.attr("id")]=[];g.on("click",function(i){i.preventDefault();k.trigger("click")});m.on("click",".wooccmupload_file_delete",function(i){d(this).closest(".wooccmupload_file").remove()});k.on("change",function(n){var i=d(this)[0].files;if(i.length){if(window.FileReader){d.each(i,function(p,o){var q=m.find("span[data-file_id]").length+p;if(q>=wooccm.limit.max_files){alert("Exeeds max files limit of "+wooccm.limit.max_files);return false}if(o.size>wooccm.limit.max_file_size){alert("Exeeds max file size of "+wooccm.limit.max_file_size);return true}reader=new FileReader();reader.onload=(function(r){return function(s){setTimeout(function(){c(m,b[j.attr("id")].push(o)-1,s.target.result,r.name,r.type)},200)}})(o);console.log(o.name);reader.readAsDataURL(o)})}}})});d("#order_review").on("ajaxSuccess",function(k){var j=d(k.target),i=j.find("#place_order"),h=d(".wooccmupload-field"),g=h.length;if(g){i.addClass("wooccm-upload-process")}});d(document).on("click","#place_order.wooccm-upload-process",function(l){l.preventDefault();var i=d("form.checkout"),k=d(this),h=d("#wooccm_checkout_attachment_results"),j=d(".wooccmupload-field"),g=j.length;j.each(function(m,p){var n=d(p),r=n.find(".wooccmupload_field"),q=n.find(".wooccmupload_list");if(window.FormData&&b[n.attr("id")].length){if(!e(i)){k.html(wooccm.uploading);f(i)}var o=new FormData();q.find("span[data-file_id]").each(function(t,s){var u=d(s).data("file_id");if(t>wooccm.limit.max_files){console.log("Exeeds max files limit of "+wooccm.limit.max_files);return false}if(b[n.attr("id")][u]===undefined){console.log("Undefined "+u);return true}if(b[n.attr("id")][u].size>wooccm.limit.max_file_size){console.log("Exeeds max file size of "+wooccm.limit.max_files);return true}console.log("We're ready to upload "+b[n.attr("id")][u].name);o.append("wooccm_checkout_attachment_upload[]",b[n.attr("id")][u])});o.append("action","wooccm_checkout_attachment_upload");o.append("nonce",wooccm.nonce);d.ajax({async:false,url:wooccm.ajaxurl,type:"POST",cache:false,data:o,processData:false,contentType:false,beforeSend:function(s){},success:function(s){h.removeClass("woocommerce-message");if(s.success){r.val(s.data)}else{d("body").trigger("update_checkout")}},complete:function(s){g=g-1}})}else{g=g-1}if(g==0){a(i);k.removeClass("wooccm-upload-process").trigger("click")}})});d(document).on("change",".wooccm-add-checkout-fees",function(g){d("body").trigger("update_checkout")});d(".wooccm-colorpicker-farbtastic").each(function(g,j){var h=d(j),l=h.find("input[type=text]"),k=h.find(".wooccmcolorpicker_container");l.hide();if(d.isFunction(d.fn.farbtastic)){k.farbtastic("#"+l.attr("id"));k.on("click",function(i){l.fadeIn()})}});d(".wooccm-colorpicker-iris").each(function(g,j){var h=d(j),l=h.find("input[type=text]"),k=h.find(".wooccmcolorpicker_container");l.css("color","#fff").css("background",l.val()).hide();l.iris({wccmclass:l.attr("id"),palettes:true,color:"",hide:false,change:function(i,m){l.css("color","#000").css("background",m.color.toString()).fadeIn()}})})})(jQuery);
1
+ (function(d){var e=function(g){return g.is(".processing")||g.parents(".processing").length};var f=function(g){if(!e(g)){g.addClass("processing").block({message:null,overlayCSS:{background:"#fff",opacity:0.6}})}};var a=function(g){g.removeClass("processing").unblock()};var c=function(m,k,l,g,j){var n=d(m),o;if(j.match("image.*")){o="image"}else{if(j.match("application/ms.*")){l=wooccm.icons.spreadsheet;o="spreadsheet"}else{if(j.match("application/x.*")){l=wooccm.icons.archive;o="application"}else{if(j.match("audio.*")){l=wooccm.icons.audio;o="audio"}else{if(j.match("text.*")){l=wooccm.icons.text;o="text"}else{if(j.match("video.*")){l=wooccm.icons.video;o="video"}else{l=wooccm.icons.interactive;o="interactive"}}}}}}var h='<span data-file_id="'+k+'" title="'+g+'" class="wooccmupload_file">\n <span class="wooccmupload_file_container">\n <a title="'+g+'" class="wooccmupload_file_delete" class="wooccm_dele wooccm-btn wooccm-btn-danger">×</a>\n <span class="wooccmupload_file_image_container">\n <img class="'+o+'" alt="'+g+'" src="'+l+'"/>\n </span>\n </span>\n </span>';n.append(h).fadeIn()};var b=[];d(".wooccmupload-field").each(function(h,l){var j=d(l),k=j.find("[type=file]"),g=j.find(".wooccmupload_button"),m=j.find(".wooccmupload_list");b[j.attr("id")]=[];g.on("click",function(i){i.preventDefault();k.trigger("click")});m.on("click",".wooccmupload_file_delete",function(i){d(this).closest(".wooccmupload_file").remove()});k.on("change",function(n){var i=d(this)[0].files;if(i.length){if(window.FileReader){d.each(i,function(p,o){var q=m.find("span[data-file_id]").length+p;if(q>=wooccm.limit.max_files){alert("Exeeds max files limit of "+wooccm.limit.max_files);return false}if(o.size>wooccm.limit.max_file_size){alert("Exeeds max file size of "+wooccm.limit.max_file_size);return true}reader=new FileReader();reader.onload=(function(r){return function(s){setTimeout(function(){c(m,b[j.attr("id")].push(o)-1,s.target.result,r.name,r.type)},200)}})(o);console.log(o.name);reader.readAsDataURL(o)})}}})});d("#order_review").on("ajaxSuccess",function(k){var j=d(k.target),i=j.find("#place_order"),h=d(".wooccmupload-field"),g=h.length;if(g){i.addClass("wooccm-upload-process")}});d(document).on("click","#place_order.wooccm-upload-process",function(k){k.preventDefault();var h=d("form.checkout"),j=d(this),i=d(".wooccmupload-field"),g=i.length;i.each(function(l,o){var m=d(o),q=m.find(".wooccmupload_field"),p=m.find(".wooccmupload_list");if(window.FormData&&b[m.attr("id")].length){if(!e(h)){j.html(wooccm.uploading);f(h)}var n=new FormData();p.find("span[data-file_id]").each(function(s,r){var t=d(r).data("file_id");if(s>wooccm.limit.max_files){console.log("Exeeds max files limit of "+wooccm.limit.max_files);return false}if(b[m.attr("id")][t]===undefined){console.log("Undefined "+t);return true}if(b[m.attr("id")][t].size>wooccm.limit.max_file_size){console.log("Exeeds max file size of "+wooccm.limit.max_files);return true}console.log("We're ready to upload "+b[m.attr("id")][t].name);n.append("wooccm_checkout_attachment_upload[]",b[m.attr("id")][t])});n.append("action","wooccm_checkout_attachment_upload");n.append("nonce",wooccm.nonce);d.ajax({async:false,url:wooccm.ajaxurl,type:"POST",cache:false,data:n,processData:false,contentType:false,beforeSend:function(r){},success:function(r){if(r.success){q.val(r.data)}else{d("body").trigger("update_checkout")}},complete:function(r){g=g-1}})}else{g=g-1}if(g==0){a(h);j.removeClass("wooccm-upload-process").trigger("click")}})});d(document).on("change",".wooccm-add-checkout-fees",function(g){d("body").trigger("update_checkout")});d(".wooccm-conditional-child").each(function(g,l){var h=d(l),k=d(".wooccm-field-"+h.find("[data-conditional-parent]").data("conditional-parent")),j=h.find("[data-conditional-parent-value]").data("conditional-parent-value");if(k.length){k.on("change keyup",function(n){var m=d(n.target),i=m.val();if(m.prop("type")=="checkbox"){i=m.is(":checked")}if(j==i||(d.isArray(i)&&i.indexOf(j)>-1)){h.fadeIn()}else{h.fadeOut()}});k.find("select").trigger("change");k.find("textarea").trigger("keyup");k.find("input[type=button]").trigger("click");k.find("input[type=radio]:checked").trigger("keyup");k.find("input[type=checkbox]:checked").trigger("keyup");k.find("input[type=color]").trigger("keyup");k.find("input[type=date]").trigger("keyup");k.find("input[type=datetime-local]").trigger("keyup");k.find("input[type=email]").trigger("keyup");k.find("input[type=file]").trigger("keyup");k.find("input[type=hidden]").trigger("keyup");k.find("input[type=image]").trigger("keyup");k.find("input[type=month]").trigger("keyup");k.find("input[type=number]").trigger("keyup");k.find("input[type=password]").trigger("keyup");k.find("input[type=range]").trigger("keyup");k.find("input[type=reset]").trigger("keyup");k.find("input[type=search]").trigger("keyup");k.find("input[type=submit]").trigger("keyup");k.find("input[type=tel]").trigger("keyup");k.find("input[type=text]").trigger("keyup");k.find("input[type=time]").trigger("keyup");k.find("input[type=url]").trigger("keyup");k.find("input[type=week]").trigger("keyup")}else{h.show()}});d(".wooccm-colorpicker-farbtastic").each(function(g,j){var h=d(j),l=h.find("input[type=text]"),k=h.find(".wooccmcolorpicker_container");l.hide();if(d.isFunction(d.fn.farbtastic)){k.farbtastic("#"+l.attr("id"));k.on("click",function(i){l.fadeIn()})}});d(".wooccm-colorpicker-iris").each(function(g,j){var h=d(j),l=h.find("input[type=text]"),k=h.find(".wooccmcolorpicker_container");l.css("color","#fff").css("background",l.val()).hide();l.iris({wccmclass:l.attr("id"),palettes:true,color:"",hide:false,change:function(i,m){l.css("color","#000").css("background",m.color.toString()).fadeIn()}})})})(jQuery);
assets/js/wooccm-modal.js CHANGED
@@ -17,6 +17,7 @@
17
  var unblock = function ($node) {
18
  $node.removeClass('processing').unblock();
19
  };
 
20
  var wpmi = {
21
  __instance: undefined
22
  };
@@ -64,15 +65,22 @@
64
  alert('Error!');
65
  },
66
  success: function (response) {
 
67
  $modal.$el.attr('tabindex', '0');
68
  $modal.$el.html($modal.templates.window(response.data));
69
  //$(document).on('focusin', $modal.preserveFocus);
70
  $modal.$el.focus().trigger('wc-init-tabbed-panels');
 
 
 
71
  }
72
  });
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);
17
  var unblock = function ($node) {
18
  $node.removeClass('processing').unblock();
19
  };
20
+
21
  var wpmi = {
22
  __instance: undefined
23
  };
65
  alert('Error!');
66
  },
67
  success: function (response) {
68
+ console.log(response);
69
  $modal.$el.attr('tabindex', '0');
70
  $modal.$el.html($modal.templates.window(response.data));
71
  //$(document).on('focusin', $modal.preserveFocus);
72
  $modal.$el.focus().trigger('wc-init-tabbed-panels');
73
+ $modal.$el.focus().trigger('init_tooltips');
74
+ ///$modal.$el.focus().trigger('wc-enhanced-select-init');
75
+ $modal.$el.focus().trigger('wooccm-enhanced-select');
76
  }
77
  });
78
  },
79
  update: function (e) {
80
  'use strict';
81
+
82
+ e.preventDefault();
83
+
84
  var $button = $(e.target),
85
  field_id = $button.data('field_id');
86
  this.render(field_id);
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-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);
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){console.log(h);f.$el.attr("tabindex","0");f.$el.html(f.templates.window(h.data));f.$el.focus().trigger("wc-init-tabbed-panels");f.$el.focus().trigger("init_tooltips");f.$el.focus().trigger("wooccm-enhanced-select")}})},update:function(h){h.preventDefault();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);
assets/less/wooccm-admin.less ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .woocommerce_options_panel {
2
+ .select2-container {
3
+ width: 80%!important;
4
+ line-height: 16px;
5
+ //box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.07);
6
+
7
+ .select2-selection--multiple {
8
+ line-height: 16px;
9
+ min-height: 30px;
10
+ box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.07);
11
+ }
12
+ }
13
+
14
+ .select2-container--default .select2-selection--multiple .select2-selection__rendered li {
15
+ margin: 3px 3px 0 0;
16
+ }
17
+ .select2-container--default.select2-container--focus .select2-selection--multiple {
18
+ border-color: #5b9dd9!important;
19
+ box-shadow: 0 0 2px rgba(30, 140, 190, 0.8)!important;
20
+ outline: 2px solid transparent!important;
21
+ }
22
+ }
changelog.txt ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Fifteen ( 15 ) fields types included: Text Input, Text Area, Password, Radio Button, Check Box, Select Options, Date Picker, Time Picker, Color Picker, Heading, Multi-Select, Multi-Checkbox, Country, State, File Picker.
2
+
3
+ Compatible with WPML, WooCommerce Print Invoice & Delivery Note, Store Exporter Deluxe, WooCommerce Order/Customer CSV Export.
4
+
5
+ Sort Orders by Field Name.
6
+ Export Orders by Field Name.
7
+
8
+ Create fields to remove tax
9
+ Create fields to add additional amount
10
+ Display Payment Method and Shipping Method used by customer.
11
+ Disable any added field from Checkout details page and Order Receipt.
12
+
13
+ DatePicker: Change the default format (dd-mm-yy), Set Minimum Date and Maximum Date, Disable days in the week (Sun – Sat).
14
+ TimePicker: Includes restriction of both start and end hours, set the minutes interval and manually input labels.
15
+ Display Order Time.
16
+
17
+ Re-position the added fields: Before Shipping Form, After Shipping Form, Before Billing Form, After Billing Form or After Order Notes
18
+
19
+ = 4.4.0 Beta =
20
+ * Improvement: woocommerce order upload rebuilt
21
+ * Improvement: woocommerce checkout upload rebuilt
22
+ * Improvement: woocommerce order admin upload rebuilt
23
+ * Improvement: woocommerce register fields rebuilt
24
+ * Improvement: woocommerce register fields rebuilt
25
+ * Fix: woocommerce checkout additional fields required
includes/classes/field_filters.php DELETED
@@ -1,966 +0,0 @@
1
- <?php
2
- /**
3
- * WooCommerce Checkout Manager
4
- */
5
-
6
- // Exit if accessed directly
7
- if ( !defined( 'ABSPATH' ) ) exit;
8
-
9
- // WooCommerce Checkout field - Text Input
10
- function wooccm_checkout_field_text_handler( $field = '', $key, $args, $value ) {
11
-
12
- global $current_user;
13
-
14
- $user_roles = $current_user->roles;
15
- $user_role = array_shift($user_roles);
16
-
17
- if( !empty($args['user_role']) && (!empty($args['role_options']) || !empty($args['role_options2'])) ) {
18
- $rolekeys = explode('||',$args['role_options']);
19
- $rolekeys2 = explode('||',$args['role_options2']);
20
- if( !empty($args['role_options']) && !in_array($user_role, $rolekeys) ) {
21
- return;
22
- }
23
- if( !empty($args['role_options2']) && in_array($user_role, $rolekeys2) ) {
24
- return;
25
- }
26
- }
27
-
28
- if( !empty( $args['clear'] ) )
29
- $after = '<div class="clear"></div>';
30
- else
31
- $after = '';
32
-
33
- $required = false;
34
- if( $args['wooccm_required'] ) {
35
- $args['class'][] = 'validate-required';
36
- $required = '&nbsp;<abbr class="required" title="' . esc_attr__( 'required', 'woocommerce' ) . '">*</abbr>';
37
- }
38
-
39
- $args['maxlength'] = ( $args['maxlength'] ) ? 'maxlength="' . absint( $args['maxlength'] ) . '"' : '';
40
-
41
- if( is_string( $args['label_class'] ) ) {
42
- $args['label_class'] = array( $args['label_class'] );
43
- }
44
-
45
- if( is_null( $value ) ) {
46
- $value = $args['default'];
47
- }
48
-
49
- // Custom attribute handling
50
- $custom_attributes = array();
51
-
52
- if( !empty( $args['custom_attributes'] ) && is_array( $args['custom_attributes'] ) ) {
53
- foreach( $args['custom_attributes'] as $attribute => $attribute_value ) {
54
- $custom_attributes[] = esc_attr( $attribute ) . '="' . esc_attr( $attribute_value ) . '"';
55
- }
56
- }
57
-
58
- if( !empty( $args['validate'] ) ) {
59
- foreach( $args['validate'] as $validate ) {
60
- $args['class'][] = 'validate-' . $validate;
61
- }
62
- }
63
-
64
- $field = '<p class="form-row ' . esc_attr( implode( ' ', $args['class'] ) ) .'" id="' . esc_attr( $args['id'] ) . '_field">';
65
-
66
- if( $args['label'] || $required ) {
67
- $field .= '<label for="' . esc_attr( $args['id'] ) . '" class="' . esc_attr( implode( ' ', $args['label_class'] ) ) .'">' . $args['label'] . $required . '</label>';
68
- }
69
-
70
- $field .= '<input type="text" class="input-text ' . esc_attr( implode( ' ', $args['input_class'] ) ) .'" name="' . esc_attr( $key ) . '" id="' . esc_attr( $args['id'] ) . '" placeholder="' . esc_attr( $args['placeholder'] ) . '" '.$args['maxlength'].' value="' . esc_attr( $value ) . '" ' . implode( ' ', $custom_attributes ) . ' />';
71
-
72
- if( $args['description'] ) {
73
- $field .= '<span class="description">' . esc_attr( $args['description'] ) . '</span>';
74
- }
75
-
76
- $field .= '</p>' . $after;
77
-
78
- return $field;
79
-
80
- }
81
- add_filter( 'woocommerce_form_field_wooccmtext', 'wooccm_checkout_field_text_handler', 10, 4 );
82
-
83
- // WooCommerce Checkout field - Textarea
84
- function wooccm_checkout_field_textarea_handler( $field = '', $key, $args, $value ) {
85
-
86
- global $current_user;
87
-
88
- $user_roles = $current_user->roles;
89
- $user_role = array_shift($user_roles);
90
-
91
- if( !empty($args['user_role']) && (!empty($args['role_options']) || !empty($args['role_options2'])) ) {
92
- $rolekeys = explode('||',$args['role_options']);
93
- $rolekeys2 = explode('||',$args['role_options2']);
94
- if( !empty($args['role_options']) && !in_array($user_role, $rolekeys) ) {
95
- return;
96
- }
97
- if( !empty($args['role_options2']) && in_array($user_role, $rolekeys2) ) {
98
- return;
99
- }
100
- }
101
-
102
- if( !empty( $args['clear'] ) )
103
- $after = '<div class="clear"></div>';
104
- else
105
- $after = '';
106
-
107
- if( $args['wooccm_required'] ) {
108
- $args['class'][] = 'validate-required';
109
- $required = '&nbsp;<abbr class="required" title="' . esc_attr__( 'required', 'woocommerce' ) . '">*</abbr>';
110
- } else {
111
- $required = '';
112
- }
113
-
114
- $args['maxlength'] = ( $args['maxlength'] ) ? 'maxlength="' . absint( $args['maxlength'] ) . '"' : '';
115
-
116
- if( is_string( $args['label_class'] ) ) {
117
- $args['label_class'] = array( $args['label_class'] );
118
- }
119
-
120
- if( is_null( $value ) ) {
121
- $value = $args['default'];
122
- }
123
-
124
- // Custom attribute handling
125
- $custom_attributes = array();
126
-
127
- if( ! empty( $args['custom_attributes'] ) && is_array( $args['custom_attributes'] ) ) {
128
- foreach( $args['custom_attributes'] as $attribute => $attribute_value ) {
129
- $custom_attributes[] = esc_attr( $attribute ) . '="' . esc_attr( $attribute_value ) . '"';
130
- }
131
- }
132
-
133
- if( !empty( $args['validate'] ) ) {
134
- foreach( $args['validate'] as $validate ) {
135
- $args['class'][] = 'validate-' . $validate;
136
- }
137
- }
138
-
139
- $field = '<p class="form-row ' . esc_attr( implode( ' ', $args['class'] ) ) .'" id="' . esc_attr( $args['id'] ) . '_field">';
140
-
141
- if( $args['label'] ) {
142
- $field .= '<label for="' . esc_attr( $args['id'] ) . '" class="' . esc_attr( implode( ' ', $args['label_class'] ) ) .'">' . $args['label']. $required . '</label>';
143
- }
144
-
145
- // WordPress Filters to override default row and column counts
146
- $rows = apply_filters( 'wooccm_checkout_field_texarea_rows', 2, $key, $args );
147
- $columns = apply_filters( 'wooccm_checkout_field_texarea_columns', 5, $key, $args );
148
-
149
- $field .= '<textarea name="' . esc_attr( $key ) . '" class="input-text ' . esc_attr( implode( ' ', $args['input_class'] ) ) .'" id="' . esc_attr( $args['id'] ) . '" placeholder="' . esc_attr( $args['placeholder'] ) . '" ' . $args['maxlength'] . ' ' . ( empty( $args['custom_attributes']['rows'] ) ? ' rows="' . $rows . '"' : '' ) . ( empty( $args['custom_attributes']['cols'] ) ? ' cols="' . $columns . '"' : '' ) . implode( ' ', $custom_attributes ) . '>'. esc_textarea( $value ) .'</textarea>';
150
-
151
- if( $args['description'] ) {
152
- $field .= '<span class="description">' . esc_attr( $args['description'] ) . '</span>';
153
- }
154
-
155
- $field .= '</p>' . $after;
156
-
157
- return $field;
158
-
159
- }
160
- add_filter( 'woocommerce_form_field_wooccmtextarea', 'wooccm_checkout_field_textarea_handler', 10, 4 );
161
-
162
- // WooCommerce Checkout field - Password
163
- function wooccm_checkout_field_password_handler( $field = '', $key, $args, $value ) {
164
-
165
- global $current_user;
166
-
167
- $user_roles = $current_user->roles;
168
- $user_role = array_shift($user_roles);
169
-
170
- if( !empty($args['user_role']) && (!empty($args['role_options']) || !empty($args['role_options2'])) ) {
171
- $rolekeys = explode('||',$args['role_options']);
172
- $rolekeys2 = explode('||',$args['role_options2']);
173
- if( !empty($args['role_options']) && !in_array($user_role, $rolekeys) ) {
174
- return;
175
- }
176
- if( !empty($args['role_options2']) && in_array($user_role, $rolekeys2) ) {
177
- return;
178
- }
179
- }
180
-
181
- if( !empty( $args['clear'] ) )
182
- $after = '<div class="clear"></div>';
183
- else
184
- $after = '';
185
-
186
- if( $args['wooccm_required'] ) {
187
- $args['class'][] = 'validate-required';
188
- $required = '&nbsp;<abbr class="required" title="' . esc_attr__( 'required', 'woocommerce' ) . '">*</abbr>';
189
- } else {
190
- $required = '';
191
- }
192
-
193
- $args['maxlength'] = ( $args['maxlength'] ) ? 'maxlength="' . absint( $args['maxlength'] ) . '"' : '';
194
-
195
- if( is_string( $args['label_class'] ) ) {
196
- $args['label_class'] = array( $args['label_class'] );
197
- }
198
-
199
- if( is_null( $value ) ) {
200
- $value = $args['default'];
201
- }
202
-
203
- // Custom attribute handling
204
- $custom_attributes = array();
205
-
206
- if( ! empty( $args['custom_attributes'] ) && is_array( $args['custom_attributes'] ) ) {
207
- foreach( $args['custom_attributes'] as $attribute => $attribute_value ) {
208
- $custom_attributes[] = esc_attr( $attribute ) . '="' . esc_attr( $attribute_value ) . '"';
209
- }
210
- }
211
-
212
- if( !empty( $args['validate'] ) ) {
213
- foreach( $args['validate'] as $validate ) {
214
- $args['class'][] = 'validate-' . $validate;
215
- }
216
- }
217
-
218
- $field = '<p class="form-row ' . esc_attr( implode( ' ', $args['class'] ) ) .'" id="' . esc_attr( $args['id'] ) . '_field">';
219
-
220
- if( $args['label'] ) {
221
- $field .= '<label for="' . esc_attr( $args['id'] ) . '" class="' . esc_attr( implode( ' ', $args['label_class'] ) ) .'">' . $args['label']. $required . '</label>';
222
- }
223
-
224
- $field .= '<input type="password" class="input-text ' . esc_attr( implode( ' ', $args['input_class'] ) ) .'" name="' . esc_attr( $key ) . '" id="' . esc_attr( $args['id'] ) . '" placeholder="' . esc_attr( $args['placeholder'] ) . '" value="' . esc_attr( $value ) . '" ' . implode( ' ', $custom_attributes ) . ' />';
225
-
226
- if( $args['description'] ) {
227
- $field .= '<span class="description">' . esc_attr( $args['description'] ) . '</span>';
228
- }
229
-
230
- $field .= '</p>' . $after;
231
-
232
- return $field;
233
-
234
- }
235
- add_filter( 'woocommerce_form_field_wooccmpassword', 'wooccm_checkout_field_password_handler', 10, 4 );
236
-
237
- // WooCommerce Checkout field - Radio Buttons
238
- function wooccm_checkout_field_radio_handler( $field = '', $key, $args, $value ) {
239
-
240
- global $current_user;
241
-
242
- $user_roles = $current_user->roles;
243
- $user_role = array_shift($user_roles);
244
-
245
- if( !empty($args['user_role']) && (!empty($args['role_options']) || !empty($args['role_options2'])) ) {
246
- $rolekeys = explode('||',$args['role_options']);
247
- $rolekeys2 = explode('||',$args['role_options2']);
248
- if( !empty($args['role_options']) && !in_array($user_role, $rolekeys) ) {
249
- return;
250
- }
251
- if( !empty($args['role_options2']) && in_array($user_role, $rolekeys2) ) {
252
- return;
253
- }
254
- }
255
-
256
- if( !empty( $args['clear'] ) )
257
- $after = '<div class="clear"></div>';
258
- else
259
- $after = '';
260
-
261
- if( $args['wooccm_required'] ) {
262
- $args['class'][] = 'validate-required';
263
- $required = '&nbsp;<abbr class="required" title="' . esc_attr__( 'required', 'woocommerce' ) . '">*</abbr>';
264
- } else {
265
- $required = '';
266
- }
267
-
268
- $args['maxlength'] = ( $args['maxlength'] ) ? 'maxlength="' . absint( $args['maxlength'] ) . '"' : '';
269
-
270
- $field = '<div class="form-row ' . esc_attr( implode( ' ', $args['class'] ) ) .'" id="' . esc_attr( $key ) . '_field">';
271
-
272
- $field .= '<fieldset><legend>' . $args['label'] . $required . '</legend>';
273
-
274
- if( !empty( $args['options'] ) ) {
275
- foreach( explode('||',$args['options']) as $option_key => $option_text ) {
276
- $field .= '<label><input type="radio" ' . checked( $value, wooccm_wpml_string( esc_attr( $option_text ) ), false ) . ' name="' . esc_attr( $key ) . '" value="' . wooccm_wpml_string( esc_attr( $option_text ) ). '" /> ' . wooccm_wpml_string( esc_html( $option_text ) ). '</label>';
277
- }
278
- }
279
-
280
- $field .= '</fieldset></div>' . $after;
281
-
282
- return $field;
283
-
284
- }
285
- add_filter( 'woocommerce_form_field_wooccmradio', 'wooccm_checkout_field_radio_handler', 10, 4 );
286
-
287
- // WooCommerce Checkout field - Select Options
288
- function wooccm_checkout_field_select_handler( $field = '', $key, $args, $value ) {
289
-
290
- global $current_user;
291
-
292
- $user_roles = $current_user->roles;
293
- $user_role = array_shift($user_roles);
294
-
295
- if( !empty($args['user_role']) && (!empty($args['role_options']) || !empty($args['role_options2'])) ) {
296
- $rolekeys = explode('||',$args['role_options']);
297
- $rolekeys2 = explode('||',$args['role_options2']);
298
- if( !empty($args['role_options']) && !in_array($user_role, $rolekeys) ) {
299
- return;
300
- }
301
- if( !empty($args['role_options2']) && in_array($user_role, $rolekeys2) ) {
302
- return;
303
- }
304
- }
305
-
306
- if( !empty( $args['clear'] ) )
307
- $after = '<div class="clear"></div>';
308
- else
309
- $after = '';
310
-
311
- if( $args['wooccm_required'] ) {
312
- $args['class'][] = 'validate-required';
313
- $required = '&nbsp;<abbr class="required" title="' . esc_attr__( 'required', 'woocommerce' ) . '">*</abbr>';
314
- } else {
315
- $required = '';
316
- }
317
-
318
- $args['maxlength'] = ( $args['maxlength'] ) ? 'maxlength="' . absint( $args['maxlength'] ) . '"' : '';
319
-
320
- $options = '';
321
-
322
- if( !empty( $args['options'] ) ) {
323
- $options .= ( $args['default'] ? '<option value="">' . $args['default'] .'</option>' : '' );
324
- foreach( explode( '||', $args['options'] ) as $option_key => $option_text )
325
- $options .= '<option '. selected( $value, $option_key, false ) . '>' . wooccm_wpml_string( esc_attr( $option_text ) ) .'</option>';
326
- }
327
-
328
- $field = '<p class="form-row ' . esc_attr( implode( ' ', $args['class'] ) ) .'" id="' . esc_attr( $key ) . '_field">';
329
-
330
- if( $args['label'] )
331
- $field .= '<label for="' . esc_attr( $key ) . '" class="' . implode( ' ', $args['label_class'] ) .'">' . $args['label']. $required . '</label>';
332
-
333
- $field .= '
334
- <select class="' . esc_attr( $args['fancy'] ) .'" data-placeholder="' . ( !empty( $args['default'] ) ? __( $args['default'], 'woocommerce-checkout-manager' ) : '' ) . '" name="' . esc_attr( $key ) . '" id="' . esc_attr( $key ) . '" >
335
- ' . $options . '
336
- </select>
337
- </p>' . $after;
338
-
339
- return $field;
340
-
341
- }
342
- add_filter( 'woocommerce_form_field_wooccmselect', 'wooccm_checkout_field_select_handler', 10, 4 );
343
-
344
- // WooCommerce Checkout field - Check Box
345
- function wooccm_checkout_field_checkbox_handler( $field = '', $key, $args, $value ) {
346
-
347
- global $current_user;
348
-
349
- $user_roles = $current_user->roles;
350
- $user_role = array_shift($user_roles);
351
-
352
- if( !empty($args['user_role']) && (!empty($args['role_options']) || !empty($args['role_options2'])) ) {
353
- $rolekeys = explode('||',$args['role_options']);
354
- $rolekeys2 = explode('||',$args['role_options2']);
355
- if( !empty($args['role_options']) && !in_array($user_role, $rolekeys) ) {
356
- return;
357
- }
358
- if( !empty($args['role_options2']) && in_array($user_role, $rolekeys2) ) {
359
- return;
360
- }
361
- }
362
-
363
- $args['options'] = explode('||',$args['options']);
364
-
365
- if( !empty( $args['clear'] ) )
366
- $after = '<div class="clear"></div>';
367
- else
368
- $after = '';
369
-
370
- if( $args['wooccm_required'] ) {
371
- $args['class'][] = 'validate-required';
372
- $required = '&nbsp;<abbr class="required" title="' . esc_attr__( 'required', 'woocommerce' ) . '">*</abbr>';
373
- } else {
374
- $required = '';
375
- }
376
-
377
- $field = '
378
- <p class="form-row ' . implode( ' ', $args['class'] ) .'" id="' . $key . '_field">
379
- <label for="' . $key . '_checkbox" class="woocommerce-form__label woocommerce-form__label-for-checkbox ' . implode( ' ', $args['label_class'] ) .'">
380
- <input type="checkbox" id="' . $key . '_checkbox" name="' . $key . '" class="woocommerce-form__input woocommerce-form__input-checkbox input-checkbox" value="1" />
381
- <span>' . $args['label'] . '</span>' . $required . '
382
- </label>
383
- </p>' . $after;
384
-
385
- return $field;
386
-
387
- }
388
- add_filter( 'woocommerce_form_field_checkbox_wccm', 'wooccm_checkout_field_checkbox_handler', 10, 4 );
389
-
390
- // WooCommerce Checkout field - State
391
- function wooccm_checkout_field_state_handler( $field = '', $key, $args, $value ) {
392
-
393
- global $current_user;
394
-
395
- $user_roles = $current_user->roles;
396
- $user_role = array_shift($user_roles);
397
-
398
- if( !empty( $args['user_role'] ) && (!empty( $args['role_options'] ) || !empty ($args['role_options2'] )) ) {
399
- $rolekeys = explode( '||',$args['role_options'] );
400
- $rolekeys2 = explode( '||',$args['role_options2'] );
401
- if( !empty($args['role_options']) && !in_array($user_role, $rolekeys) ) {
402
- return;
403
- }
404
- if( !empty($args['role_options2']) && in_array($user_role, $rolekeys2) ) {
405
- return;
406
- }
407
- }
408
-
409
- if( !empty( $args['clear'] ) )
410
- $after = '<div class="clear"></div>';
411
- else
412
- $after = '';
413
-
414
- //$args['class'][] = 'address-field';
415
-
416
- $country_key = $key == 'billing_state' ? 'billing_country' : 'shipping_country';
417
- $current_cc = WC()->checkout->get_value( $country_key );
418
- $states = WC()->countries->get_states( $current_cc );
419
-
420
- if( $args['wooccm_required'] ) {
421
- if( !empty( $states ) ) {
422
- if( !in_array( 'validate-required', $args['class'] ) )
423
- $args['class'][] = 'validate-required';
424
- $required = '&nbsp;<abbr class="required" title="' . esc_attr__( 'required', 'woocommerce' ) . '">*</abbr>';
425
- } else {
426
- $args['class'][] = 'woocommerce-validated';
427
- }
428
- } else {
429
- $required = '';
430
- $args['class'][] = 'woocommerce-validated';
431
- }
432
-
433
- $args['maxlength'] = ( $args['maxlength'] ) ? 'maxlength="' . absint( $args['maxlength'] ) . '"' : '';
434
-
435
- if( is_string( $args['label_class'] ) ) {
436
- $args['label_class'] = array( $args['label_class'] );
437
- }
438
-
439
- if( is_null( $value ) ) {
440
- $value = $args['default'];
441
- }
442
-
443
- // Custom attribute handling
444
- $custom_attributes = array();
445
-
446
- if( !empty( $args['custom_attributes'] ) && is_array( $args['custom_attributes'] ) ) {
447
- foreach ( $args['custom_attributes'] as $attribute => $attribute_value ) {
448
- $custom_attributes[] = esc_attr( $attribute ) . '="' . esc_attr( $attribute_value ) . '"';
449
- }
450
- }
451
-
452
- if( !empty( $states ) && !empty( $args['validate'] ) ) {
453
- foreach( $args['validate'] as $validate ) {
454
- $args['class'][] = 'validate-' . $validate;
455
- }
456
- }
457
-
458
- if( is_array( $states ) && empty( $states ) ) {
459
-
460
- $field = '<p class="form-row ' . esc_attr( implode( ' ', $args['class'] ) ) .'" id="' . esc_attr( $args['id'] ) . '_field" style="display: none">';
461
-
462
- if( $args['label'] ) {
463
- $field .= '<label for="' . esc_attr( $args['id'] ) . '" class="' . esc_attr( implode( ' ', $args['label_class'] ) ) .'">' . $args['label'] . $required . '</label>';
464
- }
465
- $field .= '<input type="hidden" class="hidden" name="' . esc_attr( $key ) . '" id="' . esc_attr( $args['id'] ) . '" value="" ' . implode( ' ', $custom_attributes ) . ' placeholder="' . esc_attr( $args['placeholder'] ) . '" />';
466
-
467
- if( $args['description'] ) {
468
- $field .= '<span class="description">' . esc_attr( $args['description'] ) . '</span>';
469
- }
470
-
471
- $field .= '</p>' . $after;
472
-
473
- } elseif ( is_array( $states ) ) {
474
-
475
- $field = '<p class="form-row ' . esc_attr( implode( ' ', $args['class'] ) ) .'" id="' . esc_attr( $args['id'] ) . '_field">';
476
-
477
- if( $args['label'] )
478
- $field .= '<label for="' . esc_attr( $args['id'] ) . '" class="' . esc_attr( implode( ' ', $args['label_class'] ) ) .'">' . $args['label']. $required . '</label>';
479
- $field .= '<select name="' . esc_attr( $key ) . '" id="' . esc_attr( $args['id'] ) . '" class="state_select ' . esc_attr( implode( ' ', $args['input_class'] ) ) .'" ' . implode( ' ', $custom_attributes ) . ' placeholder="' . esc_attr( $args['placeholder'] ) . '">
480
- <option value="">' . __( 'Select a state&hellip;', 'woocommerce-checkout-manager' ) . '</option>';
481
-
482
- foreach( $states as $ckey => $cvalue ) {
483
- $field .= '<option value="' . esc_attr( $ckey ) . '" '.selected( $value, $ckey, false ) .'>' . ( !empty( $cvalue ) ? __( $cvalue, 'woocommerce-checkout-manager' ) : '' ) .'</option>';
484
- }
485
-
486
- $field .= '</select>';
487
-
488
- if( $args['description'] ) {
489
- $field .= '<span class="description">' . esc_attr( $args['description'] ) . '</span>';
490
- }
491
-
492
- $field .= '</p>' . $after;
493
-
494
- } else {
495
-
496
- $field = '<p class="form-row ' . esc_attr( implode( ' ', $args['class'] ) ) .'" id="' . esc_attr( $args['id'] ) . '_field">';
497
-
498
- if( $args['label'] ) {
499
- $field .= '<label for="' . esc_attr( $args['id'] ) . '" class="' . esc_attr( implode( ' ', $args['label_class'] ) ) .'">' . $args['label']. $required . '</label>';
500
- }
501
- $field .= '<input type="text" class="input-text ' . esc_attr( implode( ' ', $args['input_class'] ) ) .'" value="' . esc_attr( $value ) . '" placeholder="' . esc_attr( $args['placeholder'] ) . '" name="' . esc_attr( $key ) . '" id="' . esc_attr( $args['id'] ) . '" ' . implode( ' ', $custom_attributes ) . ' />';
502
-
503
- if( $args['description'] ) {
504
- $field .= '<span class="description">' . esc_attr( $args['description'] ) . '</span>';
505
- }
506
-
507
- $field .= '</p>' . $after;
508
- }
509
-
510
- return $field;
511
-
512
- }
513
- add_filter( 'woocommerce_form_field_wooccmstate', 'wooccm_checkout_field_state_handler', 10, 4 );
514
-
515
- // WooCommerce Checkout field - Country
516
- function wooccm_checkout_field_country_handler( $field = '', $key, $args, $value ) {
517
-
518
- global $current_user;
519
-
520
- $user_roles = $current_user->roles;
521
- $user_role = array_shift($user_roles);
522
-
523
- if( !empty($args['user_role']) && (!empty($args['role_options']) || !empty($args['role_options2'])) ) {
524
- $rolekeys = explode('||',$args['role_options']);
525
- $rolekeys2 = explode('||',$args['role_options2']);
526
- if( !empty($args['role_options']) && !in_array($user_role, $rolekeys) ) {
527
- return;
528
- }
529
- if( !empty($args['role_options2']) && in_array($user_role, $rolekeys2) ) {
530
- return;
531
- }
532
- }
533
-
534
- if( !empty( $args['clear'] ) )
535
- $after = '<div class="clear"></div>';
536
- else
537
- $after = '';
538
-
539
- //$args['class'][] = 'address-field';
540
-
541
- if( $args['wooccm_required'] ) {
542
- $args['class'][] = 'validate-required';
543
- $required = '&nbsp;<abbr class="required" title="' . esc_attr__( 'required', 'woocommerce' ) . '">*</abbr>';
544
- } else {
545
- $required = '';
546
- }
547
-
548
- $args['maxlength'] = ( $args['maxlength'] ) ? 'maxlength="' . absint( $args['maxlength'] ) . '"' : '';
549
-
550
- if( is_string( $args['label_class'] ) ) {
551
- $args['label_class'] = array( $args['label_class'] );
552
- }
553
-
554
- if( is_null( $value ) ) {
555
- $value = $args['default'];
556
- }
557
-
558
- // Custom attribute handling
559
- $custom_attributes = array();
560
-
561
- if( !empty( $args['custom_attributes'] ) && is_array( $args['custom_attributes'] ) ) {
562
- foreach( $args['custom_attributes'] as $attribute => $attribute_value ) {
563
- $custom_attributes[] = esc_attr( $attribute ) . '="' . esc_attr( $attribute_value ) . '"';
564
- }
565
- }
566
-
567
- if( !empty( $args['validate'] ) ) {
568
- foreach( $args['validate'] as $validate ) {
569
- $args['class'][] = 'validate-' . $validate;
570
- }
571
- }
572
-
573
- $countries = $key == 'shipping_country' ? WC()->countries->get_shipping_countries() : WC()->countries->get_allowed_countries();
574
-
575
- if( sizeof( $countries ) == 1 ) {
576
-
577
- $field = '<p class="form-row ' . esc_attr( implode( ' ', $args['class'] ) ) .'" id="' . esc_attr( $args['id'] ) . '_field">';
578
-
579
- if( $args['label'] ) {
580
- $field .= '<label class="' . esc_attr( implode( ' ', $args['label_class'] ) ) .'">' . $args['label'] . '</label>';
581
- }
582
-
583
- $field .= '<strong>' . current( array_values( $countries ) ) . '</strong>';
584
-
585
- $field .= '<input type="hidden" name="' . esc_attr( $key ) . '" id="' . esc_attr( $args['id'] ) . '" value="' . current( array_keys($countries ) ) . '" ' . implode( ' ', $custom_attributes ) . ' class="country_to_state" />';
586
-
587
- if( $args['description'] ) {
588
- $field .= '<span class="description">' . esc_attr( $args['description'] ) . '</span>';
589
- }
590
-
591
- $field .= '</p>' . $after;
592
-
593
- } else {
594
-
595
- $field = '<p class="form-row ' . esc_attr( implode( ' ', $args['class'] ) ) .'" id="' . esc_attr( $args['id'] ) . '_field">'
596
- . '<label for="' . esc_attr( $args['id'] ) . '" class="' . esc_attr( implode( ' ', $args['label_class'] ) ) .'">' . $args['label'] . $required . '</label>'
597
- . '<select name="' . esc_attr( $key ) . '" id="' . esc_attr( $args['id'] ) . '" class="country_to_state country_select ' . esc_attr( implode( ' ', $args['input_class'] ) ) .'" ' . implode( ' ', $custom_attributes ) . '>'
598
- . '<option value="">' . __( 'Select a country&hellip;', 'woocommerce-checkout-manager' ) . '</option>';
599
-
600
- foreach( $countries as $ckey => $cvalue ) {
601
- $field .= '<option value="' . esc_attr( $ckey ) . '" '.selected( $value, $ckey, false ) .'>' . ( !empty( $cvalue ) ? __( $cvalue, 'woocommerce-checkout-manager' ) : '' ) . '</option>';
602
- }
603
-
604
- $field .= '</select>';
605
-
606
- $field .= '<noscript><input type="submit" name="woocommerce_checkout_update_totals" value="' . __( 'Update country', 'woocommerce-checkout-manager' ) . '" /></noscript>';
607
-
608
- if( $args['description'] ) {
609
- $field .= '<span class="description">' . esc_attr( $args['description'] ) . '</span>';
610
- }
611
-
612
- $field .= '</p>' . $after;
613
-
614
- }
615
-
616
- return $field;
617
-
618
- }
619
- add_filter( 'woocommerce_form_field_wooccmcountry', 'wooccm_checkout_field_country_handler', 10, 4 );
620
-
621
- // WooCommerce Checkout field - Multi-Select
622
- function wooccm_checkout_field_multiselect_handler( $field = '', $key, $args, $value ) {
623
-
624
- global $current_user;
625
-
626
- $user_roles = $current_user->roles;
627
- $user_role = array_shift($user_roles);
628
-
629
- if( !empty($args['user_role']) && (!empty($args['role_options']) || !empty($args['role_options2'])) ) {
630
- $rolekeys = explode('||',$args['role_options']);
631
- $rolekeys2 = explode('||',$args['role_options2']);
632
- if( !empty($args['role_options']) && !in_array($user_role, $rolekeys) ) {
633
- return;
634
- }
635
- if( !empty($args['role_options2']) && in_array($user_role, $rolekeys2) ) {
636
- return;
637
- }
638
- }
639
-
640
- if( !empty( $args['clear'] ) )
641
- $after = '<div class="clear"></div>';
642
- else
643
- $after = '';
644
-
645
- if( $args['wooccm_required'] ) {
646
- $args['class'][] = 'validate-required';
647
- $required = '&nbsp;<abbr class="required" title="' . esc_attr__( 'required', 'woocommerce' ) . '">*</abbr>';
648
- } else {
649
- $required = '';
650
- }
651
-
652
- $args['maxlength'] = ( $args['maxlength'] ) ? 'maxlength="' . absint( $args['maxlength'] ) . '"' : '';
653
-
654
- $options = '';
655
-
656
- if( !empty( $args['options'] ) )
657
- foreach (explode('||',$args['options']) as $option_key => $option_text )
658
- $options .= '<option value="'.wooccm_wpml_string( esc_attr( $option_text ) ).'" '. selected( $value, $option_key, false ) . '>' . wooccm_wpml_string( esc_attr( $option_text ) ) .'</option>';
659
-
660
- $field = '<p class="form-row ' . esc_attr( implode( ' ', $args['class'] ) ) .'" id="' . esc_attr( $key ) . '_field">';
661
-
662
- if ( $args['label'] )
663
- $field .= '<label for="' . esc_attr( $key ) . '" class="' . implode( ' ', $args['label_class'] ) .'">' . $args['label']. $required . '</label>';
664
-
665
- $field .= '<select data-placeholder="' . __( 'Select some options', 'woocommerce-checkout-manager' ) . '" multiple="multiple" name="' . esc_attr( $key ) . '[]" id="' . esc_attr( $key ) . '" class="checkout_chosen_select select">
666
- ' . $options . '
667
- </select>
668
- </p>' . $after;
669
-
670
- return $field;
671
-
672
- }
673
- add_filter( 'woocommerce_form_field_multiselect', 'wooccm_checkout_field_multiselect_handler', 10, 4 );
674
-
675
- // WooCommerce Checkout field - Multi-Checkbox
676
- function wooccm_checkout_field_multicheckbox_handler( $field = '', $key, $args, $value ) {
677
-
678
- global $current_user;
679
-
680
- $user_roles = $current_user->roles;
681
- $user_role = array_shift( $user_roles );
682
-
683
- if( !empty($args['user_role']) && (!empty($args['role_options']) || !empty($args['role_options2'])) ) {
684
- $rolekeys = explode('||',$args['role_options']);
685
- $rolekeys2 = explode('||',$args['role_options2']);
686
- if( !empty($args['role_options']) && !in_array($user_role, $rolekeys) ) {
687
- return;
688
- }
689
- if( !empty($args['role_options2']) && in_array($user_role, $rolekeys2) ) {
690
- return;
691
- }
692
- }
693
-
694
- if( !empty( $args['clear'] ) )
695
- $after = '<div class="clear"></div>';
696
- else
697
- $after = '';
698
-
699
- if( $args['wooccm_required'] ) {
700
- $args['class'][] = 'validate-required';
701
- $required = '&nbsp;<abbr class="required" title="' . esc_attr__( 'required', 'woocommerce' ) . '">*</abbr>';
702
- } else {
703
- $required = '';
704
- }
705
-
706
- $args['maxlength'] = ( $args['maxlength'] ) ? 'maxlength="' . absint( $args['maxlength'] ) . '"' : '';
707
-
708
- $options = '';
709
-
710
- if( !empty( $args['options'] ) ) {
711
- foreach( explode('||',$args['options']) as $option_key => $option_text ) {
712
- $options .= '<label><input type="checkbox" name="' . esc_attr( $key ) . '[]" value="'.wooccm_wpml_string( esc_attr( $option_text ) ).'"'. selected( $value, $option_key, false ) . ' /> ' . wooccm_wpml_string( esc_attr( $option_text ) ) . '</label>';
713
- }
714
- }
715
-
716
- $field = '<p class="form-row ' . esc_attr( implode( ' ', $args['class'] ) ) .'" id="' . esc_attr( $key ) . '_field">';
717
-
718
- if( $args['label'] )
719
- $field .= '<label class="' . implode( ' ', $args['label_class'] ) .'">' . $args['label']. $required . '</label>';
720
-
721
- $field .= $options . '
722
- </p>' . $after;
723
-
724
- return $field;
725
-
726
- }
727
- add_filter( 'woocommerce_form_field_multicheckbox', 'wooccm_checkout_field_multicheckbox_handler', 10, 4 );
728
-
729
- // WooCommerce Checkout field - Color Picker
730
- function wooccm_checkout_field_colorpicker_handler( $field = '', $key, $args, $value ) {
731
-
732
- global $current_user;
733
-
734
- $user_roles = $current_user->roles;
735
- $user_role = array_shift($user_roles);
736
-
737
- if( !empty($args['user_role']) && (!empty($args['role_options']) || !empty($args['role_options2'])) ) {
738
- $rolekeys = explode('||',$args['role_options']);
739
- $rolekeys2 = explode('||',$args['role_options2']);
740
- if( !empty($args['role_options']) && !in_array($user_role, $rolekeys) ) {
741
- return;
742
- }
743
- if( !empty($args['role_options2']) && in_array($user_role, $rolekeys2) ) {
744
- return;
745
- }
746
- }
747
-
748
- if( !empty( $args['clear'] ) )
749
- $after = '<div class="clear"></div>';
750
- else
751
- $after = '';
752
-
753
- if( $args['wooccm_required'] ) {
754
- $args['class'][] = 'validate-required';
755
- $required = '&nbsp;<abbr class="required" title="' . esc_attr__( 'required', 'woocommerce' ) . '">*</abbr>';
756
- } else {
757
- $required = '';
758
- }
759
-
760
- //if ( isset($value) ) {
761
- $value = $args['color'];
762
- //}
763
-
764
- $field = '
765
- <p class="form-row ' . implode( ' ', $args['class'] ) .' wccs_colorpicker" id="' . $key . '_field">
766
- <label for="' . $key . '" class="' . implode( ' ', $args['label_class'] ) .'">' . $args['label'] . $required . '</label>
767
- <input type="text" class="input-text" maxlength="7" size="6" name="' . $key . '" id="' . $key . '_colorpicker" placeholder="' . $args['placeholder'] . '" value="'.$value.'" />
768
- <span id="' . $key . '_colorpickerdiv" class="spec_shootd"></span>
769
- </p>' . $after;
770
-
771
- return $field;
772
-
773
- }
774
- add_filter( 'woocommerce_form_field_colorpicker', 'wooccm_checkout_field_colorpicker_handler', 10, 4 );
775
-
776
- // WooCommerce Checkout field - Date Picker
777
- function wooccm_checkout_field_datepicker_handler( $field = '', $key, $args, $value ) {
778
-
779
- global $current_user;
780
-
781
- $user_roles = $current_user->roles;
782
- $user_role = array_shift($user_roles);
783
-
784
- if( !empty($args['user_role']) && (!empty($args['role_options']) || !empty($args['role_options2'])) ) {
785
- $rolekeys = explode('||',$args['role_options']);
786
- $rolekeys2 = explode('||',$args['role_options2']);
787
- if( !empty($args['role_options']) && !in_array($user_role, $rolekeys) ) {
788
- return;
789
- }
790
- if( !empty($args['role_options2']) && in_array($user_role, $rolekeys2) ) {
791
- return;
792
- }
793
- }
794
-
795
- if( !empty( $args['clear'] ) )
796
- $after = '<div class="clear"></div>';
797
- else
798
- $after = '';
799
-
800
- if( $args['wooccm_required'] ) {
801
- $args['class'][] = 'validate-required';
802
- $required = '&nbsp;<abbr class="required" title="' . esc_attr__( 'required', 'woocommerce' ) . '">*</abbr>';
803
- } else {
804
- $required = '';
805
- }
806
-
807
- $field = '<p class="form-row ' . implode( ' ', $args['class'] ) . 'MyDate' . $args['cow'] . ' wccs-form-row-wide" id="' . $key . '_field">
808
- <label for="' . $key . '" class="' . implode( ' ', $args['label_class'] ) .'">' . $args['label'] . $required . '</label>
809
- <input type="text" class="input-text" name="' . $key . '" id="' . $key . '" placeholder="' . $args['placeholder'] . '" value="'. $value.'" />
810
- </p>' . $after;
811
-
812
- return $field;
813
-
814
- }
815
- add_filter( 'woocommerce_form_field_datepicker', 'wooccm_checkout_field_datepicker_handler', 10, 4 );
816
-
817
- // WooCommerce Checkout field - Time Picker
818
- function wooccm_checkout_field_timepicker_handler( $field = '', $key, $args, $value ) {
819
-
820
- global $current_user;
821
-
822
- $user_roles = $current_user->roles;
823
- $user_role = array_shift($user_roles);
824
-
825
- if( !empty($args['user_role']) && (!empty($args['role_options']) || !empty($args['role_options2'])) ) {
826
- $rolekeys = explode('||',$args['role_options']);
827
- $rolekeys2 = explode('||',$args['role_options2']);
828
- if( !empty($args['role_options']) && !in_array($user_role, $rolekeys) ) {
829
- return;
830
- }
831
- if( !empty($args['role_options2']) && in_array($user_role, $rolekeys2) ) {
832
- return;
833
- }
834
- }
835
-
836
- if( !empty( $args['clear'] ) )
837
- $after = '<div class="clear"></div>';
838
- else
839
- $after = '';
840
-
841
- if( $args['wooccm_required'] ) {
842
- $args['class'][] = 'validate-required';
843
- $required = '&nbsp;<abbr class="required" title="' . esc_attr__( 'required', 'woocommerce' ) . '">*</abbr>';
844
- } else {
845
- $required = '';
846
- }
847
-
848
- $field = '<p class="form-row ' . implode( ' ', $args['class'] ) . 'MyTime' . $args['cow'] . ' wccs-form-row-wide" id="' . $key . '_field">
849
- <label for="' . $key . '" class="' . implode( ' ', $args['label_class'] ) .'">' . $args['label'] . $required . '</label>
850
- <input type="text" class="input-text" name="' . $key . '" id="' . $key . '" placeholder="' . $args['placeholder'] . '" value="'. $value.'" />
851
- </p>' . $after;
852
-
853
- return $field;
854
-
855
- }
856
- add_filter( 'woocommerce_form_field_time', 'wooccm_checkout_field_timepicker_handler', 10, 4 );
857
-
858
- // WooCommerce Checkout field - File Picker
859
- function wooccm_checkout_field_upload_handler( $field = '', $key, $args, $value ) {
860
-
861
- global $wpdb, $woocommerce, $post, $current_user;
862
-
863
- $user_roles = $current_user->roles;
864
- $user_role = array_shift($user_roles);
865
-
866
- if( !empty($args['user_role']) && (!empty($args['role_options']) || !empty($args['role_options2'])) ) {
867
- $rolekeys = explode('||',$args['role_options']);
868
- $rolekeys2 = explode('||',$args['role_options2']);
869
- if( !empty($args['role_options']) && !in_array($user_role, $rolekeys) ) {
870
- return;
871
- }
872
- if( !empty($args['role_options2']) && in_array($user_role, $rolekeys2) ) {
873
- return;
874
- }
875
- }
876
-
877
- $upload_name = ( !empty($args['placeholder'] ) ? esc_attr( $args['placeholder'] ) : __( 'Upload Files', 'woocommerce-checkout-manager' ) );
878
-
879
- if( !empty( $args['clear'] ) )
880
- $after = '<div class="clear"></div>';
881
- else
882
- $after = '';
883
-
884
- if( $args['wooccm_required'] ) {
885
- $args['class'][] = 'validate-required';
886
- $required = '&nbsp;<abbr class="required" title="' . esc_attr__( 'required', 'woocommerce' ) . '">*</abbr>';
887
- } else {
888
- $required = '';
889
- }
890
-
891
- $args['maxlength'] = ( $args['maxlength'] ) ? 'maxlength="' . absint( $args['maxlength'] ) . '"' : '';
892
-
893
- if( is_string( $args['label_class'] ) ) {
894
- $args['label_class'] = array( $args['label_class'] );
895
- }
896
-
897
- if( is_null( $value ) ) {
898
- $value = $args['default'];
899
- }
900
-
901
- // Custom attribute handling
902
- $custom_attributes = array();
903
-
904
- if( !empty( $args['custom_attributes'] ) && is_array( $args['custom_attributes'] ) ) {
905
- foreach( $args['custom_attributes'] as $attribute => $attribute_value ) {
906
- $custom_attributes[] = esc_attr( $attribute ) . '="' . esc_attr( $attribute_value ) . '"';
907
- }
908
- }
909
-
910
- if( !empty( $args['validate'] ) ) {
911
- foreach( $args['validate'] as $validate ) {
912
- $args['class'][] = 'validate-' . $validate;
913
- }
914
- }
915
-
916
- $field = '<p class="form-row ' . esc_attr( implode( ' ', $args['class'] ) ) .'" id="' . esc_attr( $args['id'] ) . '_field">';
917
-
918
- if( $args['label'] ) {
919
- $field .= '<label for="' . esc_attr( $args['id'] ) . '" class="' . esc_attr( implode( ' ', $args['label_class'] ) ) .'">' . $args['label'] . $required . '</label>';
920
- }
921
-
922
- /*
923
- // @mod - It looks like the file picker ignores required
924
- $field .= '
925
- <!-- <input style="display:none;" type="hidden" name="' . esc_attr( $key ) . '" id="' . esc_attr( $key ) . '" value="1||" /> -->
926
- ';
927
- */
928
- $field .= '
929
- <input style="display:none;" type="hidden" name="' . esc_attr( $key ) . '" id="' . esc_attr( $key ) . '" value="" />
930
- <input style="display:none;" type="file" name="' . esc_attr( $key ) . '_file" id="' . esc_attr( $key ) . '_file" class="file_upload_button_hide" multiple />
931
-
932
- <button type="button" class="file_upload_account wooccm-btn wooccm-btn-primary start" id="' . esc_attr( $key ) . '_files_button_wccm">'.$upload_name.'</button>';
933
-
934
- $field .= '</p>' . $after;
935
-
936
- return $field;
937
-
938
- }
939
- add_filter( 'woocommerce_form_field_wooccmupload', 'wooccm_checkout_field_upload_handler', 10, 4 );
940
-
941
- // WooCommerce Checkout field - Heading
942
- function wooccm_checkout_field_heading_handler( $field = '', $key, $args, $value ) {
943
-
944
- global $current_user;
945
-
946
- $user_roles = $current_user->roles;
947
- $user_role = array_shift($user_roles);
948
-
949
- if( !empty($args['user_role']) && (!empty($args['role_options']) || !empty($args['role_options2'])) ) {
950
- $rolekeys = explode('||',$args['role_options']);
951
- $rolekeys2 = explode('||',$args['role_options2']);
952
- if( !empty($args['role_options']) && !in_array($user_role, $rolekeys) ) {
953
- return;
954
- }
955
- if( !empty($args['role_options2']) && in_array($user_role, $rolekeys2) ) {
956
- return;
957
- }
958
- }
959
-
960
- $field = '<h3 class="form-row ' . esc_attr( implode( ' ', $args['class'] ) ) .'" id="' . esc_attr( $key ) . '_field">' . $args['label'] . '</h3>';
961
-
962
- return $field;
963
-
964
- }
965
- add_filter( 'woocommerce_form_field_heading', 'wooccm_checkout_field_heading_handler', 10, 4 );
966
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/templates/admin/woocheckout-additional-tbody.php CHANGED
@@ -9,83 +9,83 @@ if ( !defined( 'ABSPATH' ) ) exit;
9
  ?>
10
 
11
  <td style="display:none; text-align:center;" class="more_toggler1c">
12
- <input name="wccs_settings[buttons][<?php echo $i; ?>][more_content]" type="checkbox" value="1" <?php if ( !empty ($options['buttons'][$i]['more_content'])) echo "checked='checked'"; ?> />
13
  </td>
14
 
15
  <td style="display:none;" class="more_toggler1c">
16
- <input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][single_p]" placeholder="<?php _e('Product ID(s) e.g 1674||1233','woocommerce-checkout-manager'); ?>" value="<?php echo (empty( $options['buttons'][$i]['single_p'])) ? '' : $options['buttons'][$i]['single_p']; ?>" />
17
  </td>
18
 
19
  <td style="display:none;" class="more_toggler1c">
20
- <input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][single_px]" placeholder="<?php _e('Product ID(s) e.g 1674||1233','woocommerce-checkout-manager'); ?>" value="<?php echo (empty( $options['buttons'][$i]['single_px'])) ? '' : $options['buttons'][$i]['single_px']; ?>" />
21
  </td>
22
 
23
  <td style="display:none;" class="more_toggler1c">
24
- <input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][single_p_cat]" placeholder="<?php _e('Category Slug(s) e.g my-cat||my-cat2','woocommerce-checkout-manager'); ?>" value="<?php echo (empty( $options['buttons'][$i]['single_p_cat'])) ? '' : $options['buttons'][$i]['single_p_cat']; ?>" />
25
  </td>
26
 
27
  <td style="display:none;" class="more_toggler1c">
28
- <input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][single_px_cat]" placeholder="<?php _e('Category Slug(s) e.g my-cat||my-cat2','woocommerce-checkout-manager'); ?>" value="<?php echo (empty( $options['buttons'][$i]['single_px_cat'])) ? '' : $options['buttons'][$i]['single_px_cat']; ?>" />
29
  </td>
30
 
31
  <td style="display:none;" class="hide_stuff_time">
32
- <input type="text" placeholder="6" name="wccs_settings[buttons][<?php echo $i; ?>][start_hour]" value="<?php echo (empty($options['buttons'][$i]['start_hour'])) ? '' : $options['buttons'][$i]['start_hour']; ?>" />
33
  </td>
34
 
35
  <td style="display:none;" class="hide_stuff_time">
36
- <input type="text" placeholder="9" name="wccs_settings[buttons][<?php echo $i; ?>][end_hour]" value="<?php echo (empty($options['buttons'][$i]['end_hour'])) ? '' : $options['buttons'][$i]['end_hour']; ?>" />
37
  </td>
38
 
39
  <td style="display:none;" class="hide_stuff_time">
40
- <input type="text" placeholder="15" name="wccs_settings[buttons][<?php echo $i; ?>][interval_min]" value="<?php echo (empty($options['buttons'][$i]['interval_min'])) ? '' : $options['buttons'][$i]['interval_min']; ?>" />
41
  </td>
42
 
43
  <td style="display:none;" class="hide_stuff_time">
44
- <input type="text" placeholder="0, 10, 20, 30, 40" name="wccs_settings[buttons][<?php echo $i; ?>][manual_min]" value="<?php echo (empty($options['buttons'][$i]['manual_min'])) ? '' : $options['buttons'][$i]['manual_min']; ?>" />
45
  </td>
46
 
47
  <td style="display:none;" class="hide_stuff_color hide_stuff_days">
48
- <input type="text" placeholder="dd-mm-yy" name="wccs_settings[buttons][<?php echo $i; ?>][format_date]" value="<?php echo (empty($options['buttons'][$i]['format_date'])) ? '' : $options['buttons'][$i]['format_date']; ?>" />
49
  </td>
50
 
51
  <td style="display:none;" class="hide_stuff_color hide_stuff_days">
52
- <input type="text" placeholder="+3" name="wccs_settings[buttons][<?php echo $i; ?>][min_before]" value="<?php echo (empty($options['buttons'][$i]['min_before'])) ? '' : $options['buttons'][$i]['min_before']; ?>" />
53
  </td>
54
 
55
  <td style="display:none;" class="hide_stuff_color hide_stuff_days">
56
- <input type="text" placeholder="3" name="wccs_settings[buttons][<?php echo $i; ?>][max_after]" value="<?php echo (empty( $options['buttons'][$i]['max_after'])) ? '' : $options['buttons'][$i]['max_after']; ?>" />
57
  </td>
58
 
59
  <td style="display:none; text-align:center;" class="hide_stuff_color daoo">
60
- <input name="wccs_settings[buttons][<?php echo $i; ?>][days_disabler]" type="checkbox" value="true" <?php if ( !empty ($options['buttons'][$i]['days_disabler'])) echo "checked='checked'"; ?> />
61
  </td>
62
 
63
  <td style="display:none; text-align:center;" class="hide_stuff_days">
64
- <input name="wccs_settings[buttons][<?php echo $i; ?>][days_disabler0]" type="checkbox" value="1" <?php if ( !empty ($options['buttons'][$i]['days_disabler0'])) echo "checked='checked'"; ?> />
65
  </td>
66
 
67
  <td style="display:none; text-align:center;" class="hide_stuff_days">
68
- <input name="wccs_settings[buttons][<?php echo $i; ?>][days_disabler1]" type="checkbox" value="1" <?php if ( !empty ($options['buttons'][$i]['days_disabler1'])) echo "checked='checked'"; ?> />
69
  </td>
70
 
71
  <td style="display:none; text-align:center;" class="hide_stuff_days">
72
- <input name="wccs_settings[buttons][<?php echo $i; ?>][days_disabler2]" type="checkbox" value="1" <?php if ( !empty ($options['buttons'][$i]['days_disabler2'])) echo "checked='checked'"; ?> />
73
  </td>
74
 
75
  <td style="display:none; text-align:center;" class="hide_stuff_days">
76
- <input name="wccs_settings[buttons][<?php echo $i; ?>][days_disabler3]" type="checkbox" value="1" <?php if ( !empty ($options['buttons'][$i]['days_disabler3'])) echo "checked='checked'"; ?> />
77
  </td>
78
 
79
  <td style="display:none; text-align:center;" class="hide_stuff_days">
80
- <input name="wccs_settings[buttons][<?php echo $i; ?>][days_disabler4]" type="checkbox" value="1" <?php if ( !empty ($options['buttons'][$i]['days_disabler4'])) echo "checked='checked'"; ?> />
81
  </td>
82
 
83
  <td style="display:none; text-align:center;" class="hide_stuff_days">
84
- <input name="wccs_settings[buttons][<?php echo $i; ?>][days_disabler5]" type="checkbox" value="1" <?php if ( !empty ($options['buttons'][$i]['days_disabler5'])) echo "checked='checked'"; ?> />
85
  </td>
86
 
87
  <td style="display:none; text-align:center;" class="hide_stuff_days">
88
- <input name="wccs_settings[buttons][<?php echo $i; ?>][days_disabler6]" type="checkbox" value="1" <?php if ( !empty ($options['buttons'][$i]['days_disabler6'])) echo "checked='checked'"; ?> />
89
  </td>
90
 
91
  <td style="display:none;" class="hide_stuff_color hide_stuff_days">
@@ -93,15 +93,15 @@ if ( !defined( 'ABSPATH' ) ) exit;
93
  </td>
94
 
95
  <td style="display:none;" class="hide_stuff_color hide_stuff_days">
96
- <input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][single_yy]" placeholder="<?php _e('2013','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'yy', 'woocommerce-checkout-manager' ); ?>" value="<?php echo (empty($options['buttons'][$i]['single_yy'])) ? '' : $options['buttons'][$i]['single_yy']; ?>" />
97
  </td>
98
 
99
  <td style="display:none;" class="hide_stuff_color hide_stuff_days">
100
- <input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][single_mm]" placeholder="<?php _e('10','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'mm', 'woocommerce-checkout-manager' ); ?>" value="<?php echo (empty($options['buttons'][$i]['single_mm'])) ? '' : $options['buttons'][$i]['single_mm']; ?>" />
101
  </td>
102
 
103
  <td style="display:none;" class="hide_stuff_color hide_stuff_days">
104
- <input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][single_dd]" placeholder="<?php _e('25','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'dd', 'woocommerce-checkout-manager' ); ?>" value="<?php echo (empty($options['buttons'][$i]['single_dd'])) ? '' : $options['buttons'][$i]['single_dd']; ?>" />
105
  </td>
106
 
107
  <td style="display:none;" class="hide_stuff_color hide_stuff_days">
@@ -109,35 +109,35 @@ if ( !defined( 'ABSPATH' ) ) exit;
109
  </td>
110
 
111
  <td style="display:none;" class="hide_stuff_color hide_stuff_days">
112
- <input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][single_max_yy]" placeholder="<?php _e('2013','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'yy', 'woocommerce-checkout-manager' ); ?>" value="<?php echo (empty( $options['buttons'][$i]['single_max_yy'])) ? '' : $options['buttons'][$i]['single_max_yy']; ?>" />
113
  </td>
114
 
115
  <td style="display:none;" class="hide_stuff_color hide_stuff_days">
116
- <input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][single_max_mm]" placeholder="<?php _e('10','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'mm', 'woocommerce-checkout-manager' ); ?>" value="<?php echo (empty( $options['buttons'][$i]['single_max_mm'])) ? '' : $options['buttons'][$i]['single_max_mm']; ?>" />
117
  </td>
118
 
119
  <td style="display:none;" class="hide_stuff_color hide_stuff_days">
120
- <input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][single_max_dd]" placeholder="<?php _e('25','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'dd', 'woocommerce-checkout-manager' ); ?>" value="<?php echo (empty( $options['buttons'][$i]['single_max_dd'])) ? '' : $options['buttons'][$i]['single_max_dd']; ?>" />
121
  </td>
122
 
123
  <td class="more_toggler1" style="text-align:center;">
124
- <input name="wccs_settings[buttons][<?php echo $i; ?>][checkbox]" type="checkbox" title="<?php _e( 'Whether or not the Checkout field is required', 'woocommerce-checkout-manager' ); ?>" value="true" <?php if ( !empty ($options['buttons'][$i]['checkbox'])) echo "checked='checked'"; ?> />
125
  </td>
126
 
127
  <td class="more_toggler1" style="text-align:center;">
128
  <select name="wccs_settings[buttons][<?php echo $i; ?>][position]" title="<?php _e( 'Placement of the Checkout field', 'woocommerce-checkout-manager' ); ?>"> <!--Call run() function-->
129
- <option value="form-row-wide" <?php ( !isset( $options['buttons'][$i]['position'] ) ) ? '' : selected( $options['buttons'][$i]['position'], 'form-row-wide' ); ?>><?php _e( 'Wide','woocommerce-checkout-manager' ); ?></option>
130
- <option value="form-row-first" <?php ( !isset( $options['buttons'][$i]['position'] ) ) ? '' : selected( $options['buttons'][$i]['position'], 'form-row-first' ); ?>><?php _e( 'Left','woocommerce-checkout-manager' ); ?></option>
131
- <option value="form-row-last" <?php ( !isset( $options['buttons'][$i]['position'] ) ) ? '' : selected( $options['buttons'][$i]['position'], 'form-row-last' ); ?>><?php _e( 'Right','woocommerce-checkout-manager' ); ?></option>
132
  </select>
133
  </td>
134
 
135
  <td class="more_toggler1" style="text-align:center;">
136
- <input name="wccs_settings[buttons][<?php echo $i; ?>][clear_row]" type="checkbox" title="<?php _e( 'Applies a clear fix to the Checkout field', 'woocommerce-checkout-manager' ); ?>" value="true" <?php if ( !empty ($options['buttons'][$i]['clear_row'])) echo "checked='checked'"; ?> />
137
  </td>
138
 
139
  <td class="filter_field" style="display:none;text-align:center;">
140
- <input name="wccs_settings[buttons][<?php echo $i; ?>][deny_checkout]" type="checkbox" value="true" <?php if( !empty( $options['buttons'][$i]['deny_checkout'] ) ) echo "checked='checked'"; ?> />
141
  </td>
142
 
143
  <td class="filter_field_tog add_amount_field condition_tick hide_stuff_time hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c" style="display:none;">
@@ -145,94 +145,94 @@ if ( !defined( 'ABSPATH' ) ) exit;
145
  </td>
146
 
147
  <td class="filter_field" style="display:none;text-align:center;">
148
- <input name="wccs_settings[buttons][<?php echo $i; ?>][tax_remove]" type="checkbox" value="true" <?php if ( !empty ($options['buttons'][$i]['tax_remove'])) echo "checked='checked'"; ?> />
149
  </td>
150
 
151
  <td class="filter_field" style="display:none;text-align:center;">
152
- <input name="wccs_settings[buttons][<?php echo $i; ?>][deny_receipt]" type="checkbox" value="true" <?php if ( !empty ($options['buttons'][$i]['deny_receipt'])) echo "checked='checked'"; ?> />
153
  </td>
154
 
155
  <td class="filter_field condition_tick hide_stuff_change hide_stuff_time hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c" style="display:none;text-align:center;">
156
- <input name="wccs_settings[buttons][<?php echo $i; ?>][add_amount]" type="checkbox" value="true" <?php if ( !empty ($options['buttons'][$i]['add_amount'])) echo "checked='checked'"; ?> />
157
  </td>
158
 
159
  <td class="add_amount_field" style="display:none;text-align:center;">
160
- <input name="wccs_settings[buttons][<?php echo $i; ?>][fee_name]" type="text" value="<?php echo $options['buttons'][$i]['fee_name']; ?>" placeholder="<?php _e('My Custom Charge','woocommerce-checkout-manager'); ?>" />
161
  </td>
162
 
163
  <td class="add_amount_field" style="display:none;text-align:center;">
164
- <input name="wccs_settings[buttons][<?php echo $i; ?>][add_amount_field]" type="text" value="<?php echo $options['buttons'][$i]['add_amount_field']; ?>" placeholder="50" />
165
  </td>
166
 
167
  <td class="filter_field add_amount_field hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_time hide_stuff_color more_toggler1 more_toggler1c" style="display:none;text-align:center;">
168
- <input name="wccs_settings[buttons][<?php echo $i; ?>][conditional_parent_use]" type="checkbox" value="true" <?php if ( !empty ($options['buttons'][$i]['conditional_parent_use'])) echo "checked='checked'"; ?> />
169
  </td>
170
 
171
  <td class="condition_tick" style="display:none;text-align:center;">
172
- <input name="wccs_settings[buttons][<?php echo $i; ?>][conditional_parent]" type="checkbox" value="true" <?php if ( !empty ($options['buttons'][$i]['conditional_parent'])) echo "checked='checked'"; ?> />
173
  </td>
174
 
175
  <td class="more_toggler1">
176
- <input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][label]" title="<?php _e( 'Label text for the Checkout field', 'woocommerce-checkout-manager' ); ?>" placeholder="<?php _e('My Field Name','woocommerce-checkout-manager'); ?>" value="<?php echo esc_attr( $options['buttons'][$i]['label'] ); ?>" />
177
  </td>
178
 
179
  <td class="more_toggler1">
180
- <input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][placeholder]" title="<?php _e( 'Placeholder text for the Checkout field', 'woocommerce-checkout-manager' ); ?>" placeholder="<?php _e('Example red','woocommerce-checkout-manager'); ?>" value="<?php echo (empty($options['buttons'][$i]['placeholder'])) ? '' : $options['buttons'][$i]['placeholder']; ?>" <?php if ( $options['buttons'][$i]['cow'] == 'country' || $options['buttons'][$i]['cow'] == 'state' ) { echo 'readonly="readonly"'; } ?> />
181
  </td>
182
 
183
  <td style="display:none;" class="filter_field add_amount_field hide_stuff_time hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c condition_tick add_amount_field">
184
- <input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][chosen_valt]" placeholder="<?php _e('Yes','woocommerce-checkout-manager'); ?>" value="<?php echo $options['buttons'][$i]['chosen_valt']; ?>" />
185
  </td>
186
 
187
  <td style="display:none;" class="condition_tick">
188
- <input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][conditional_tie]" placeholder="<?php _e('Parent Abbr. Name','woocommerce-checkout-manager'); ?>" value="<?php echo $options['buttons'][$i]['conditional_tie']; ?>" />
189
  </td>
190
 
191
  <td style="display:none;" class="filter_field">
192
- <input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][colorpickerd]" id="billing-colorpic<?php echo $i; ?>" placeholder="<?php _e('#000000','woocommerce-checkout-manager'); ?>" value="<?php echo $options['buttons'][$i]['colorpickerd']; ?>" />
193
  </td>
194
 
195
  <td style="display:none;" class="filter_field">
196
  <select name="wccs_settings[buttons][<?php echo $i; ?>][colorpickertype]">
197
- <option value="farbtastic" <?php (!isset($options['buttons'][$i]['colorpickertype'])) ? '' : selected( $options['buttons'][$i]['colorpickertype'], 'farbtastic' ); ?>><?php _e('Farbtastic','woocommerce-checkout-manager'); ?></option>
198
- <option value="iris" <?php (!isset($options['buttons'][$i]['colorpickertype'])) ? '' : selected( $options['buttons'][$i]['colorpickertype'], 'iris' ); ?>><?php _e('Iris','woocommerce-checkout-manager'); ?></option>
199
  </select>
200
  </td>
201
 
202
  <td style="display:none;text-align:center;" class="filter_field">
203
- <input name="wccs_settings[buttons][<?php echo $i; ?>][user_role]" type="checkbox" value="user_role" <?php if ( !empty ($options['buttons'][$i]['user_role'])) echo "checked='checked'"; ?> />
204
  </td>
205
 
206
  <td class="filter_field" style="display:none;">
207
- <input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][role_options]" placeholder="Option 1||Option 2||Option 3" value="<?php echo $options['buttons'][$i]['role_options']; ?>" />
208
  </td>
209
 
210
  <td class="filter_field" style="display:none;">
211
- <input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][role_options2]" placeholder="Option 1||Option 2||Option 3" value="<?php echo $options['buttons'][$i]['role_options2']; ?>" />
212
  </td>
213
 
214
  <td style="display:none;" class="filter_field add_amount_field hide_stuff_time hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c condition_tick add_amount_field">
215
- <input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][extra_class]" value="<?php echo $options['buttons'][$i]['extra_class']; ?>" />
216
  </td>
217
 
218
  <td style="display:none;" class="hide_stuff_change">
219
- <input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][changenamep]" id="billing-colorpic<?php echo $i; ?>" placeholder="<?php _e( 'Billing Details', 'woocommerce-checkout-manager' ); ?>" value="<?php echo $options['buttons'][$i]['changenamep']; ?>" />
220
  </td>
221
 
222
  <td style="display:none;" class="hide_stuff_change">
223
- <input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][changename]" id="billing-colorpic<?php echo $i; ?>" placeholder="<?php _e( 'Bill Form', 'woocommerce-checkout-manager' ); ?>" value="<?php echo $options['buttons'][$i]['changename']; ?>" />
224
  </td>
225
 
226
  <td style="display:none;text-align:center;" class="hide_stuff_op wccm1">
227
- <input name="wccs_settings[buttons][<?php echo $i; ?>][fancy]" type="checkbox" value="country_select" <?php if ( !empty ($options['buttons'][$i]['fancy'])) echo "checked='checked'"; ?> />
228
  </td>
229
 
230
  <td class="hide_stuff_op wccm1" style="display:none;">
231
- <input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][force_title2]" placeholder="<?php _e( 'Name Guide', 'woocommerce-checkout-manager' ); ?>" value="<?php echo (empty($options['buttons'][$i]['force_title2'])) ? '' : $options['buttons'][$i]['force_title2']; ?>" />
232
  </td>
233
 
234
  <td class="hide_stuff_op wccm1" style="display:none;">
235
- <input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][option_array]" placeholder="Option 1||Option 2||Option 3" value="<?php echo $options['buttons'][$i]['option_array']; ?>" />
236
  </td>
237
 
238
  <td class="filter_field add_amount_field hide_stuff_time condition_tick hide_stuff_change hide_stuff_opcheck hide_stuff_color more_toggler1 more_toggler1c" style="display:none;">
@@ -243,13 +243,13 @@ if ( !defined( 'ABSPATH' ) ) exit;
243
  <?php _e('Swapper Toggler', 'woocommerce-checkout-manager' ); ?>
244
  </td>
245
 
246
- <td class="filter_field add_amount_field condition_tick hide_stuff_change hide_stuff_timef hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c" style="display:none;">
247
  <?php _e('Time Toggler', 'woocommerce-checkout-manager' ); ?>
248
  </td>
249
 
250
  <td class="filter_field add_amount_field hide_stuff_time condition_tick hide_stuff_change hide_stuff_opcheck hide_stuff_op more_toggler1 more_toggler1c hide_stuff_days" style="display:none;">
251
  <?php _e('Date Toggler', 'woocommerce-checkout-manager' ); ?>
252
- </td>
253
 
254
  <td style="display:none;" class="filter_field add_amount_field hide_stuff_time condition_tick hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1">
255
  <?php _e('Hidden Toggler', 'woocommerce-checkout-manager' ); ?>
@@ -261,25 +261,25 @@ if ( !defined( 'ABSPATH' ) ) exit;
261
 
262
  <td class="more_toggler1">
263
  <select name="wccs_settings[buttons][<?php echo $i; ?>][type]" title="<?php _e( 'Type of the Checkout field', 'woocommerce-checkout-manager' ); ?>">
264
- <option value="wooccmtext" <?php (!isset($options['buttons'][$i]['type'])) ? '' : selected( $options['buttons'][$i]['type'], 'wooccmtext' ); ?>><?php _e('Text Input','woocommerce-checkout-manager'); ?></option>
265
- <option value="wooccmtextarea" <?php (!isset($options['buttons'][$i]['type'])) ? '' : selected( $options['buttons'][$i]['type'], 'wooccmtextarea' ); ?>><?php _e('Textarea','woocommerce-checkout-manager'); ?></option>
266
- <option value="wooccmpassword" <?php (!isset($options['buttons'][$i]['type'])) ? '' : selected( $options['buttons'][$i]['type'], 'wooccmpassword' ); ?>><?php _e('Password','woocommerce-checkout-manager'); ?></option>
267
- <option value="wooccmradio" <?php (!isset($options['buttons'][$i]['type'])) ? '' : selected( $options['buttons'][$i]['type'], 'wooccmradio' ); ?>><?php _e('Radio Buttons','woocommerce-checkout-manager'); ?></option>
268
- <option value="checkbox_wccm" <?php (!isset($options['buttons'][$i]['type'])) ? '' : selected( $options['buttons'][$i]['type'], 'checkbox_wccm' ); ?>><?php _e('Check Box','woocommerce-checkout-manager'); ?></option>
269
- <option value="wooccmselect" <?php (!isset($options['buttons'][$i]['type'])) ? '' : selected( $options['buttons'][$i]['type'], 'wooccmselect' ); ?>><?php _e('Select Options','woocommerce-checkout-manager'); ?></option>
270
- <option value="datepicker" <?php (!isset($options['buttons'][$i]['type'])) ? '' : selected( $options['buttons'][$i]['type'], 'datepicker' ); ?>><?php _e('Date Picker','woocommerce-checkout-manager'); ?></option>
271
- <option value="changename" <?php (!isset($options['buttons'][$i]['type'])) ? '' : selected( $options['buttons'][$i]['type'], 'changename' ); ?>><?php _e('Text/ Html Swapper','woocommerce-checkout-manager'); ?></option>
272
- <option value="time" <?php (!isset($options['buttons'][$i]['type'])) ? '' : selected( $options['buttons'][$i]['type'], 'time' ); ?>><?php _e('Time Picker','woocommerce-checkout-manager'); ?></option>
273
- <option value="colorpicker" <?php (!isset($options['buttons'][$i]['type'])) ? '' : selected( $options['buttons'][$i]['type'], 'colorpicker' ); ?>><?php _e('Color Picker','woocommerce-checkout-manager'); ?></option>
274
- <option value="heading" <?php (!isset($options['buttons'][$i]['type'])) ? '' : selected( $options['buttons'][$i]['type'], 'heading' ); ?>><?php _e('Heading','woocommerce-checkout-manager'); ?></option>
275
- <option value="multiselect" <?php (!isset($options['buttons'][$i]['type'])) ? '' : selected( $options['buttons'][$i]['type'], 'multiselect' ); ?>><?php _e('Multi-Select','woocommerce-checkout-manager'); ?></option>
276
- <option value="multicheckbox" <?php (!isset($options['buttons'][$i]['type'])) ? '' : selected( $options['buttons'][$i]['type'], 'multicheckbox' ); ?>><?php _e('Multi-Checkbox','woocommerce-checkout-manager'); ?></option>
277
- <option value="wooccmcountry" <?php (!isset($options['buttons'][$i]['type'])) ? '' : selected( $options['buttons'][$i]['type'], 'wooccmcountry' ); ?>><?php _e('Country','woocommerce-checkout-manager'); ?></option>
278
- <option value="wooccmstate" <?php (!isset($options['buttons'][$i]['type'])) ? '' : selected( $options['buttons'][$i]['type'], 'wooccmstate' ); ?>><?php _e('State','woocommerce-checkout-manager'); ?></option>
279
- <option value="wooccmupload" <?php (!isset($options['buttons'][$i]['type'])) ? '' : selected( $options['buttons'][$i]['type'], 'wooccmupload' ); ?>><?php _e('File Picker','woocommerce-checkout-manager'); ?></option>
280
  </select>
281
  </td>
282
 
283
  <td class="more_toggler1">
284
- <input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][cow]" placeholder="MyField" title="<?php _e( 'To edit Abbreviations open General > Switches > Editing Of Abbreviation Fields.', 'woocommerce-checkout-manager' ); ?>" value="<?php echo $options['buttons'][$i]['cow']; ?>" <?php if ( empty($options['checkness']['abbreviation'])) { echo 'readonly="readonly"'; } ?> />
285
  </td>
9
  ?>
10
 
11
  <td style="display:none; text-align:center;" class="more_toggler1c">
12
+ <input name="wccs_settings[buttons][<?php echo $i; ?>][more_content]" type="checkbox" value="1" <?php if ( !empty ($field['more_content'])) echo "checked='checked'"; ?> />
13
  </td>
14
 
15
  <td style="display:none;" class="more_toggler1c">
16
+ <input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][single_p]" placeholder="<?php _e('Product ID(s) e.g 1674||1233','woocommerce-checkout-manager'); ?>" value="<?php echo (empty( $field['single_p'])) ? '' : $field['single_p']; ?>" />
17
  </td>
18
 
19
  <td style="display:none;" class="more_toggler1c">
20
+ <input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][single_px]" placeholder="<?php _e('Product ID(s) e.g 1674||1233','woocommerce-checkout-manager'); ?>" value="<?php echo (empty( $field['single_px'])) ? '' : $field['single_px']; ?>" />
21
  </td>
22
 
23
  <td style="display:none;" class="more_toggler1c">
24
+ <input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][single_p_cat]" placeholder="<?php _e('Category Slug(s) e.g my-cat||my-cat2','woocommerce-checkout-manager'); ?>" value="<?php echo (empty( $field['single_p_cat'])) ? '' : $field['single_p_cat']; ?>" />
25
  </td>
26
 
27
  <td style="display:none;" class="more_toggler1c">
28
+ <input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][single_px_cat]" placeholder="<?php _e('Category Slug(s) e.g my-cat||my-cat2','woocommerce-checkout-manager'); ?>" value="<?php echo (empty( $field['single_px_cat'])) ? '' : $field['single_px_cat']; ?>" />
29
  </td>
30
 
31
  <td style="display:none;" class="hide_stuff_time">
32
+ <input type="text" placeholder="6" name="wccs_settings[buttons][<?php echo $i; ?>][start_hour]" value="<?php echo (empty($field['start_hour'])) ? '' : $field['start_hour']; ?>" />
33
  </td>
34
 
35
  <td style="display:none;" class="hide_stuff_time">
36
+ <input type="text" placeholder="9" name="wccs_settings[buttons][<?php echo $i; ?>][end_hour]" value="<?php echo (empty($field['end_hour'])) ? '' : $field['end_hour']; ?>" />
37
  </td>
38
 
39
  <td style="display:none;" class="hide_stuff_time">
40
+ <input type="text" placeholder="15" name="wccs_settings[buttons][<?php echo $i; ?>][interval_min]" value="<?php echo (empty($field['interval_min'])) ? '' : $field['interval_min']; ?>" />
41
  </td>
42
 
43
  <td style="display:none;" class="hide_stuff_time">
44
+ <input type="text" placeholder="0, 10, 20, 30, 40" name="wccs_settings[buttons][<?php echo $i; ?>][manual_min]" value="<?php echo (empty($field['manual_min'])) ? '' : $field['manual_min']; ?>" />
45
  </td>
46
 
47
  <td style="display:none;" class="hide_stuff_color hide_stuff_days">
48
+ <input type="text" placeholder="dd-mm-yy" name="wccs_settings[buttons][<?php echo $i; ?>][format_date]" value="<?php echo (empty($field['format_date'])) ? '' : $field['format_date']; ?>" />
49
  </td>
50
 
51
  <td style="display:none;" class="hide_stuff_color hide_stuff_days">
52
+ <input type="text" placeholder="+3" name="wccs_settings[buttons][<?php echo $i; ?>][min_before]" value="<?php echo (empty($field['min_before'])) ? '' : $field['min_before']; ?>" />
53
  </td>
54
 
55
  <td style="display:none;" class="hide_stuff_color hide_stuff_days">
56
+ <input type="text" placeholder="3" name="wccs_settings[buttons][<?php echo $i; ?>][max_after]" value="<?php echo (empty( $field['max_after'])) ? '' : $field['max_after']; ?>" />
57
  </td>
58
 
59
  <td style="display:none; text-align:center;" class="hide_stuff_color daoo">
60
+ <input name="wccs_settings[buttons][<?php echo $i; ?>][days_disabler]" type="checkbox" value="true" <?php if ( !empty ($field['days_disabler'])) echo "checked='checked'"; ?> />
61
  </td>
62
 
63
  <td style="display:none; text-align:center;" class="hide_stuff_days">
64
+ <input name="wccs_settings[buttons][<?php echo $i; ?>][days_disabler0]" type="checkbox" value="1" <?php if ( !empty ($field['days_disabler0'])) echo "checked='checked'"; ?> />
65
  </td>
66
 
67
  <td style="display:none; text-align:center;" class="hide_stuff_days">
68
+ <input name="wccs_settings[buttons][<?php echo $i; ?>][days_disabler1]" type="checkbox" value="1" <?php if ( !empty ($field['days_disabler1'])) echo "checked='checked'"; ?> />
69
  </td>
70
 
71
  <td style="display:none; text-align:center;" class="hide_stuff_days">
72
+ <input name="wccs_settings[buttons][<?php echo $i; ?>][days_disabler2]" type="checkbox" value="1" <?php if ( !empty ($field['days_disabler2'])) echo "checked='checked'"; ?> />
73
  </td>
74
 
75
  <td style="display:none; text-align:center;" class="hide_stuff_days">
76
+ <input name="wccs_settings[buttons][<?php echo $i; ?>][days_disabler3]" type="checkbox" value="1" <?php if ( !empty ($field['days_disabler3'])) echo "checked='checked'"; ?> />
77
  </td>
78
 
79
  <td style="display:none; text-align:center;" class="hide_stuff_days">
80
+ <input name="wccs_settings[buttons][<?php echo $i; ?>][days_disabler4]" type="checkbox" value="1" <?php if ( !empty ($field['days_disabler4'])) echo "checked='checked'"; ?> />
81
  </td>
82
 
83
  <td style="display:none; text-align:center;" class="hide_stuff_days">
84
+ <input name="wccs_settings[buttons][<?php echo $i; ?>][days_disabler5]" type="checkbox" value="1" <?php if ( !empty ($field['days_disabler5'])) echo "checked='checked'"; ?> />
85
  </td>
86
 
87
  <td style="display:none; text-align:center;" class="hide_stuff_days">
88
+ <input name="wccs_settings[buttons][<?php echo $i; ?>][days_disabler6]" type="checkbox" value="1" <?php if ( !empty ($field['days_disabler6'])) echo "checked='checked'"; ?> />
89
  </td>
90
 
91
  <td style="display:none;" class="hide_stuff_color hide_stuff_days">
93
  </td>
94
 
95
  <td style="display:none;" class="hide_stuff_color hide_stuff_days">
96
+ <input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][single_yy]" placeholder="<?php _e('2013','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'yy', 'woocommerce-checkout-manager' ); ?>" value="<?php echo (empty($field['single_yy'])) ? '' : $field['single_yy']; ?>" />
97
  </td>
98
 
99
  <td style="display:none;" class="hide_stuff_color hide_stuff_days">
100
+ <input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][single_mm]" placeholder="<?php _e('10','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'mm', 'woocommerce-checkout-manager' ); ?>" value="<?php echo (empty($field['single_mm'])) ? '' : $field['single_mm']; ?>" />
101
  </td>
102
 
103
  <td style="display:none;" class="hide_stuff_color hide_stuff_days">
104
+ <input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][single_dd]" placeholder="<?php _e('25','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'dd', 'woocommerce-checkout-manager' ); ?>" value="<?php echo (empty($field['single_dd'])) ? '' : $field['single_dd']; ?>" />
105
  </td>
106
 
107
  <td style="display:none;" class="hide_stuff_color hide_stuff_days">
109
  </td>
110
 
111
  <td style="display:none;" class="hide_stuff_color hide_stuff_days">
112
+ <input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][single_max_yy]" placeholder="<?php _e('2013','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'yy', 'woocommerce-checkout-manager' ); ?>" value="<?php echo (empty( $field['single_max_yy'])) ? '' : $field['single_max_yy']; ?>" />
113
  </td>
114
 
115
  <td style="display:none;" class="hide_stuff_color hide_stuff_days">
116
+ <input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][single_max_mm]" placeholder="<?php _e('10','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'mm', 'woocommerce-checkout-manager' ); ?>" value="<?php echo (empty( $field['single_max_mm'])) ? '' : $field['single_max_mm']; ?>" />
117
  </td>
118
 
119
  <td style="display:none;" class="hide_stuff_color hide_stuff_days">
120
+ <input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][single_max_dd]" placeholder="<?php _e('25','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'dd', 'woocommerce-checkout-manager' ); ?>" value="<?php echo (empty( $field['single_max_dd'])) ? '' : $field['single_max_dd']; ?>" />
121
  </td>
122
 
123
  <td class="more_toggler1" style="text-align:center;">
124
+ <input name="wccs_settings[buttons][<?php echo $i; ?>][checkbox]" type="checkbox" title="<?php _e( 'Whether or not the Checkout field is required', 'woocommerce-checkout-manager' ); ?>" value="true" <?php if ( !empty ($field['checkbox'])) echo "checked='checked'"; ?> />
125
  </td>
126
 
127
  <td class="more_toggler1" style="text-align:center;">
128
  <select name="wccs_settings[buttons][<?php echo $i; ?>][position]" title="<?php _e( 'Placement of the Checkout field', 'woocommerce-checkout-manager' ); ?>"> <!--Call run() function-->
129
+ <option value="form-row-wide" <?php ( !isset( $field['position'] ) ) ? '' : selected( $field['position'], 'form-row-wide' ); ?>><?php _e( 'Wide','woocommerce-checkout-manager' ); ?></option>
130
+ <option value="form-row-first" <?php ( !isset( $field['position'] ) ) ? '' : selected( $field['position'], 'form-row-first' ); ?>><?php _e( 'Left','woocommerce-checkout-manager' ); ?></option>
131
+ <option value="form-row-last" <?php ( !isset( $field['position'] ) ) ? '' : selected( $field['position'], 'form-row-last' ); ?>><?php _e( 'Right','woocommerce-checkout-manager' ); ?></option>
132
  </select>
133
  </td>
134
 
135
  <td class="more_toggler1" style="text-align:center;">
136
+ <input name="wccs_settings[buttons][<?php echo $i; ?>][clear_row]" type="checkbox" title="<?php _e( 'Applies a clear fix to the Checkout field', 'woocommerce-checkout-manager' ); ?>" value="true" <?php if ( !empty ($field['clear_row'])) echo "checked='checked'"; ?> />
137
  </td>
138
 
139
  <td class="filter_field" style="display:none;text-align:center;">
140
+ <input name="wccs_settings[buttons][<?php echo $i; ?>][deny_checkout]" type="checkbox" value="true" <?php if( !empty( $field['deny_checkout'] ) ) echo "checked='checked'"; ?> />
141
  </td>
142
 
143
  <td class="filter_field_tog add_amount_field condition_tick hide_stuff_time hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c" style="display:none;">
145
  </td>
146
 
147
  <td class="filter_field" style="display:none;text-align:center;">
148
+ <input name="wccs_settings[buttons][<?php echo $i; ?>][tax_remove]" type="checkbox" value="true" <?php if ( !empty ($field['tax_remove'])) echo "checked='checked'"; ?> />
149
  </td>
150
 
151
  <td class="filter_field" style="display:none;text-align:center;">
152
+ <input name="wccs_settings[buttons][<?php echo $i; ?>][deny_receipt]" type="checkbox" value="true" <?php if ( !empty ($field['deny_receipt'])) echo "checked='checked'"; ?> />
153
  </td>
154
 
155
  <td class="filter_field condition_tick hide_stuff_change hide_stuff_time hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c" style="display:none;text-align:center;">
156
+ <input name="wccs_settings[buttons][<?php echo $i; ?>][add_amount]" type="checkbox" value="true" <?php if ( !empty ($field['add_amount'])) echo "checked='checked'"; ?> />
157
  </td>
158
 
159
  <td class="add_amount_field" style="display:none;text-align:center;">
160
+ <input name="wccs_settings[buttons][<?php echo $i; ?>][fee_name]" type="text" value="<?php echo $field['fee_name']; ?>" placeholder="<?php _e('My Custom Charge','woocommerce-checkout-manager'); ?>" />
161
  </td>
162
 
163
  <td class="add_amount_field" style="display:none;text-align:center;">
164
+ <input name="wccs_settings[buttons][<?php echo $i; ?>][add_amount_field]" type="text" value="<?php echo $field['add_amount_field']; ?>" placeholder="50" />
165
  </td>
166
 
167
  <td class="filter_field add_amount_field hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_time hide_stuff_color more_toggler1 more_toggler1c" style="display:none;text-align:center;">
168
+ <input name="wccs_settings[buttons][<?php echo $i; ?>][conditional_parent_use]" type="checkbox" value="true" <?php if ( !empty ($field['conditional_parent_use'])) echo "checked='checked'"; ?> />
169
  </td>
170
 
171
  <td class="condition_tick" style="display:none;text-align:center;">
172
+ <input name="wccs_settings[buttons][<?php echo $i; ?>][conditional_parent]" type="checkbox" value="true" <?php if ( !empty ($field['conditional_parent'])) echo "checked='checked'"; ?> />
173
  </td>
174
 
175
  <td class="more_toggler1">
176
+ <input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][label]" title="<?php _e( 'Label text for the Checkout field', 'woocommerce-checkout-manager' ); ?>" placeholder="<?php _e('My Field Name','woocommerce-checkout-manager'); ?>" value="<?php echo esc_attr( $field['label'] ); ?>" />
177
  </td>
178
 
179
  <td class="more_toggler1">
180
+ <input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][placeholder]" title="<?php _e( 'Placeholder text for the Checkout field', 'woocommerce-checkout-manager' ); ?>" placeholder="<?php _e('Example red','woocommerce-checkout-manager'); ?>" value="<?php echo (empty($field['placeholder'])) ? '' : $field['placeholder']; ?>" <?php if ( $field['cow'] == 'country' || $field['cow'] == 'state' ) { echo 'readonly="readonly"'; } ?> />
181
  </td>
182
 
183
  <td style="display:none;" class="filter_field add_amount_field hide_stuff_time hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c condition_tick add_amount_field">
184
+ <input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][chosen_valt]" placeholder="<?php _e('Yes','woocommerce-checkout-manager'); ?>" value="<?php echo $field['chosen_valt']; ?>" />
185
  </td>
186
 
187
  <td style="display:none;" class="condition_tick">
188
+ <input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][conditional_tie]" placeholder="<?php _e('Parent Abbr. Name','woocommerce-checkout-manager'); ?>" value="<?php echo $field['conditional_tie']; ?>" />
189
  </td>
190
 
191
  <td style="display:none;" class="filter_field">
192
+ <input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][colorpickerd]" id="billing-colorpic<?php echo $i; ?>" placeholder="<?php _e('#000000','woocommerce-checkout-manager'); ?>" value="<?php echo $field['colorpickerd']; ?>" />
193
  </td>
194
 
195
  <td style="display:none;" class="filter_field">
196
  <select name="wccs_settings[buttons][<?php echo $i; ?>][colorpickertype]">
197
+ <option value="farbtastic" <?php (!isset($field['colorpickertype'])) ? '' : selected( $field['colorpickertype'], 'farbtastic' ); ?>><?php _e('Farbtastic','woocommerce-checkout-manager'); ?></option>
198
+ <option value="iris" <?php (!isset($field['colorpickertype'])) ? '' : selected( $field['colorpickertype'], 'iris' ); ?>><?php _e('Iris','woocommerce-checkout-manager'); ?></option>
199
  </select>
200
  </td>
201
 
202
  <td style="display:none;text-align:center;" class="filter_field">
203
+ <input name="wccs_settings[buttons][<?php echo $i; ?>][user_role]" type="checkbox" value="user_role" <?php if ( !empty ($field['user_role'])) echo "checked='checked'"; ?> />
204
  </td>
205
 
206
  <td class="filter_field" style="display:none;">
207
+ <input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][role_options]" placeholder="Option 1||Option 2||Option 3" value="<?php echo $field['role_options']; ?>" />
208
  </td>
209
 
210
  <td class="filter_field" style="display:none;">
211
+ <input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][role_options2]" placeholder="Option 1||Option 2||Option 3" value="<?php echo $field['role_options2']; ?>" />
212
  </td>
213
 
214
  <td style="display:none;" class="filter_field add_amount_field hide_stuff_time hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c condition_tick add_amount_field">
215
+ <input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][extra_class]" value="<?php echo $field['extra_class']; ?>" />
216
  </td>
217
 
218
  <td style="display:none;" class="hide_stuff_change">
219
+ <input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][changenamep]" id="billing-colorpic<?php echo $i; ?>" placeholder="<?php _e( 'Billing Details', 'woocommerce-checkout-manager' ); ?>" value="<?php echo $field['changenamep']; ?>" />
220
  </td>
221
 
222
  <td style="display:none;" class="hide_stuff_change">
223
+ <input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][changename]" id="billing-colorpic<?php echo $i; ?>" placeholder="<?php _e( 'Bill Form', 'woocommerce-checkout-manager' ); ?>" value="<?php echo $field['changename']; ?>" />
224
  </td>
225
 
226
  <td style="display:none;text-align:center;" class="hide_stuff_op wccm1">
227
+ <input name="wccs_settings[buttons][<?php echo $i; ?>][fancy]" type="checkbox" value="country_select" <?php if ( !empty ($field['fancy'])) echo "checked='checked'"; ?> />
228
  </td>
229
 
230
  <td class="hide_stuff_op wccm1" style="display:none;">
231
+ <input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][force_title2]" placeholder="<?php _e( 'Name Guide', 'woocommerce-checkout-manager' ); ?>" value="<?php echo (empty($field['force_title2'])) ? '' : $field['force_title2']; ?>" />
232
  </td>
233
 
234
  <td class="hide_stuff_op wccm1" style="display:none;">
235
+ <input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][option_array]" placeholder="Option 1||Option 2||Option 3" value="<?php echo $field['option_array']; ?>" />
236
  </td>
237
 
238
  <td class="filter_field add_amount_field hide_stuff_time condition_tick hide_stuff_change hide_stuff_opcheck hide_stuff_color more_toggler1 more_toggler1c" style="display:none;">
243
  <?php _e('Swapper Toggler', 'woocommerce-checkout-manager' ); ?>
244
  </td>
245
 
246
+ <!--<td class="filter_field add_amount_field condition_tick hide_stuff_change hide_stuff_timef hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c" style="display:none;">
247
  <?php _e('Time Toggler', 'woocommerce-checkout-manager' ); ?>
248
  </td>
249
 
250
  <td class="filter_field add_amount_field hide_stuff_time condition_tick hide_stuff_change hide_stuff_opcheck hide_stuff_op more_toggler1 more_toggler1c hide_stuff_days" style="display:none;">
251
  <?php _e('Date Toggler', 'woocommerce-checkout-manager' ); ?>
252
+ </td>-->
253
 
254
  <td style="display:none;" class="filter_field add_amount_field hide_stuff_time condition_tick hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1">
255
  <?php _e('Hidden Toggler', 'woocommerce-checkout-manager' ); ?>
261
 
262
  <td class="more_toggler1">
263
  <select name="wccs_settings[buttons][<?php echo $i; ?>][type]" title="<?php _e( 'Type of the Checkout field', 'woocommerce-checkout-manager' ); ?>">
264
+ <option value="wooccmtext" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'wooccmtext' ); ?>><?php _e('Text Input','woocommerce-checkout-manager'); ?></option>
265
+ <option value="wooccmtextarea" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'wooccmtextarea' ); ?>><?php _e('Textarea','woocommerce-checkout-manager'); ?></option>
266
+ <option value="wooccmpassword" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'wooccmpassword' ); ?>><?php _e('Password','woocommerce-checkout-manager'); ?></option>
267
+ <option value="wooccmradio" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'wooccmradio' ); ?>><?php _e('Radio Buttons','woocommerce-checkout-manager'); ?></option>
268
+ <option value="checkbox_wccm" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'checkbox_wccm' ); ?>><?php _e('Check Box','woocommerce-checkout-manager'); ?></option>
269
+ <option value="wooccmselect" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'wooccmselect' ); ?>><?php _e('Select Options','woocommerce-checkout-manager'); ?></option>
270
+ <option value="datepicker" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'datepicker' ); ?>><?php _e('Date Picker','woocommerce-checkout-manager'); ?></option>
271
+ <option value="changename" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'changename' ); ?>><?php _e('Text/ Html Swapper','woocommerce-checkout-manager'); ?></option>
272
+ <option value="time" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'time' ); ?>><?php _e('Time Picker','woocommerce-checkout-manager'); ?></option>
273
+ <option value="colorpicker" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'colorpicker' ); ?>><?php _e('Color Picker','woocommerce-checkout-manager'); ?></option>
274
+ <option value="heading" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'heading' ); ?>><?php _e('Heading','woocommerce-checkout-manager'); ?></option>
275
+ <option value="multiselect" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'multiselect' ); ?>><?php _e('Multi-Select','woocommerce-checkout-manager'); ?></option>
276
+ <option value="multicheckbox" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'multicheckbox' ); ?>><?php _e('Multi-Checkbox','woocommerce-checkout-manager'); ?></option>
277
+ <option value="wooccmcountry" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'wooccmcountry' ); ?>><?php _e('Country','woocommerce-checkout-manager'); ?></option>
278
+ <option value="wooccmstate" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'wooccmstate' ); ?>><?php _e('State','woocommerce-checkout-manager'); ?></option>
279
+ <option value="wooccmupload" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'wooccmupload' ); ?>><?php _e('File Picker','woocommerce-checkout-manager'); ?></option>
280
  </select>
281
  </td>
282
 
283
  <td class="more_toggler1">
284
+ <input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][cow]" placeholder="MyField" title="<?php _e( 'To edit Abbreviations open General > Switches > Editing Of Abbreviation Fields.', 'woocommerce-checkout-manager' ); ?>" value="<?php echo $field['cow']; ?>" <?php if ( empty($options['checkness']['abbreviation'])) { echo 'readonly="readonly"'; } ?> />
285
  </td>
includes/templates/admin/woocheckout-additional-thead.php CHANGED
@@ -132,7 +132,7 @@ if ( !defined( 'ABSPATH' ) ) exit;
132
  <th style="cursor:pointer;text-align:center;font-size:30px;display:none;" class="filter_field add_amount_field condition_tick hide_stuff_opcheck hide_stuff_time hide_stuff_op hide_stuff_change_tog hide_stuff_color more_toggler1 more_toggler1c" width="2%">
133
  <span class="toggle_shower">&equiv;</span>
134
  </th>
135
-
136
  <th style="cursor:pointer;text-align:center;font-size:30px;display:none;" class="filter_field add_amount_field condition_tick hide_stuff_opcheck hide_stuff_op hide_stuff_change hide_stuff_time_tog hide_stuff_color more_toggler1 more_toggler1c" width="2%">
137
  <span class="toggle_shower">&equiv;</span>
138
  </th>
@@ -140,7 +140,7 @@ if ( !defined( 'ABSPATH' ) ) exit;
140
  <th style="cursor:pointer;text-align:center;font-size:30px;display:none;" class="filter_field add_amount_field hide_stuff_time condition_tick hide_stuff_change hide_stuff_opcheck hide_stuff_days hide_stuff_color_tog hide_stuff_op more_toggler1 more_toggler1c" width="2%">
141
  <span class="toggle_shower">&equiv;</span>
142
  </th>
143
-
144
  <th style="display:none;cursor:pointer;text-align:center;font-size:30px;" class="filter_field add_amount_field condition_tick hide_stuff_change hide_stuff_opcheck hide_stuff_time hide_stuff_op hide_stuff_color more_toggler1 more_toggler1a" width="2%">
145
  <span class="toggle_shower">&equiv;</span>
146
  </th>
132
  <th style="cursor:pointer;text-align:center;font-size:30px;display:none;" class="filter_field add_amount_field condition_tick hide_stuff_opcheck hide_stuff_time hide_stuff_op hide_stuff_change_tog hide_stuff_color more_toggler1 more_toggler1c" width="2%">
133
  <span class="toggle_shower">&equiv;</span>
134
  </th>
135
+ <!--
136
  <th style="cursor:pointer;text-align:center;font-size:30px;display:none;" class="filter_field add_amount_field condition_tick hide_stuff_opcheck hide_stuff_op hide_stuff_change hide_stuff_time_tog hide_stuff_color more_toggler1 more_toggler1c" width="2%">
137
  <span class="toggle_shower">&equiv;</span>
138
  </th>
140
  <th style="cursor:pointer;text-align:center;font-size:30px;display:none;" class="filter_field add_amount_field hide_stuff_time condition_tick hide_stuff_change hide_stuff_opcheck hide_stuff_days hide_stuff_color_tog hide_stuff_op more_toggler1 more_toggler1c" width="2%">
141
  <span class="toggle_shower">&equiv;</span>
142
  </th>
143
+ -->
144
  <th style="display:none;cursor:pointer;text-align:center;font-size:30px;" class="filter_field add_amount_field condition_tick hide_stuff_change hide_stuff_opcheck hide_stuff_time hide_stuff_op hide_stuff_color more_toggler1 more_toggler1a" width="2%">
145
  <span class="toggle_shower">&equiv;</span>
146
  </th>
includes/templates/admin/woocheckout-additional.php CHANGED
@@ -1,71 +1,64 @@
1
  <table class="widefat wccs-table additional-semi" style="display:none;" border="1" name="additional_table">
2
- <thead>
3
 
4
- <tr>
5
- <th style="width:3%;" class="wccs-order" title="<?php esc_attr_e( 'Change the order of Checkout fields', 'woocommerce-checkout-manager' ); ?>">#</th>
6
 
7
- <?php require( WOOCCM_PLUGIN_DIR.'includes/templates/admin/woocheckout-additional-thead.php' ); ?>
8
 
9
- <th width="1%" scope="col" title="<?php esc_attr_e( 'Remove button', 'woocommerce-checkout-manager' ); ?>"><strong>X</strong><!-- remove --></th>
10
- </tr>
11
 
12
- </thead>
13
- <tbody>
14
 
15
- <?php
16
- if( isset( $options['buttons'] ) ) {
17
- $size = count( $options['buttons'] );
18
- // $size = max( array_keys( $options['buttons'] ) );
19
- for( $i = 0; $i < $size; $i++ ) {
20
 
21
- /*
22
- if( !isset( $options['buttons'][$i] ) )
23
- break;
24
- */
25
- ?>
26
 
27
- <tr valign="top" id="wccs-additional-id-<?php echo $i; ?>" class="wccs-row">
 
 
 
28
 
29
- <td style="display:none;" class="wccs-order-hidden" >
30
- <input type="hidden" name="wccs_settings[buttons][<?php echo $i; ?>][order]" value="<?php echo ( empty( $options['buttons'][$i]['order'] ) ) ? $i : $options['buttons'][$i]['order']; ?>" />
31
- </td>
32
- <td class="wccs-order" title="<?php esc_attr_e( 'Drag-and-drop this Checkout field to adjust its ordering', 'woocommerce-checkout-manager' ); ?>"><?php echo $i+1; ?></td>
33
 
34
- <?php require( WOOCCM_PLUGIN_DIR.'includes/templates/admin/woocheckout-additional-tbody.php' ); ?>
35
 
36
- <td class="wccs-remove"><a class="wccs-remove-button" href="javascript:;" title="<?php esc_attr_e( 'Delete this Checkout field', 'woocommerce-checkout-manager' ); ?>">&times;</a></td>
 
37
 
38
- </tr>
39
- <!-- #wccs-additional-id-<?php echo $i; ?> .wccs-row -->
 
 
40
 
41
- <?php
42
- }
43
- }
44
- ?>
45
 
46
- <?php
47
- $i = 999;
48
- ?>
49
 
50
- <tr valign="top" id="wccs-additional-id-<?php echo $i; ?>" class="wccs-clone">
 
 
51
 
52
- <td style="display:none;" class="wccs-order-hidden">
53
- <input type="hidden" name="wccs_settings[buttons][<?php echo $i; ?>][order]" value="<?php echo $i; ?>" />
54
- </td>
55
 
56
- <td class="wccs-order" title="<?php esc_attr_e( 'Drag-and-drop this Checkout field to adjust its ordering', 'woocommerce-checkout-manager' ); ?>"><?php echo $i; ?></td>
57
 
58
- <?php require( WOOCCM_PLUGIN_DIR.'includes/templates/admin/woocheckout-additional-clone.php' ); ?>
59
 
60
- <td class="wccs-remove"><a class="wccs-remove-button" href="javascript:;" title="<?php esc_attr_e( 'Delete this Checkout field', 'woocommerce-checkout-manager' ); ?>">&times;</a></td>
61
-
62
- </tr>
63
- <!-- #wccs-additional-id-<?php echo $i; ?> .wccs-clone -->
64
- </tbody>
65
  </table>
66
  <!-- .widefat -->
67
 
68
  <div class="wccs-table-footer additional-semi" style="display:none;">
69
- <a href="javascript:;" id="wccs-add-button" class="button-secondary"><?php _e( '+ Add New Field', 'woocommerce-checkout-manager' ); ?></a>
70
  </div>
71
  <!-- .wccs-table-footer -->
1
  <table class="widefat wccs-table additional-semi" style="display:none;" border="1" name="additional_table">
2
+ <thead>
3
 
4
+ <tr>
5
+ <th style="width:3%;" class="wccs-order" title="<?php esc_attr_e('Change the order of Checkout fields', 'woocommerce-checkout-manager'); ?>">#</th>
6
 
7
+ <?php require( WOOCCM_PLUGIN_DIR . 'includes/templates/admin/woocheckout-additional-thead.php' ); ?>
8
 
9
+ <th width="1%" scope="col" title="<?php esc_attr_e('Remove button', 'woocommerce-checkout-manager'); ?>"><strong>X</strong><!-- remove --></th>
10
+ </tr>
11
 
12
+ </thead>
13
+ <tbody>
14
 
15
+ <?php
16
+ if ($fields = WOOCCM_Fields::get_additional_fields()) {
17
+ foreach ($fields as $i => $field) {
18
+ ?>
 
19
 
20
+ <tr valign="top" id="wccs-additional-id-<?php echo $i; ?>" class="wccs-row">
 
 
 
 
21
 
22
+ <td style="display:none;" class="wccs-order-hidden" >
23
+ <input type="hidden" name="wccs_settings[buttons][<?php echo $i; ?>][order]" value="<?php echo ( empty($field['order']) ) ? $i : $field['order']; ?>" />
24
+ </td>
25
+ <td class="wccs-order" title="<?php esc_attr_e('Drag-and-drop this Checkout field to adjust its ordering', 'woocommerce-checkout-manager'); ?>"><?php echo $i + 1; ?></td>
26
 
27
+ <?php require( WOOCCM_PLUGIN_DIR . 'includes/templates/admin/woocheckout-additional-tbody.php' ); ?>
 
 
 
28
 
29
+ <td class="wccs-remove"><a class="wccs-remove-button" href="javascript:;" title="<?php esc_attr_e('Delete this Checkout field', 'woocommerce-checkout-manager'); ?>">&times;</a></td>
30
 
31
+ </tr>
32
+ <!-- #wccs-additional-id-<?php echo $i; ?> .wccs-row -->
33
 
34
+ <?php
35
+ }
36
+ }
37
+ ?>
38
 
39
+ <?php
40
+ $i = 999;
41
+ ?>
 
42
 
43
+ <tr valign="top" id="wccs-additional-id-<?php echo $i; ?>" class="wccs-clone">
 
 
44
 
45
+ <td style="display:none;" class="wccs-order-hidden">
46
+ <input type="hidden" name="wccs_settings[buttons][<?php echo $i; ?>][order]" value="<?php echo $i; ?>" />
47
+ </td>
48
 
49
+ <td class="wccs-order" title="<?php esc_attr_e('Drag-and-drop this Checkout field to adjust its ordering', 'woocommerce-checkout-manager'); ?>"><?php echo $i; ?></td>
 
 
50
 
51
+ <?php require( WOOCCM_PLUGIN_DIR . 'includes/templates/admin/woocheckout-additional-clone.php' ); ?>
52
 
53
+ <td class="wccs-remove"><a class="wccs-remove-button" href="javascript:;" title="<?php esc_attr_e('Delete this Checkout field', 'woocommerce-checkout-manager'); ?>">&times;</a></td>
54
 
55
+ </tr>
56
+ <!-- #wccs-additional-id-<?php echo $i; ?> .wccs-clone -->
57
+ </tbody>
 
 
58
  </table>
59
  <!-- .widefat -->
60
 
61
  <div class="wccs-table-footer additional-semi" style="display:none;">
62
+ <a href="javascript:;" id="wccs-add-button" class="button-secondary"><?php _e('+ Add New Field', 'woocommerce-checkout-manager'); ?></a>
63
  </div>
64
  <!-- .wccs-table-footer -->
includes/templates/admin/woocheckout-billing-tbody.php CHANGED
@@ -9,83 +9,83 @@ if ( !defined( 'ABSPATH' ) ) exit;
9
  ?>
10
 
11
  <td style="display:none; text-align:center;" class="more_toggler1c">
12
- <input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][more_content]" type="checkbox" value="1" <?php if ( !empty ($options3['billing_buttons'][$i]['more_content'])) echo "checked='checked'"; ?> />
13
  </td>
14
 
15
  <td style="display:none;" class="more_toggler1c">
16
- <input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][single_p]" placeholder="<?php _e('Product ID(s) e.g 1674||1233','woocommerce-checkout-manager'); ?>" value="<?php echo ( !empty( $options3['billing_buttons'][$i]['single_p'] ) ? $options3['billing_buttons'][$i]['single_p'] : '' ); ?>" />
17
  </td>
18
 
19
  <td style="display:none;" class="more_toggler1c">
20
- <input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][single_px]" placeholder="<?php _e('Product ID(s) e.g 1674||1233','woocommerce-checkout-manager'); ?>" value="<?php echo ( !empty( $options3['billing_buttons'][$i]['single_px'] ) ? $options3['billing_buttons'][$i]['single_px'] : '' ); ?>" />
21
  </td>
22
 
23
  <td style="display:none;" class="more_toggler1c">
24
- <input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][single_p_cat]" placeholder="<?php _e('Category Slug(s) e.g my-cat||my-cat2','woocommerce-checkout-manager'); ?>" value="<?php echo ( !empty( $options3['billing_buttons'][$i]['single_p_cat'] ) ? $options3['billing_buttons'][$i]['single_p_cat'] : '' ); ?>" />
25
  </td>
26
 
27
  <td style="display:none;" class="more_toggler1c">
28
- <input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][single_px_cat]" placeholder="<?php _e('Category Slug(s) e.g my-cat||my-cat2','woocommerce-checkout-manager'); ?>" value="<?php echo ( !empty( $options3['billing_buttons'][$i]['single_px_cat'] ) ? $options3['billing_buttons'][$i]['single_px_cat'] : '' ); ?>" />
29
  </td>
30
 
31
  <td style="display:none;" class="hide_stuff_time">
32
- <input type="text" placeholder="6" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][start_hour]" value="<?php echo ( !empty( $options3['billing_buttons'][$i]['start_hour'] ) ? $options3['billing_buttons'][$i]['start_hour'] : '' ); ?>" />
33
  </td>
34
 
35
  <td style="display:none;" class="hide_stuff_time">
36
- <input type="text" placeholder="9" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][end_hour]" value="<?php echo ( !empty( $options3['billing_buttons'][$i]['end_hour'] ) ? $options3['billing_buttons'][$i]['end_hour'] : '' ); ?>" />
37
  </td>
38
 
39
  <td style="display:none;" class="hide_stuff_time">
40
- <input type="text" placeholder="15" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][interval_min]" value="<?php echo ( !empty( $options3['billing_buttons'][$i]['interval_min'] ) ? $options3['billing_buttons'][$i]['interval_min'] : '' ); ?>" />
41
  </td>
42
 
43
  <td style="display:none;" class="hide_stuff_time">
44
- <input type="text" placeholder="0, 10, 20, 30, 40" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][manual_min]" value="<?php echo ( !empty( $options3['billing_buttons'][$i]['manual_min'] ) ? $options3['billing_buttons'][$i]['manual_min'] : '' ); ?>" />
45
  </td>
46
 
47
  <td style="display:none;" class="hide_stuff_color hide_stuff_days">
48
- <input type="text" placeholder="dd-mm-yy" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][format_date]" value="<?php echo ( !empty( $options3['billing_buttons'][$i]['format_date'] ) ? $options3['billing_buttons'][$i]['format_date'] : '' ); ?>" />
49
  </td>
50
 
51
  <td style="display:none;" class="hide_stuff_color hide_stuff_days">
52
- <input type="text" placeholder="+3" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][min_before]" value="<?php echo ( !empty( $options3['billing_buttons'][$i]['min_before'] ) ? $options3['billing_buttons'][$i]['min_before'] : '' ); ?>" />
53
  </td>
54
 
55
  <td style="display:none;" class="hide_stuff_color hide_stuff_days">
56
- <input type="text" placeholder="3" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][max_after]" value="<?php echo ( !empty( $options3['billing_buttons'][$i]['max_after'] ) ? $options3['billing_buttons'][$i]['max_after'] : '' ); ?>" />
57
  </td>
58
 
59
  <td style="display:none; text-align:center;" class="hide_stuff_color daoo">
60
- <input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][days_disabler]" type="checkbox" value="true" <?php if ( !empty ($options3['billing_buttons'][$i]['days_disabler'])) echo "checked='checked'"; ?> />
61
  </td>
62
 
63
  <td style="display:none; text-align:center;" class="hide_stuff_days">
64
- <input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][days_disabler0]" type="checkbox" value="1" <?php if ( !empty ($options3['billing_buttons'][$i]['days_disabler0'])) echo "checked='checked'"; ?> />
65
  </td>
66
 
67
  <td style="display:none; text-align:center;" class="hide_stuff_days">
68
- <input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][days_disabler1]" type="checkbox" value="1" <?php if ( !empty ($options3['billing_buttons'][$i]['days_disabler1'])) echo "checked='checked'"; ?> />
69
  </td>
70
 
71
  <td style="display:none; text-align:center;" class="hide_stuff_days">
72
- <input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][days_disabler2]" type="checkbox" value="1" <?php if ( !empty ($options3['billing_buttons'][$i]['days_disabler2'])) echo "checked='checked'"; ?> />
73
  </td>
74
 
75
  <td style="display:none; text-align:center;" class="hide_stuff_days">
76
- <input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][days_disabler3]" type="checkbox" value="1" <?php if ( !empty ($options3['billing_buttons'][$i]['days_disabler3'])) echo "checked='checked'"; ?> />
77
  </td>
78
 
79
  <td style="display:none; text-align:center;" class="hide_stuff_days">
80
- <input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][days_disabler4]" type="checkbox" value="1" <?php if ( !empty ($options3['billing_buttons'][$i]['days_disabler4'])) echo "checked='checked'"; ?> />
81
  </td>
82
 
83
  <td style="display:none; text-align:center;" class="hide_stuff_days">
84
- <input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][days_disabler5]" type="checkbox" value="1" <?php if ( !empty ($options3['billing_buttons'][$i]['days_disabler5'])) echo "checked='checked'"; ?> />
85
  </td>
86
 
87
  <td style="display:none; text-align:center;" class="hide_stuff_days">
88
- <input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][days_disabler6]" type="checkbox" value="1" <?php if ( !empty ($options3['billing_buttons'][$i]['days_disabler6'])) echo "checked='checked'"; ?> />
89
  </td>
90
 
91
  <td style="display:none;" class="hide_stuff_color hide_stuff_days">
@@ -93,15 +93,15 @@ if ( !defined( 'ABSPATH' ) ) exit;
93
  </td>
94
 
95
  <td style="display:none;" class="hide_stuff_color hide_stuff_days">
96
- <input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][single_yy]" placeholder="<?php _e('2013','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'yy', 'woocommerce-checkout-manager' ); ?>" value="<?php echo ( !empty( $options3['billing_buttons'][$i]['single_yy'] ) ? $options3['billing_buttons'][$i]['single_yy'] : '' ); ?>" />
97
  </td>
98
 
99
  <td style="display:none;" class="hide_stuff_color hide_stuff_days">
100
- <input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][single_mm]" placeholder="<?php _e('10','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'mm', 'woocommerce-checkout-manager' ); ?>" value="<?php echo ( !empty( $options3['billing_buttons'][$i]['single_mm'] ) ? $options3['billing_buttons'][$i]['single_mm'] : '' ); ?>" />
101
  </td>
102
 
103
  <td style="display:none;" class="hide_stuff_color hide_stuff_days">
104
- <input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][single_dd]" placeholder="<?php _e('25','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'dd', 'woocommerce-checkout-manager' ); ?>" value="<?php echo ( !empty( $options3['billing_buttons'][$i]['single_dd'] ) ? $options3['billing_buttons'][$i]['single_dd'] : '' ); ?>" />
105
  </td>
106
 
107
  <td style="display:none;" class="hide_stuff_color hide_stuff_days">
@@ -109,35 +109,35 @@ if ( !defined( 'ABSPATH' ) ) exit;
109
  </td>
110
 
111
  <td style="display:none;" class="hide_stuff_color hide_stuff_days">
112
- <input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][single_max_yy]" placeholder="<?php _e('2013','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'yy', 'woocommerce-checkout-manager' ); ?>" value="<?php echo ( !empty( $options3['billing_buttons'][$i]['single_max_yy'] ) ? $options3['billing_buttons'][$i]['single_max_yy'] : '' ); ?>" />
113
  </td>
114
 
115
  <td style="display:none;" class="hide_stuff_color hide_stuff_days">
116
- <input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][single_max_mm]" placeholder="<?php _e('10','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'mm', 'woocommerce-checkout-manager' ); ?>" value="<?php echo ( !empty( $options3['billing_buttons'][$i]['single_max_mm'] ) ? $options3['billing_buttons'][$i]['single_max_mm'] : '' ); ?>" />
117
  </td>
118
 
119
  <td style="display:none;" class="hide_stuff_color hide_stuff_days">
120
- <input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][single_max_dd]" placeholder="<?php _e('25','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'dd', 'woocommerce-checkout-manager' ); ?>" value="<?php echo ( !empty( $options3['billing_buttons'][$i]['single_max_dd'] ) ? $options3['billing_buttons'][$i]['single_max_dd'] : '' ); ?>" />
121
  </td>
122
 
123
  <td class="more_toggler1" style="text-align:center;">
124
- <input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][checkbox]" type="checkbox" title="<?php _e( 'Whether or not the Checkout field is required', 'woocommerce-checkout-manager' ); ?>" value="true" <?php if ( !empty( $options3['billing_buttons'][$i]['checkbox'] ) ) echo "checked='checked'"; ?> />
125
  </td>
126
 
127
  <td class="more_toggler1" style="text-align:center;">
128
  <select name="wccs_settings3[billing_buttons][<?php echo $i; ?>][position]" title="<?php _e( 'Placement of the Checkout field', 'woocommerce-checkout-manager' ); ?>"> <!--Call run() function-->
129
- <option value="form-row-wide" <?php ( !isset( $options3['billing_buttons'][$i]['position'] ) ) ? '' : selected( $options3['billing_buttons'][$i]['position'], 'form-row-wide' ); ?>><?php _e( 'Wide','woocommerce-checkout-manager' ); ?></option>
130
- <option value="form-row-first" <?php ( !isset( $options3['billing_buttons'][$i]['position'] ) ) ? '' : selected( $options3['billing_buttons'][$i]['position'], 'form-row-first' ); ?>><?php _e( 'Left','woocommerce-checkout-manager' ); ?></option>
131
- <option value="form-row-last" <?php ( !isset( $options3['billing_buttons'][$i]['position'] ) ) ? '' : selected( $options3['billing_buttons'][$i]['position'], 'form-row-last' ); ?>><?php _e( 'Right','woocommerce-checkout-manager' ); ?></option>
132
  </select>
133
  </td>
134
 
135
  <td class="more_toggler1" style="text-align:center;">
136
- <input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][clear_row]" type="checkbox" title="<?php _e( 'Applies a clear fix to the Checkout field', 'woocommerce-checkout-manager' ); ?>" value="true" <?php if ( !empty( $options3['billing_buttons'][$i]['clear_row'] ) ) echo "checked='checked'"; ?> />
137
  </td>
138
 
139
  <td class="filter_field" style="display:none;text-align:center;">
140
- <input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][deny_checkout]" type="checkbox" value="true" <?php if( !empty( $options3['billing_buttons'][$i]['deny_checkout'] ) ) echo "checked='checked'"; ?> />
141
  </td>
142
 
143
  <td class="filter_field_tog add_amount_field condition_tick hide_stuff_time hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c" style="display:none;">
@@ -145,98 +145,98 @@ if ( !defined( 'ABSPATH' ) ) exit;
145
  </td>
146
 
147
  <td class="filter_field" style="display:none;text-align:center;">
148
- <input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][tax_remove]" type="checkbox" value="true" <?php if ( !empty ($options3['billing_buttons'][$i]['tax_remove'])) echo "checked='checked'"; ?> />
149
  </td>
150
 
151
  <td class="filter_field" style="display:none;text-align:center;">
152
- <input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][deny_receipt]" type="checkbox" value="true" <?php if ( !empty ($options3['billing_buttons'][$i]['deny_receipt'])) echo "checked='checked'"; ?> />
153
  </td>
154
 
155
  <td class="filter_field condition_tick hide_stuff_change hide_stuff_time hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c" style="display:none;text-align:center;">
156
- <input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][add_amount]" type="checkbox" value="true" <?php if ( !empty ($options3['billing_buttons'][$i]['add_amount'])) echo "checked='checked'"; ?> />
157
  </td>
158
 
159
  <td class="add_amount_field" style="display:none;text-align:center;">
160
- <input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][fee_name]" type="text" value="<?php echo ( !empty( $options3['billing_buttons'][$i]['fee_name'] ) ? $options3['billing_buttons'][$i]['fee_name'] : '' ); ?>" placeholder="<?php _e('My Custom Charge','woocommerce-checkout-manager'); ?>" />
161
  </td>
162
 
163
  <td class="add_amount_field" style="display:none;text-align:center;">
164
- <input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][add_amount_field]" type="text" value="<?php echo ( !empty( $options3['billing_buttons'][$i]['add_amount_field'] ) ? $options3['billing_buttons'][$i]['add_amount_field'] : '' ); ?>" placeholder="50" />
165
  </td>
166
 
167
  <td class="filter_field add_amount_field hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_time hide_stuff_color more_toggler1 more_toggler1c" style="display:none;text-align:center;">
168
- <input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][conditional_parent_use]" type="checkbox" value="true" <?php if ( !empty ($options3['billing_buttons'][$i]['conditional_parent_use'])) echo "checked='checked'"; ?> />
169
  </td>
170
 
171
  <td class="condition_tick" style="display:none;text-align:center;">
172
- <input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][conditional_parent]" type="checkbox" value="true" <?php if ( !empty ($options3['billing_buttons'][$i]['conditional_parent'])) echo "checked='checked'"; ?> />
173
  </td>
174
 
175
  <td class="more_toggler1">
176
- <input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][label]" title="<?php _e( 'Label text for the Checkout field', 'woocommerce-checkout-manager' ); ?>" placeholder="<?php _e('My Field Name','woocommerce-checkout-manager'); ?>" value="<?php echo esc_attr( $options3['billing_buttons'][$i]['label'] ); ?>" />
177
  </td>
178
 
179
  <td class="more_toggler1">
180
- <input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][placeholder]" title="<?php _e( 'Placeholder text for the Checkout field', 'woocommerce-checkout-manager' ); ?>" placeholder="<?php _e('Example red','woocommerce-checkout-manager'); ?>" value="<?php echo ( !empty( $options3['billing_buttons'][$i]['placeholder'] ) ? $options3['billing_buttons'][$i]['placeholder'] : '' ); ?>" <?php if( $options3['billing_buttons'][$i]['cow'] == 'country' || $options3['billing_buttons'][$i]['cow'] == 'state' ) { echo 'readonly="readonly"'; } ?> />
181
  </td>
182
 
183
  <td style="display:none;" class="filter_field add_amount_field hide_stuff_time hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c condition_tick add_amount_field">
184
- <input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][chosen_valt]" placeholder="<?php _e('Yes','woocommerce-checkout-manager'); ?>" value="<?php echo ( !empty( $options3['billing_buttons'][$i]['chosen_valt'] ) ? $options3['billing_buttons'][$i]['chosen_valt'] : '' ); ?>" />
185
  </td>
186
 
187
  <td style="display:none;" class="condition_tick">
188
- <input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][conditional_tie]" placeholder="<?php _e('Parent Abbr. Name','woocommerce-checkout-manager'); ?>" value="<?php echo ( !empty( $options3['billing_buttons'][$i]['conditional_tie'] ) ? $options3['billing_buttons'][$i]['conditional_tie'] : '' ); ?>" />
189
  </td>
190
 
191
  <td style="display:none;" class="filter_field">
192
- <input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][colorpickerd]" id="billing-colorpic<?php echo $i; ?>" placeholder="<?php _e('#000000','woocommerce-checkout-manager'); ?>" value="<?php echo ( !empty( $options3['billing_buttons'][$i]['colorpickerd'] ) ? $options3['billing_buttons'][$i]['colorpickerd'] : '' ); ?>" />
193
  </td>
194
 
195
  <td style="display:none;" class="filter_field">
196
  <select name="wccs_settings3[billing_buttons][<?php echo $i; ?>][colorpickertype]">
197
- <option value="farbtastic" <?php (!isset($options3['billing_buttons'][$i]['colorpickertype'])) ? '' : selected( $options3['billing_buttons'][$i]['colorpickertype'], 'farbtastic' ); ?>><?php _e('Farbtastic','woocommerce-checkout-manager'); ?></option>
198
- <option value="iris" <?php (!isset($options3['billing_buttons'][$i]['colorpickertype'])) ? '' : selected( $options3['billing_buttons'][$i]['colorpickertype'], 'iris' ); ?>><?php _e('Iris','woocommerce-checkout-manager'); ?></option>
199
  </select>
200
  </td>
201
 
202
  <td style="display:none;text-align:center;" class="filter_field">
203
- <input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][user_role]" type="checkbox" value="user_role" <?php if ( !empty ($options3['billing_buttons'][$i]['user_role'])) echo "checked='checked'"; ?> />
204
  </td>
205
 
206
  <td class="filter_field" style="display:none;">
207
- <input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][role_options]" placeholder="Option 1||Option 2||Option 3" value="<?php echo ( !empty( $options3['billing_buttons'][$i]['role_options'] ) ? $options3['billing_buttons'][$i]['role_options'] : '' ); ?>" />
208
  </td>
209
 
210
  <td class="filter_field" style="display:none;">
211
- <input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][role_options2]" placeholder="Option 1||Option 2||Option 3" value="<?php echo ( !empty( $options3['billing_buttons'][$i]['role_options2'] ) ? $options3['billing_buttons'][$i]['role_options2'] : '' ); ?>" />
212
  </td>
213
 
214
  <td style="display:none;" class="filter_field add_amount_field hide_stuff_time hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c condition_tick add_amount_field">
215
- <input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][extra_class]" value="<?php echo ( !empty( $options3['billing_buttons'][$i]['extra_class'] ) ? $options3['billing_buttons'][$i]['extra_class'] : '' ); ?>" />
216
  </td>
217
 
218
  <td style="display:none;text-align:center;" class="hide_stuff_op wccm1">
219
- <input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][fancy]" type="checkbox" value="country_select" <?php if ( !empty ($options3['billing_buttons'][$i]['fancy'])) echo "checked='checked'"; ?> />
220
  </td>
221
 
222
  <td class="hide_stuff_op wccm1" style="display:none;">
223
- <input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][force_title2]" placeholder="<?php _e('Name Guide','woocommerce-checkout-manager'); ?>" value="<?php echo ( !empty( $options3['billing_buttons'][$i]['force_title2'] ) ? $options3['billing_buttons'][$i]['force_title2'] : '' ); ?>" />
224
  </td>
225
 
226
  <td class="hide_stuff_op wccm1" style="display:none;">
227
- <input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][option_array]" placeholder="Option 1||Option 2||Option 3" value="<?php echo ( !empty( $options3['billing_buttons'][$i]['option_array'] ) ? $options3['billing_buttons'][$i]['option_array'] : '' ); ?>" />
228
  </td>
229
 
230
  <td class="filter_field add_amount_field hide_stuff_time condition_tick hide_stuff_change hide_stuff_opcheck hide_stuff_color more_toggler1 more_toggler1c" style="display:none;">
231
  <?php _e('Options Toggler', 'woocommerce-checkout-manager' ); ?>
232
  </td>
233
 
234
- <td class="filter_field add_amount_field condition_tick hide_stuff_change hide_stuff_timef hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c" style="display:none;">
235
  <?php _e('Time Toggler', 'woocommerce-checkout-manager' ); ?>
236
  </td>
237
 
238
  <td class="filter_field add_amount_field hide_stuff_time condition_tick hide_stuff_change hide_stuff_opcheck hide_stuff_op more_toggler1 more_toggler1c hide_stuff_days" style="display:none;">
239
- <?php _e('Date Toggler', 'woocommerce-checkout-manager' ); ?>
240
  </td>
241
 
242
  <td style="display:none;" class="filter_field add_amount_field hide_stuff_time condition_tick hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1">
@@ -248,25 +248,25 @@ if ( !defined( 'ABSPATH' ) ) exit;
248
  </td>
249
 
250
  <td class="more_toggler1">
251
- <select name="wccs_settings3[billing_buttons][<?php echo $i; ?>][type]" title="<?php _e( 'Type of the Checkout field', 'woocommerce-checkout-manager' ); ?>" <?php if ( $options3['billing_buttons'][$i]['cow'] == 'country' || $options3['billing_buttons'][$i]['cow'] == 'state' ) { echo 'readonly="readonly" style="pointer-events:none;"'; } ?> > <!--Call run() function-->
252
- <option value="wooccmtext" <?php (!isset($options3['billing_buttons'][$i]['type'])) ? '' : selected( $options3['billing_buttons'][$i]['type'], 'wooccmtext' ); ?>><?php _e('Text Input','woocommerce-checkout-manager'); ?></option>
253
- <option value="wooccmtextarea" <?php (!isset($options3['billing_buttons'][$i]['type'])) ? '' : selected( $options3['billing_buttons'][$i]['type'], 'wooccmtextarea' ); ?>><?php _e('Textarea','woocommerce-checkout-manager'); ?></option>
254
- <option value="wooccmpassword" <?php (!isset($options3['billing_buttons'][$i]['type'])) ? '' : selected( $options3['billing_buttons'][$i]['type'], 'wooccmpassword' ); ?>><?php _e('Password','woocommerce-checkout-manager'); ?></option>
255
- <option value="wooccmradio" <?php (!isset($options3['billing_buttons'][$i]['type'])) ? '' : selected( $options3['billing_buttons'][$i]['type'], 'wooccmradio' ); ?>><?php _e('Radio Buttons','woocommerce-checkout-manager'); ?></option>
256
- <option value="checkbox_wccm" <?php (!isset($options3['billing_buttons'][$i]['type'])) ? '' : selected( $options3['billing_buttons'][$i]['type'], 'checkbox_wccm' ); ?>><?php _e('Check Box','woocommerce-checkout-manager'); ?></option>
257
- <option value="wooccmselect" <?php (!isset($options3['billing_buttons'][$i]['type'])) ? '' : selected( $options3['billing_buttons'][$i]['type'], 'wooccmselect' ); ?>><?php _e('Select Options','woocommerce-checkout-manager'); ?></option>
258
- <option value="datepicker" <?php (!isset($options3['billing_buttons'][$i]['type'])) ? '' : selected( $options3['billing_buttons'][$i]['type'], 'datepicker' ); ?>><?php _e('Date Picker','woocommerce-checkout-manager'); ?></option>
259
- <option value="time" <?php (!isset($options3['billing_buttons'][$i]['type'])) ? '' : selected( $options3['billing_buttons'][$i]['type'], 'time' ); ?>><?php _e('Time Picker','woocommerce-checkout-manager'); ?></option>
260
- <option value="colorpicker" <?php (!isset($options3['billing_buttons'][$i]['type'])) ? '' : selected( $options3['billing_buttons'][$i]['type'], 'colorpicker' ); ?>><?php _e('Color Picker','woocommerce-checkout-manager'); ?></option>
261
- <option value="heading" <?php (!isset($options3['billing_buttons'][$i]['type'])) ? '' : selected( $options3['billing_buttons'][$i]['type'], 'heading' ); ?>><?php _e('Heading','woocommerce-checkout-manager'); ?></option>
262
- <option value="multiselect" <?php (!isset($options3['billing_buttons'][$i]['type'])) ? '' : selected( $options3['billing_buttons'][$i]['type'], 'multiselect' ); ?>><?php _e('Multi-Select','woocommerce-checkout-manager'); ?></option>
263
- <option value="multicheckbox" <?php (!isset($options3['billing_buttons'][$i]['type'])) ? '' : selected( $options3['billing_buttons'][$i]['type'], 'multicheckbox' ); ?>><?php _e('Multi-Checkbox','woocommerce-checkout-manager'); ?></option>
264
- <option <?php if ( $options3['billing_buttons'][$i]['cow'] == 'country' ) { echo 'selected="selected"'; } ?> value="wooccmcountry" <?php (!isset($options3['billing_buttons'][$i]['type'])) ? '' : selected( $options3['billing_buttons'][$i]['type'], 'wooccmcountry' ); ?>><?php _e('Country','woocommerce-checkout-manager'); ?></option>
265
- <option <?php if ( $options3['billing_buttons'][$i]['cow'] == 'state' ) { echo 'selected="selected"'; } ?> value="wooccmstate" <?php (!isset($options3['billing_buttons'][$i]['type'])) ? '' : selected( $options3['billing_buttons'][$i]['type'], 'wooccmstate' ); ?>><?php _e('State','woocommerce-checkout-manager'); ?></option>
266
- <option value="wooccmupload" <?php (!isset($options3['billing_buttons'][$i]['type'])) ? '' : selected( $options3['billing_buttons'][$i]['type'], 'wooccmupload' ); ?>><?php _e('File Picker','woocommerce-checkout-manager'); ?></option>
267
  </select>
268
  </td>
269
 
270
  <td class="more_toggler1">
271
- <input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][cow]" placeholder="MyField" title="<?php _e( 'To edit Abbreviations open General > Switches > Editing Of Abbreviation Fields.', 'woocommerce-checkout-manager' ); ?>" value="<?php echo $options3['billing_buttons'][$i]['cow']; ?>" <?php if ( empty($options['checkness']['abbreviation'])) { echo 'readonly="readonly"'; } ?> <?php if ( in_array($options3['billing_buttons'][$i]['cow'],$htmlbillingabbr) ) { echo 'readonly="readonly" style="pointer-events:none;"'; } ?> />
272
  </td>
9
  ?>
10
 
11
  <td style="display:none; text-align:center;" class="more_toggler1c">
12
+ <input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][more_content]" type="checkbox" value="1" <?php if ( !empty ($field['more_content'])) echo "checked='checked'"; ?> />
13
  </td>
14
 
15
  <td style="display:none;" class="more_toggler1c">
16
+ <input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][single_p]" placeholder="<?php _e('Product ID(s) e.g 1674||1233','woocommerce-checkout-manager'); ?>" value="<?php echo ( !empty( $field['single_p'] ) ? $field['single_p'] : '' ); ?>" />
17
  </td>
18
 
19
  <td style="display:none;" class="more_toggler1c">
20
+ <input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][single_px]" placeholder="<?php _e('Product ID(s) e.g 1674||1233','woocommerce-checkout-manager'); ?>" value="<?php echo ( !empty( $field['single_px'] ) ? $field['single_px'] : '' ); ?>" />
21
  </td>
22
 
23
  <td style="display:none;" class="more_toggler1c">
24
+ <input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][single_p_cat]" placeholder="<?php _e('Category Slug(s) e.g my-cat||my-cat2','woocommerce-checkout-manager'); ?>" value="<?php echo ( !empty( $field['single_p_cat'] ) ? $field['single_p_cat'] : '' ); ?>" />
25
  </td>
26
 
27
  <td style="display:none;" class="more_toggler1c">
28
+ <input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][single_px_cat]" placeholder="<?php _e('Category Slug(s) e.g my-cat||my-cat2','woocommerce-checkout-manager'); ?>" value="<?php echo ( !empty( $field['single_px_cat'] ) ? $field['single_px_cat'] : '' ); ?>" />
29
  </td>
30
 
31
  <td style="display:none;" class="hide_stuff_time">
32
+ <input type="text" placeholder="6" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][start_hour]" value="<?php echo ( !empty( $field['start_hour'] ) ? $field['start_hour'] : '' ); ?>" />
33
  </td>
34
 
35
  <td style="display:none;" class="hide_stuff_time">
36
+ <input type="text" placeholder="9" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][end_hour]" value="<?php echo ( !empty( $field['end_hour'] ) ? $field['end_hour'] : '' ); ?>" />
37
  </td>
38
 
39
  <td style="display:none;" class="hide_stuff_time">
40
+ <input type="text" placeholder="15" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][interval_min]" value="<?php echo ( !empty( $field['interval_min'] ) ? $field['interval_min'] : '' ); ?>" />
41
  </td>
42
 
43
  <td style="display:none;" class="hide_stuff_time">
44
+ <input type="text" placeholder="0, 10, 20, 30, 40" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][manual_min]" value="<?php echo ( !empty( $field['manual_min'] ) ? $field['manual_min'] : '' ); ?>" />
45
  </td>
46
 
47
  <td style="display:none;" class="hide_stuff_color hide_stuff_days">
48
+ <input type="text" placeholder="dd-mm-yy" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][format_date]" value="<?php echo ( !empty( $field['format_date'] ) ? $field['format_date'] : '' ); ?>" />
49
  </td>
50
 
51
  <td style="display:none;" class="hide_stuff_color hide_stuff_days">
52
+ <input type="text" placeholder="+3" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][min_before]" value="<?php echo ( !empty( $field['min_before'] ) ? $field['min_before'] : '' ); ?>" />
53
  </td>
54
 
55
  <td style="display:none;" class="hide_stuff_color hide_stuff_days">
56
+ <input type="text" placeholder="3" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][max_after]" value="<?php echo ( !empty( $field['max_after'] ) ? $field['max_after'] : '' ); ?>" />
57
  </td>
58
 
59
  <td style="display:none; text-align:center;" class="hide_stuff_color daoo">
60
+ <input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][days_disabler]" type="checkbox" value="true" <?php if ( !empty ($field['days_disabler'])) echo "checked='checked'"; ?> />
61
  </td>
62
 
63
  <td style="display:none; text-align:center;" class="hide_stuff_days">
64
+ <input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][days_disabler0]" type="checkbox" value="1" <?php if ( !empty ($field['days_disabler0'])) echo "checked='checked'"; ?> />
65
  </td>
66
 
67
  <td style="display:none; text-align:center;" class="hide_stuff_days">
68
+ <input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][days_disabler1]" type="checkbox" value="1" <?php if ( !empty ($field['days_disabler1'])) echo "checked='checked'"; ?> />
69
  </td>
70
 
71
  <td style="display:none; text-align:center;" class="hide_stuff_days">
72
+ <input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][days_disabler2]" type="checkbox" value="1" <?php if ( !empty ($field['days_disabler2'])) echo "checked='checked'"; ?> />
73
  </td>
74
 
75
  <td style="display:none; text-align:center;" class="hide_stuff_days">
76
+ <input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][days_disabler3]" type="checkbox" value="1" <?php if ( !empty ($field['days_disabler3'])) echo "checked='checked'"; ?> />
77
  </td>
78
 
79
  <td style="display:none; text-align:center;" class="hide_stuff_days">
80
+ <input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][days_disabler4]" type="checkbox" value="1" <?php if ( !empty ($field['days_disabler4'])) echo "checked='checked'"; ?> />
81
  </td>
82
 
83
  <td style="display:none; text-align:center;" class="hide_stuff_days">
84
+ <input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][days_disabler5]" type="checkbox" value="1" <?php if ( !empty ($field['days_disabler5'])) echo "checked='checked'"; ?> />
85
  </td>
86
 
87
  <td style="display:none; text-align:center;" class="hide_stuff_days">
88
+ <input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][days_disabler6]" type="checkbox" value="1" <?php if ( !empty ($field['days_disabler6'])) echo "checked='checked'"; ?> />
89
  </td>
90
 
91
  <td style="display:none;" class="hide_stuff_color hide_stuff_days">
93
  </td>
94
 
95
  <td style="display:none;" class="hide_stuff_color hide_stuff_days">
96
+ <input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][single_yy]" placeholder="<?php _e('2013','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'yy', 'woocommerce-checkout-manager' ); ?>" value="<?php echo ( !empty( $field['single_yy'] ) ? $field['single_yy'] : '' ); ?>" />
97
  </td>
98
 
99
  <td style="display:none;" class="hide_stuff_color hide_stuff_days">
100
+ <input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][single_mm]" placeholder="<?php _e('10','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'mm', 'woocommerce-checkout-manager' ); ?>" value="<?php echo ( !empty( $field['single_mm'] ) ? $field['single_mm'] : '' ); ?>" />
101
  </td>
102
 
103
  <td style="display:none;" class="hide_stuff_color hide_stuff_days">
104
+ <input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][single_dd]" placeholder="<?php _e('25','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'dd', 'woocommerce-checkout-manager' ); ?>" value="<?php echo ( !empty( $field['single_dd'] ) ? $field['single_dd'] : '' ); ?>" />
105
  </td>
106
 
107
  <td style="display:none;" class="hide_stuff_color hide_stuff_days">
109
  </td>
110
 
111
  <td style="display:none;" class="hide_stuff_color hide_stuff_days">
112
+ <input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][single_max_yy]" placeholder="<?php _e('2013','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'yy', 'woocommerce-checkout-manager' ); ?>" value="<?php echo ( !empty( $field['single_max_yy'] ) ? $field['single_max_yy'] : '' ); ?>" />
113
  </td>
114
 
115
  <td style="display:none;" class="hide_stuff_color hide_stuff_days">
116
+ <input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][single_max_mm]" placeholder="<?php _e('10','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'mm', 'woocommerce-checkout-manager' ); ?>" value="<?php echo ( !empty( $field['single_max_mm'] ) ? $field['single_max_mm'] : '' ); ?>" />
117
  </td>
118
 
119
  <td style="display:none;" class="hide_stuff_color hide_stuff_days">
120
+ <input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][single_max_dd]" placeholder="<?php _e('25','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'dd', 'woocommerce-checkout-manager' ); ?>" value="<?php echo ( !empty( $field['single_max_dd'] ) ? $field['single_max_dd'] : '' ); ?>" />
121
  </td>
122
 
123
  <td class="more_toggler1" style="text-align:center;">
124
+ <input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][checkbox]" type="checkbox" title="<?php _e( 'Whether or not the Checkout field is required', 'woocommerce-checkout-manager' ); ?>" value="true" <?php if ( !empty( $field['checkbox'] ) ) echo "checked='checked'"; ?> />
125
  </td>
126
 
127
  <td class="more_toggler1" style="text-align:center;">
128
  <select name="wccs_settings3[billing_buttons][<?php echo $i; ?>][position]" title="<?php _e( 'Placement of the Checkout field', 'woocommerce-checkout-manager' ); ?>"> <!--Call run() function-->
129
+ <option value="form-row-wide" <?php ( !isset( $field['position'] ) ) ? '' : selected( $field['position'], 'form-row-wide' ); ?>><?php _e( 'Wide','woocommerce-checkout-manager' ); ?></option>
130
+ <option value="form-row-first" <?php ( !isset( $field['position'] ) ) ? '' : selected( $field['position'], 'form-row-first' ); ?>><?php _e( 'Left','woocommerce-checkout-manager' ); ?></option>
131
+ <option value="form-row-last" <?php ( !isset( $field['position'] ) ) ? '' : selected( $field['position'], 'form-row-last' ); ?>><?php _e( 'Right','woocommerce-checkout-manager' ); ?></option>
132
  </select>
133
  </td>
134
 
135
  <td class="more_toggler1" style="text-align:center;">
136
+ <input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][clear_row]" type="checkbox" title="<?php _e( 'Applies a clear fix to the Checkout field', 'woocommerce-checkout-manager' ); ?>" value="true" <?php if ( !empty( $field['clear_row'] ) ) echo "checked='checked'"; ?> />
137
  </td>
138
 
139
  <td class="filter_field" style="display:none;text-align:center;">
140
+ <input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][deny_checkout]" type="checkbox" value="true" <?php if( !empty( $field['deny_checkout'] ) ) echo "checked='checked'"; ?> />
141
  </td>
142
 
143
  <td class="filter_field_tog add_amount_field condition_tick hide_stuff_time hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c" style="display:none;">
145
  </td>
146
 
147
  <td class="filter_field" style="display:none;text-align:center;">
148
+ <input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][tax_remove]" type="checkbox" value="true" <?php if ( !empty ($field['tax_remove'])) echo "checked='checked'"; ?> />
149
  </td>
150
 
151
  <td class="filter_field" style="display:none;text-align:center;">
152
+ <input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][deny_receipt]" type="checkbox" value="true" <?php if ( !empty ($field['deny_receipt'])) echo "checked='checked'"; ?> />
153
  </td>
154
 
155
  <td class="filter_field condition_tick hide_stuff_change hide_stuff_time hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c" style="display:none;text-align:center;">
156
+ <input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][add_amount]" type="checkbox" value="true" <?php if ( !empty ($field['add_amount'])) echo "checked='checked'"; ?> />
157
  </td>
158
 
159
  <td class="add_amount_field" style="display:none;text-align:center;">
160
+ <input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][fee_name]" type="text" value="<?php echo ( !empty( $field['fee_name'] ) ? $field['fee_name'] : '' ); ?>" placeholder="<?php _e('My Custom Charge','woocommerce-checkout-manager'); ?>" />
161
  </td>
162
 
163
  <td class="add_amount_field" style="display:none;text-align:center;">
164
+ <input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][add_amount_field]" type="text" value="<?php echo ( !empty( $field['add_amount_field'] ) ? $field['add_amount_field'] : '' ); ?>" placeholder="50" />
165
  </td>
166
 
167
  <td class="filter_field add_amount_field hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_time hide_stuff_color more_toggler1 more_toggler1c" style="display:none;text-align:center;">
168
+ <input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][conditional_parent_use]" type="checkbox" value="true" <?php if ( !empty ($field['conditional_parent_use'])) echo "checked='checked'"; ?> />
169
  </td>
170
 
171
  <td class="condition_tick" style="display:none;text-align:center;">
172
+ <input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][conditional_parent]" type="checkbox" value="true" <?php if ( !empty ($field['conditional_parent'])) echo "checked='checked'"; ?> />
173
  </td>
174
 
175
  <td class="more_toggler1">
176
+ <input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][label]" title="<?php _e( 'Label text for the Checkout field', 'woocommerce-checkout-manager' ); ?>" placeholder="<?php _e('My Field Name','woocommerce-checkout-manager'); ?>" value="<?php echo esc_attr( $field['label'] ); ?>" />
177
  </td>
178
 
179
  <td class="more_toggler1">
180
+ <input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][placeholder]" title="<?php _e( 'Placeholder text for the Checkout field', 'woocommerce-checkout-manager' ); ?>" placeholder="<?php _e('Example red','woocommerce-checkout-manager'); ?>" value="<?php echo ( !empty( $field['placeholder'] ) ? $field['placeholder'] : '' ); ?>" <?php if( $field['cow'] == 'country' || $field['cow'] == 'state' ) { echo 'readonly="readonly"'; } ?> />
181
  </td>
182
 
183
  <td style="display:none;" class="filter_field add_amount_field hide_stuff_time hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c condition_tick add_amount_field">
184
+ <input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][chosen_valt]" placeholder="<?php _e('Yes','woocommerce-checkout-manager'); ?>" value="<?php echo ( !empty( $field['chosen_valt'] ) ? $field['chosen_valt'] : '' ); ?>" />
185
  </td>
186
 
187
  <td style="display:none;" class="condition_tick">
188
+ <input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][conditional_tie]" placeholder="<?php _e('Parent Abbr. Name','woocommerce-checkout-manager'); ?>" value="<?php echo ( !empty( $field['conditional_tie'] ) ? $field['conditional_tie'] : '' ); ?>" />
189
  </td>
190
 
191
  <td style="display:none;" class="filter_field">
192
+ <input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][colorpickerd]" id="billing-colorpic<?php echo $i; ?>" placeholder="<?php _e('#000000','woocommerce-checkout-manager'); ?>" value="<?php echo ( !empty( $field['colorpickerd'] ) ? $field['colorpickerd'] : '' ); ?>" />
193
  </td>
194
 
195
  <td style="display:none;" class="filter_field">
196
  <select name="wccs_settings3[billing_buttons][<?php echo $i; ?>][colorpickertype]">
197
+ <option value="farbtastic" <?php (!isset($field['colorpickertype'])) ? '' : selected( $field['colorpickertype'], 'farbtastic' ); ?>><?php _e('Farbtastic','woocommerce-checkout-manager'); ?></option>
198
+ <option value="iris" <?php (!isset($field['colorpickertype'])) ? '' : selected( $field['colorpickertype'], 'iris' ); ?>><?php _e('Iris','woocommerce-checkout-manager'); ?></option>
199
  </select>
200
  </td>
201
 
202
  <td style="display:none;text-align:center;" class="filter_field">
203
+ <input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][user_role]" type="checkbox" value="user_role" <?php if ( !empty ($field['user_role'])) echo "checked='checked'"; ?> />
204
  </td>
205
 
206
  <td class="filter_field" style="display:none;">
207
+ <input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][role_options]" placeholder="Option 1||Option 2||Option 3" value="<?php echo ( !empty( $field['role_options'] ) ? $field['role_options'] : '' ); ?>" />
208
  </td>
209
 
210
  <td class="filter_field" style="display:none;">
211
+ <input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][role_options2]" placeholder="Option 1||Option 2||Option 3" value="<?php echo ( !empty( $field['role_options2'] ) ? $field['role_options2'] : '' ); ?>" />
212
  </td>
213
 
214
  <td style="display:none;" class="filter_field add_amount_field hide_stuff_time hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c condition_tick add_amount_field">
215
+ <input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][extra_class]" value="<?php echo ( !empty( $field['extra_class'] ) ? $field['extra_class'] : '' ); ?>" />
216
  </td>
217
 
218
  <td style="display:none;text-align:center;" class="hide_stuff_op wccm1">
219
+ <input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][fancy]" type="checkbox" value="country_select" <?php if ( !empty ($field['fancy'])) echo "checked='checked'"; ?> />
220
  </td>
221
 
222
  <td class="hide_stuff_op wccm1" style="display:none;">
223
+ <input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][force_title2]" placeholder="<?php _e('Name Guide','woocommerce-checkout-manager'); ?>" value="<?php echo ( !empty( $field['force_title2'] ) ? $field['force_title2'] : '' ); ?>" />
224
  </td>
225
 
226
  <td class="hide_stuff_op wccm1" style="display:none;">
227
+ <input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][option_array]" placeholder="Option 1||Option 2||Option 3" value="<?php echo ( !empty( $field['option_array'] ) ? $field['option_array'] : '' ); ?>" />
228
  </td>
229
 
230
  <td class="filter_field add_amount_field hide_stuff_time condition_tick hide_stuff_change hide_stuff_opcheck hide_stuff_color more_toggler1 more_toggler1c" style="display:none;">
231
  <?php _e('Options Toggler', 'woocommerce-checkout-manager' ); ?>
232
  </td>
233
 
234
+ <!--<td class="filter_field add_amount_field condition_tick hide_stuff_change hide_stuff_timef hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c" style="display:none;">
235
  <?php _e('Time Toggler', 'woocommerce-checkout-manager' ); ?>
236
  </td>
237
 
238
  <td class="filter_field add_amount_field hide_stuff_time condition_tick hide_stuff_change hide_stuff_opcheck hide_stuff_op more_toggler1 more_toggler1c hide_stuff_days" style="display:none;">
239
+ <?php _e('Date Toggler', 'woocommerce-checkout-manager' ); ?>-->
240
  </td>
241
 
242
  <td style="display:none;" class="filter_field add_amount_field hide_stuff_time condition_tick hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1">
248
  </td>
249
 
250
  <td class="more_toggler1">
251
+ <select name="wccs_settings3[billing_buttons][<?php echo $i; ?>][type]" title="<?php _e( 'Type of the Checkout field', 'woocommerce-checkout-manager' ); ?>" <?php if ( $field['cow'] == 'country' || $field['cow'] == 'state' ) { echo 'readonly="readonly" style="pointer-events:none;"'; } ?> > <!--Call run() function-->
252
+ <option value="wooccmtext" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'wooccmtext' ); ?>><?php _e('Text Input','woocommerce-checkout-manager'); ?></option>
253
+ <option value="wooccmtextarea" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'wooccmtextarea' ); ?>><?php _e('Textarea','woocommerce-checkout-manager'); ?></option>
254
+ <option value="wooccmpassword" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'wooccmpassword' ); ?>><?php _e('Password','woocommerce-checkout-manager'); ?></option>
255
+ <option value="wooccmradio" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'wooccmradio' ); ?>><?php _e('Radio Buttons','woocommerce-checkout-manager'); ?></option>
256
+ <option value="checkbox_wccm" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'checkbox_wccm' ); ?>><?php _e('Check Box','woocommerce-checkout-manager'); ?></option>
257
+ <option value="wooccmselect" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'wooccmselect' ); ?>><?php _e('Select Options','woocommerce-checkout-manager'); ?></option>
258
+ <option value="datepicker" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'datepicker' ); ?>><?php _e('Date Picker','woocommerce-checkout-manager'); ?></option>
259
+ <option value="time" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'time' ); ?>><?php _e('Time Picker','woocommerce-checkout-manager'); ?></option>
260
+ <option value="colorpicker" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'colorpicker' ); ?>><?php _e('Color Picker','woocommerce-checkout-manager'); ?></option>
261
+ <option value="heading" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'heading' ); ?>><?php _e('Heading','woocommerce-checkout-manager'); ?></option>
262
+ <option value="multiselect" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'multiselect' ); ?>><?php _e('Multi-Select','woocommerce-checkout-manager'); ?></option>
263
+ <option value="multicheckbox" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'multicheckbox' ); ?>><?php _e('Multi-Checkbox','woocommerce-checkout-manager'); ?></option>
264
+ <option <?php if ( $field['cow'] == 'country' ) { echo 'selected="selected"'; } ?> value="wooccmcountry" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'wooccmcountry' ); ?>><?php _e('Country','woocommerce-checkout-manager'); ?></option>
265
+ <option <?php if ( $field['cow'] == 'state' ) { echo 'selected="selected"'; } ?> value="wooccmstate" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'wooccmstate' ); ?>><?php _e('State','woocommerce-checkout-manager'); ?></option>
266
+ <option value="wooccmupload" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'wooccmupload' ); ?>><?php _e('File Picker','woocommerce-checkout-manager'); ?></option>
267
  </select>
268
  </td>
269
 
270
  <td class="more_toggler1">
271
+ <input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][cow]" placeholder="MyField" title="<?php _e( 'To edit Abbreviations open General > Switches > Editing Of Abbreviation Fields.', 'woocommerce-checkout-manager' ); ?>" value="<?php echo $field['cow']; ?>" <?php if ( empty($options['checkness']['abbreviation'])) { echo 'readonly="readonly"'; } ?> <?php if ( in_array($field['cow'],$htmlbillingabbr) ) { echo 'readonly="readonly" style="pointer-events:none;"'; } ?> />
272
  </td>
includes/templates/admin/woocheckout-billing-thead.php CHANGED
@@ -116,10 +116,10 @@ if ( !defined( 'ABSPATH' ) ) exit;
116
 
117
  <th style="cursor:pointer;text-align:center;font-size:30px;display:none;" class="filter_field add_amount_field condition_tick hide_stuff_change hide_stuff_time hide_stuff_opcheck hide_stuff_tog hide_stuff_color more_toggler1 more_toggler1c" width="2%"><span class="toggle_shower">&equiv;</span></th>
118
 
119
- <th style="cursor:pointer;text-align:center;font-size:30px;display:none;" class="filter_field add_amount_field condition_tick hide_stuff_opcheck hide_stuff_op hide_stuff_change hide_stuff_time_tog hide_stuff_color more_toggler1 more_toggler1c" width="2%"><span class="toggle_shower">&equiv;</span></th>
120
 
121
  <th style="cursor:pointer;text-align:center;font-size:30px;display:none;" class="filter_field add_amount_field hide_stuff_time condition_tick hide_stuff_change hide_stuff_opcheck hide_stuff_days hide_stuff_color_tog hide_stuff_op more_toggler1 more_toggler1c" width="2%"><span class="toggle_shower">&equiv;</span></th>
122
-
123
  <th style="display:none;cursor:pointer;text-align:center;font-size:30px;" class="filter_field add_amount_field condition_tick hide_stuff_change hide_stuff_opcheck hide_stuff_time hide_stuff_op hide_stuff_color more_toggler1 more_toggler1a" width="2%"><span class="toggle_shower">&equiv;</span></th>
124
 
125
  <th style="cursor:pointer;text-align:center;font-size:30px;" class="filter_field add_amount_field hide_stuff_time condition_tick hide_stuff_change hide_stuff_opcheck hide_stuff_color more_toggler hide_stuff_op more_toggler1c" width="2%"><span class="toggle_shower">&equiv;</span></th>
116
 
117
  <th style="cursor:pointer;text-align:center;font-size:30px;display:none;" class="filter_field add_amount_field condition_tick hide_stuff_change hide_stuff_time hide_stuff_opcheck hide_stuff_tog hide_stuff_color more_toggler1 more_toggler1c" width="2%"><span class="toggle_shower">&equiv;</span></th>
118
 
119
+ <!--<th style="cursor:pointer;text-align:center;font-size:30px;display:none;" class="filter_field add_amount_field condition_tick hide_stuff_opcheck hide_stuff_op hide_stuff_change hide_stuff_time_tog hide_stuff_color more_toggler1 more_toggler1c" width="2%"><span class="toggle_shower">&equiv;</span></th>
120
 
121
  <th style="cursor:pointer;text-align:center;font-size:30px;display:none;" class="filter_field add_amount_field hide_stuff_time condition_tick hide_stuff_change hide_stuff_opcheck hide_stuff_days hide_stuff_color_tog hide_stuff_op more_toggler1 more_toggler1c" width="2%"><span class="toggle_shower">&equiv;</span></th>
122
+ -->
123
  <th style="display:none;cursor:pointer;text-align:center;font-size:30px;" class="filter_field add_amount_field condition_tick hide_stuff_change hide_stuff_opcheck hide_stuff_time hide_stuff_op hide_stuff_color more_toggler1 more_toggler1a" width="2%"><span class="toggle_shower">&equiv;</span></th>
124
 
125
  <th style="cursor:pointer;text-align:center;font-size:30px;" class="filter_field add_amount_field hide_stuff_time condition_tick hide_stuff_change hide_stuff_opcheck hide_stuff_color more_toggler hide_stuff_op more_toggler1c" width="2%"><span class="toggle_shower">&equiv;</span></th>
includes/templates/admin/woocheckout-billing.php CHANGED
@@ -13,43 +13,25 @@
13
  <tbody>
14
 
15
  <?php
16
- if (isset($options3['billing_buttons'])) {
17
- $billing = array(
18
- 'country',
19
- 'first_name',
20
- 'last_name',
21
- 'company',
22
- 'address_1',
23
- 'address_2',
24
- 'city',
25
- 'state',
26
- 'postcode',
27
- 'email',
28
- 'phone'
29
- );
30
- $size = count($options3['billing_buttons']);
31
- // $size = max( array_keys( $options3['billing_buttons'] ) );
32
- for ($i = 0; $i < $size; $i++) {
33
-
34
- /*
35
- if( !isset( $options3['billing_buttons'][$i] ) )
36
- break;
37
- */
38
  ?>
39
 
40
  <tr valign="top" id="wccs-billing-id-<?php echo $i; ?>" class="billing-wccs-row">
41
 
42
  <td style="display:none;" class="billing-wccs-order-hidden" >
43
- <input type="hidden" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][order]" value="<?php echo ( empty($options3['billing_buttons'][$i]['order']) ) ? $i : $options3['billing_buttons'][$i]['order']; ?>" />
44
  </td>
45
  <td class="billing-wccs-order" title="<?php esc_attr_e('Drag-and-drop this Checkout field to adjust its ordering', 'woocommerce-checkout-manager'); ?>"><?php echo $i + 1; ?></td>
46
 
47
  <?php require( WOOCCM_PLUGIN_DIR . 'includes/templates/admin/woocheckout-billing-tbody.php' ); ?>
48
 
49
- <?php if (in_array($options3['billing_buttons'][$i]['cow'], $billing)) { ?>
50
  <td style="text-align:center;">
51
- <?php echo $i . '//' . @$options3['billing_buttons'][$i]['order']; ?>
52
- <input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][disabled]" type="checkbox" value="true" <?php if (!empty($options3['billing_buttons'][$i]['disabled'])) echo "checked='checked'"; ?> />
53
  </td>
54
  <?php } else { ?>
55
  <td class="billing-wccs-remove"><a class="billing-wccs-remove-button" href="javascript:;" title="<?php esc_attr_e('Delete this Checkout field', 'woocommerce-checkout-manager'); ?>">&times;</a></td>
13
  <tbody>
14
 
15
  <?php
16
+ if ($fields = WOOCCM_Fields::get_billing_fields()) {
17
+
18
+ $billing = WOOCCM_Fields::get_default_address_fields();
19
+
20
+ foreach ($fields as $i => $field) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
  ?>
22
 
23
  <tr valign="top" id="wccs-billing-id-<?php echo $i; ?>" class="billing-wccs-row">
24
 
25
  <td style="display:none;" class="billing-wccs-order-hidden" >
26
+ <input type="hidden" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][order]" value="<?php echo ( empty($field['order']) ) ? $i : $field['order']; ?>" />
27
  </td>
28
  <td class="billing-wccs-order" title="<?php esc_attr_e('Drag-and-drop this Checkout field to adjust its ordering', 'woocommerce-checkout-manager'); ?>"><?php echo $i + 1; ?></td>
29
 
30
  <?php require( WOOCCM_PLUGIN_DIR . 'includes/templates/admin/woocheckout-billing-tbody.php' ); ?>
31
 
32
+ <?php if (in_array($field['cow'], $billing)) { ?>
33
  <td style="text-align:center;">
34
+ <input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][disabled]" type="checkbox" value="true" <?php if (!empty($field['disabled'])) echo "checked='checked'"; ?> />
 
35
  </td>
36
  <?php } else { ?>
37
  <td class="billing-wccs-remove"><a class="billing-wccs-remove-button" href="javascript:;" title="<?php esc_attr_e('Delete this Checkout field', 'woocommerce-checkout-manager'); ?>">&times;</a></td>
includes/templates/admin/woocheckout-shipping-tbody.php CHANGED
@@ -9,83 +9,83 @@ if ( !defined( 'ABSPATH' ) ) exit;
9
  ?>
10
 
11
  <td style="display:none; text-align:center;" class="more_toggler1c">
12
- <input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][more_content]" type="checkbox" value="1" <?php if ( !empty ($options2['shipping_buttons'][$i]['more_content'])) echo "checked='checked'"; ?> />
13
  </td>
14
 
15
  <td style="display:none;" class="more_toggler1c">
16
- <input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][single_p]" placeholder="<?php _e('Product ID(s) e.g 1674||1233','woocommerce-checkout-manager'); ?>" value="<?php echo (empty( $options2['shipping_buttons'][$i]['single_p'])) ? '' : $options2['shipping_buttons'][$i]['single_p']; ?>" />
17
  </td>
18
 
19
  <td style="display:none;" class="more_toggler1c">
20
- <input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][single_px]" placeholder="<?php _e('Product ID(s) e.g 1674||1233','woocommerce-checkout-manager'); ?>" value="<?php echo (empty( $options2['shipping_buttons'][$i]['single_px'])) ? '' : $options2['shipping_buttons'][$i]['single_px']; ?>" />
21
  </td>
22
 
23
  <td style="display:none;" class="more_toggler1c">
24
- <input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][single_p_cat]" placeholder="<?php _e('Category Slug(s) e.g my-cat||my-cat2','woocommerce-checkout-manager'); ?>" value="<?php echo (empty( $options2['shipping_buttons'][$i]['single_p_cat'])) ? '' : $options2['shipping_buttons'][$i]['single_p_cat']; ?>" />
25
  </td>
26
 
27
  <td style="display:none;" class="more_toggler1c">
28
- <input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][single_px_cat]" placeholder="<?php _e('Category Slug(s) e.g my-cat||my-cat2','woocommerce-checkout-manager'); ?>" value="<?php echo (empty( $options2['shipping_buttons'][$i]['single_px_cat'])) ? '' : $options2['shipping_buttons'][$i]['single_px_cat']; ?>" />
29
  </td>
30
 
31
  <td style="display:none;" class="hide_stuff_time">
32
- <input type="text" placeholder="6" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][start_hour]" value="<?php echo (empty($options2['shipping_buttons'][$i]['start_hour'])) ? '' : $options2['shipping_buttons'][$i]['start_hour']; ?>" />
33
  </td>
34
 
35
  <td style="display:none;" class="hide_stuff_time">
36
- <input type="text" placeholder="9" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][end_hour]" value="<?php echo (empty($options2['shipping_buttons'][$i]['end_hour'])) ? '' : $options2['shipping_buttons'][$i]['end_hour']; ?>" />
37
  </td>
38
 
39
  <td style="display:none;" class="hide_stuff_time">
40
- <input type="text" placeholder="15" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][interval_min]" value="<?php echo (empty($options2['shipping_buttons'][$i]['interval_min'])) ? '' : $options2['shipping_buttons'][$i]['interval_min']; ?>" />
41
  </td>
42
 
43
  <td style="display:none;" class="hide_stuff_time">
44
- <input type="text" placeholder="0, 10, 20, 30, 40" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][manual_min]" value="<?php echo (empty($options2['shipping_buttons'][$i]['manual_min'])) ? '' : $options2['shipping_buttons'][$i]['manual_min']; ?>" />
45
  </td>
46
 
47
  <td style="display:none;" class="hide_stuff_color hide_stuff_days">
48
- <input type="text" placeholder="dd-mm-yy" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][format_date]" value="<?php echo (empty($options2['shipping_buttons'][$i]['format_date'])) ? '' : $options2['shipping_buttons'][$i]['format_date']; ?>" />
49
  </td>
50
 
51
  <td style="display:none;" class="hide_stuff_color hide_stuff_days">
52
- <input type="text" placeholder="+3" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][min_before]" value="<?php echo (empty($options2['shipping_buttons'][$i]['min_before'])) ? '' : $options2['shipping_buttons'][$i]['min_before']; ?>" />
53
  </td>
54
 
55
  <td style="display:none;" class="hide_stuff_color hide_stuff_days">
56
- <input type="text" placeholder="3" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][max_after]" value="<?php echo (empty( $options2['shipping_buttons'][$i]['max_after'])) ? '' : $options2['shipping_buttons'][$i]['max_after']; ?>" />
57
  </td>
58
 
59
  <td style="display:none; text-align:center;" class="hide_stuff_color daoo">
60
- <input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][days_disabler]" type="checkbox" value="true" <?php if ( !empty ($options2['shipping_buttons'][$i]['days_disabler'])) echo "checked='checked'"; ?> />
61
  </td>
62
 
63
  <td style="display:none; text-align:center;" class="hide_stuff_days">
64
- <input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][days_disabler0]" type="checkbox" value="1" <?php if ( !empty ($options2['shipping_buttons'][$i]['days_disabler0'])) echo "checked='checked'"; ?> />
65
  </td>
66
 
67
  <td style="display:none; text-align:center;" class="hide_stuff_days">
68
- <input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][days_disabler1]" type="checkbox" value="1" <?php if ( !empty ($options2['shipping_buttons'][$i]['days_disabler1'])) echo "checked='checked'"; ?> />
69
  </td>
70
 
71
  <td style="display:none; text-align:center;" class="hide_stuff_days">
72
- <input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][days_disabler2]" type="checkbox" value="1" <?php if ( !empty ($options2['shipping_buttons'][$i]['days_disabler2'])) echo "checked='checked'"; ?> />
73
  </td>
74
 
75
  <td style="display:none; text-align:center;" class="hide_stuff_days">
76
- <input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][days_disabler3]" type="checkbox" value="1" <?php if ( !empty ($options2['shipping_buttons'][$i]['days_disabler3'])) echo "checked='checked'"; ?> />
77
  </td>
78
 
79
  <td style="display:none; text-align:center;" class="hide_stuff_days">
80
- <input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][days_disabler4]" type="checkbox" value="1" <?php if ( !empty ($options2['shipping_buttons'][$i]['days_disabler4'])) echo "checked='checked'"; ?> />
81
  </td>
82
 
83
  <td style="display:none; text-align:center;" class="hide_stuff_days">
84
- <input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][days_disabler5]" type="checkbox" value="1" <?php if ( !empty ($options2['shipping_buttons'][$i]['days_disabler5'])) echo "checked='checked'"; ?> />
85
  </td>
86
 
87
  <td style="display:none; text-align:center;" class="hide_stuff_days">
88
- <input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][days_disabler6]" type="checkbox" value="1" <?php if ( !empty ($options2['shipping_buttons'][$i]['days_disabler6'])) echo "checked='checked'"; ?> />
89
  </td>
90
 
91
  <td style="display:none;" class="hide_stuff_color hide_stuff_days">
@@ -93,15 +93,15 @@ if ( !defined( 'ABSPATH' ) ) exit;
93
  </td>
94
 
95
  <td style="display:none;" class="hide_stuff_color hide_stuff_days">
96
- <input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][single_yy]" placeholder="<?php _e('2013','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'yy', 'woocommerce-checkout-manager' ); ?>" value="<?php echo (empty($options2['shipping_buttons'][$i]['single_yy'])) ? '' : $options2['shipping_buttons'][$i]['single_yy']; ?>" />
97
  </td>
98
 
99
  <td style="display:none;" class="hide_stuff_color hide_stuff_days">
100
- <input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][single_mm]" placeholder="<?php _e('10','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'mm', 'woocommerce-checkout-manager' ); ?>" value="<?php echo (empty($options2['shipping_buttons'][$i]['single_mm'])) ? '' : $options2['shipping_buttons'][$i]['single_mm']; ?>" />
101
  </td>
102
 
103
  <td style="display:none;" class="hide_stuff_color hide_stuff_days">
104
- <input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][single_dd]" placeholder="<?php _e('25','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'dd', 'woocommerce-checkout-manager' ); ?>" value="<?php echo (empty($options2['shipping_buttons'][$i]['single_dd'])) ? '' : $options2['shipping_buttons'][$i]['single_dd']; ?>" />
105
  </td>
106
 
107
  <td style="display:none;" class="hide_stuff_color hide_stuff_days">
@@ -109,35 +109,35 @@ if ( !defined( 'ABSPATH' ) ) exit;
109
  </td>
110
 
111
  <td style="display:none;" class="hide_stuff_color hide_stuff_days">
112
- <input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][single_max_yy]" placeholder="<?php _e('2013','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'yy', 'woocommerce-checkout-manager' ); ?>" value="<?php echo (empty( $options2['shipping_buttons'][$i]['single_max_yy'])) ? '' : $options2['shipping_buttons'][$i]['single_max_yy']; ?>" />
113
  </td>
114
 
115
  <td style="display:none;" class="hide_stuff_color hide_stuff_days">
116
- <input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][single_max_mm]" placeholder="<?php _e('10','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'mm', 'woocommerce-checkout-manager' ); ?>" value="<?php echo (empty( $options2['shipping_buttons'][$i]['single_max_mm'])) ? '' : $options2['shipping_buttons'][$i]['single_max_mm']; ?>" />
117
  </td>
118
 
119
  <td style="display:none;" class="hide_stuff_color hide_stuff_days">
120
- <input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][single_max_dd]" placeholder="<?php _e('25','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'dd', 'woocommerce-checkout-manager' ); ?>" value="<?php echo (empty( $options2['shipping_buttons'][$i]['single_max_dd'])) ? '' : $options2['shipping_buttons'][$i]['single_max_dd']; ?>" />
121
  </td>
122
 
123
  <td class="more_toggler1" style="text-align:center;">
124
- <input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][checkbox]" type="checkbox" title="<?php _e( 'Whether or not the Checkout field is required', 'woocommerce-checkout-manager' ); ?>" value="true" <?php if ( !empty ($options2['shipping_buttons'][$i]['checkbox'])) echo "checked='checked'"; ?> />
125
  </td>
126
 
127
  <td class="more_toggler1" style="text-align:center;">
128
  <select name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][position]" title="<?php _e( 'Placement of the Checkout field', 'woocommerce-checkout-manager' ); ?>"> <!--Call run() function-->
129
- <option value="form-row-wide" <?php ( !isset( $options2['shipping_buttons'][$i]['position'] ) ) ? '' : selected( $options2['shipping_buttons'][$i]['position'], 'form-row-wide' ); ?>><?php _e( 'Wide','woocommerce-checkout-manager' ); ?></option>
130
- <option value="form-row-first" <?php ( !isset( $options2['shipping_buttons'][$i]['position'] ) ) ? '' : selected( $options2['shipping_buttons'][$i]['position'], 'form-row-first' ); ?>><?php _e( 'Left','woocommerce-checkout-manager' ); ?></option>
131
- <option value="form-row-last" <?php ( !isset( $options2['shipping_buttons'][$i]['position'] ) ) ? '' : selected( $options2['shipping_buttons'][$i]['position'], 'form-row-last' ); ?>><?php _e( 'Right','woocommerce-checkout-manager' ); ?></option>
132
  </select>
133
  </td>
134
 
135
  <td class="more_toggler1" style="text-align:center;">
136
- <input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][clear_row]" type="checkbox" title="<?php _e( 'Applies a clear fix to the Checkout field', 'woocommerce-checkout-manager' ); ?>" value="true" <?php if ( !empty ($options2['shipping_buttons'][$i]['clear_row'])) echo "checked='checked'"; ?> />
137
  </td>
138
 
139
  <td class="filter_field" style="display:none;text-align:center;">
140
- <input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][deny_checkout]" type="checkbox" value="true" <?php if ( !empty ($options2['shipping_buttons'][$i]['deny_checkout'])) echo "checked='checked'"; ?> />
141
  </td>
142
 
143
  <td class="filter_field_tog add_amount_field condition_tick hide_stuff_time hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c" style="display:none;">
@@ -145,99 +145,99 @@ if ( !defined( 'ABSPATH' ) ) exit;
145
  </td>
146
 
147
  <td class="filter_field" style="display:none;text-align:center;">
148
- <input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][tax_remove]" type="checkbox" value="true" <?php if ( !empty ($options2['shipping_buttons'][$i]['tax_remove'])) echo "checked='checked'"; ?> />
149
  </td>
150
 
151
  <td class="filter_field" style="display:none;text-align:center;">
152
- <input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][deny_receipt]" type="checkbox" value="true" <?php if ( !empty ($options2['shipping_buttons'][$i]['deny_receipt'])) echo "checked='checked'"; ?> />
153
  </td>
154
 
155
  <td class="filter_field condition_tick hide_stuff_change hide_stuff_time hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c" style="display:none;text-align:center;">
156
- <input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][add_amount]" type="checkbox" value="true" <?php if ( !empty ($options2['shipping_buttons'][$i]['add_amount'])) echo "checked='checked'"; ?> />
157
  </td>
158
 
159
  <td class="add_amount_field" style="display:none;text-align:center;">
160
- <input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][fee_name]" type="text" value="<?php echo ( isset( $options2['shipping_buttons'][$i]['fee_name'] ) ? $options2['shipping_buttons'][$i]['fee_name'] : '' ); ?>" placeholder="<?php _e('My Custom Charge','woocommerce-checkout-manager'); ?>" />
161
  </td>
162
 
163
  <td class="add_amount_field" style="display:none;text-align:center;">
164
- <input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][add_amount_field]" type="text" value="<?php echo ( isset( $options2['shipping_buttons'][$i]['add_amount_field'] ) ? $options2['shipping_buttons'][$i]['add_amount_field'] : '' ); ?>" placeholder="50" />
165
  </td>
166
 
167
  <td class="filter_field add_amount_field hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_time hide_stuff_color more_toggler1 more_toggler1c" style="display:none;text-align:center;">
168
- <input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][conditional_parent_use]" type="checkbox" value="true" <?php if ( !empty ($options2['shipping_buttons'][$i]['conditional_parent_use'])) echo "checked='checked'"; ?> />
169
  </td>
170
 
171
  <td class="condition_tick" style="display:none;text-align:center;">
172
- <input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][conditional_parent]" type="checkbox" value="true" <?php if ( !empty ($options2['shipping_buttons'][$i]['conditional_parent'])) echo "checked='checked'"; ?> />
173
  </td>
174
 
175
  <td class="more_toggler1">
176
- <input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][label]" title="<?php _e( 'Label text for the Checkout field', 'woocommerce-checkout-manager' ); ?>" placeholder="<?php _e('My Field Name','woocommerce-checkout-manager'); ?>" value="<?php echo esc_attr( $options2['shipping_buttons'][$i]['label'] ); ?>" />
177
  </td>
178
 
179
  <td class="more_toggler1">
180
- <input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][placeholder]" title="<?php _e( 'Placeholder text for the Checkout field', 'woocommerce-checkout-manager' ); ?>" placeholder="<?php _e('Example red','woocommerce-checkout-manager'); ?>" value="<?php echo ( empty($options2['shipping_buttons'][$i]['placeholder'])) ? '' : $options2['shipping_buttons'][$i]['placeholder']; ?>" <?php if ( $options2['shipping_buttons'][$i]['cow'] == 'country' || $options2['shipping_buttons'][$i]['cow'] == 'state' ) { echo 'readonly="readonly"'; } ?> />
181
  </td>
182
 
183
  <td style="display:none;" class="filter_field add_amount_field hide_stuff_time hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c condition_tick add_amount_field">
184
- <input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][chosen_valt]" placeholder="<?php _e('Yes','woocommerce-checkout-manager'); ?>" value="<?php echo ( isset( $options2['shipping_buttons'][$i]['chosen_valt'] ) ? $options2['shipping_buttons'][$i]['chosen_valt'] : '' ); ?>" />
185
  </td>
186
 
187
  <td style="display:none;" class="condition_tick">
188
- <input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][conditional_tie]" placeholder="<?php _e('Parent Abbr. Name','woocommerce-checkout-manager'); ?>" value="<?php echo ( isset( $options2['shipping_buttons'][$i]['conditional_tie'] ) ? $options2['shipping_buttons'][$i]['conditional_tie'] : '' ); ?>" />
189
  </td>
190
 
191
  <td style="display:none;" class="filter_field">
192
- <input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][colorpickerd]" id="shipping-colorpic<?php echo $i; ?>" placeholder="<?php _e('#000000','woocommerce-checkout-manager'); ?>" value="<?php echo ( isset( $options2['shipping_buttons'][$i]['colorpickerd'] ) ? $options2['shipping_buttons'][$i]['colorpickerd'] : '' ); ?>" />
193
  </td>
194
 
195
  <td style="display:none;" class="filter_field">
196
  <select name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][colorpickertype]">
197
- <option value="farbtastic" <?php (!isset($options2['shipping_buttons'][$i]['colorpickertype'])) ? '' : selected( $options2['shipping_buttons'][$i]['colorpickertype'], 'farbtastic' ); ?>><?php _e('Farbtastic','woocommerce-checkout-manager'); ?></option>
198
- <option value="iris" <?php (!isset($options2['shipping_buttons'][$i]['colorpickertype'])) ? '' : selected( $options2['shipping_buttons'][$i]['colorpickertype'], 'iris' ); ?>><?php _e('Iris','woocommerce-checkout-manager'); ?></option>
199
  </select>
200
  </td>
201
 
202
  <td style="display:none;text-align:center;" class="filter_field">
203
- <input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][user_role]" type="checkbox" value="user_role" <?php if ( !empty ($options2['shipping_buttons'][$i]['user_role'])) echo "checked='checked'"; ?> />
204
  </td>
205
 
206
  <td class="filter_field" style="display:none;">
207
- <input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][role_options]" placeholder="Option 1||Option 2||Option 3" value="<?php echo ( isset( $options2['shipping_buttons'][$i]['role_options'] ) ? $options2['shipping_buttons'][$i]['role_options'] : '' ); ?>" />
208
  </td>
209
 
210
  <td class="filter_field" style="display:none;">
211
- <input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][role_options2]" placeholder="Option 1||Option 2||Option 3" value="<?php echo ( isset( $options2['shipping_buttons'][$i]['role_options2'] ) ? $options2['shipping_buttons'][$i]['role_options2'] : '' ); ?>" />
212
  </td>
213
 
214
  <td style="display:none;" class="filter_field add_amount_field hide_stuff_time hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c condition_tick add_amount_field">
215
- <input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][extra_class]" value="<?php echo ( isset( $options2['shipping_buttons'][$i]['extra_class'] ) ? $options2['shipping_buttons'][$i]['extra_class'] : '' ); ?>" />
216
  </td>
217
 
218
  <td style="display:none;text-align:center;" class="hide_stuff_op wccm1">
219
- <input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][fancy]" type="checkbox" value="country_select" <?php if ( !empty ($options2['shipping_buttons'][$i]['fancy'])) echo "checked='checked'"; ?> />
220
  </td>
221
 
222
  <td class="hide_stuff_op wccm1" style="display:none;">
223
- <input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][force_title2]" placeholder="<?php _e('Name Guide','woocommerce-checkout-manager'); ?>" value="<?php echo (empty($options2['shipping_buttons'][$i]['force_title2'])) ? '' : $options2['shipping_buttons'][$i]['force_title2']; ?>" />
224
  </td>
225
 
226
  <td class="hide_stuff_op wccm1" style="display:none;">
227
- <input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][option_array]" placeholder="Option 1||Option 2||Option 3" value="<?php echo ( isset( $options2['shipping_buttons'][$i]['option_array'] ) ? $options2['shipping_buttons'][$i]['option_array'] : '' ); ?>" />
228
  </td>
229
 
230
  <td class="filter_field add_amount_field hide_stuff_time condition_tick hide_stuff_change hide_stuff_opcheck hide_stuff_color more_toggler1 more_toggler1c" style="display:none;">
231
  <?php _e('Options Toggler', 'woocommerce-checkout-manager' ); ?>
232
  </td>
233
 
234
- <td class="filter_field add_amount_field condition_tick hide_stuff_change hide_stuff_timef hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c" style="display:none;">
235
  <?php _e('Time Toggler', 'woocommerce-checkout-manager' ); ?>
236
  </td>
237
 
238
  <td class="filter_field add_amount_field hide_stuff_time condition_tick hide_stuff_change hide_stuff_opcheck hide_stuff_op more_toggler1 more_toggler1c hide_stuff_days" style="display:none;">
239
  <?php _e('Date Toggler', 'woocommerce-checkout-manager' ); ?>
240
- </td>
241
 
242
  <td style="display:none;" class="filter_field add_amount_field hide_stuff_time condition_tick hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1">
243
  <?php _e('Hidden Toggler', 'woocommerce-checkout-manager' ); ?>
@@ -248,25 +248,25 @@ if ( !defined( 'ABSPATH' ) ) exit;
248
  </td>
249
 
250
  <td class="more_toggler1">
251
- <select name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][type]" title="<?php _e( 'Type of the Checkout field', 'woocommerce-checkout-manager' ); ?>" <?php if ( $options2['shipping_buttons'][$i]['cow'] == 'country' || $options2['shipping_buttons'][$i]['cow'] == 'state' ) { echo 'readonly="readonly" style="pointer-events:none;"'; } ?> > <!--Call run() function-->
252
- <option value="wooccmtext" <?php (!isset($options2['shipping_buttons'][$i]['type'])) ? '' : selected( $options2['shipping_buttons'][$i]['type'], 'wooccmtext' ); ?>><?php _e('Text Input','woocommerce-checkout-manager'); ?></option>
253
- <option value="wooccmtextarea" <?php (!isset($options2['shipping_buttons'][$i]['type'])) ? '' : selected( $options2['shipping_buttons'][$i]['type'], 'wooccmtextarea' ); ?>><?php _e('Textarea','woocommerce-checkout-manager'); ?></option>
254
- <option value="wooccmpassword" <?php (!isset($options2['shipping_buttons'][$i]['type'])) ? '' : selected( $options2['shipping_buttons'][$i]['type'], 'wooccmpassword' ); ?>><?php _e('Password','woocommerce-checkout-manager'); ?></option>
255
- <option value="wooccmradio" <?php (!isset($options2['shipping_buttons'][$i]['type'])) ? '' : selected( $options2['shipping_buttons'][$i]['type'], 'wooccmradio' ); ?>><?php _e('Radio Buttons','woocommerce-checkout-manager'); ?></option>
256
- <option value="checkbox_wccm" <?php (!isset($options2['shipping_buttons'][$i]['type'])) ? '' : selected( $options2['shipping_buttons'][$i]['type'], 'checkbox_wccm' ); ?>><?php _e('Check Box','woocommerce-checkout-manager'); ?></option>
257
- <option value="wooccmselect" <?php (!isset($options2['shipping_buttons'][$i]['type'])) ? '' : selected( $options2['shipping_buttons'][$i]['type'], 'wooccmselect' ); ?>><?php _e('Select Options','woocommerce-checkout-manager'); ?></option>
258
- <option value="datepicker" <?php (!isset($options2['shipping_buttons'][$i]['type'])) ? '' : selected( $options2['shipping_buttons'][$i]['type'], 'datepicker' ); ?>><?php _e('Date Picker','woocommerce-checkout-manager'); ?></option>
259
- <option value="time" <?php (!isset($options2['shipping_buttons'][$i]['type'])) ? '' : selected( $options2['shipping_buttons'][$i]['type'], 'time' ); ?>><?php _e('Time Picker','woocommerce-checkout-manager'); ?></option>
260
- <option value="colorpicker" <?php (!isset($options2['shipping_buttons'][$i]['type'])) ? '' : selected( $options2['shipping_buttons'][$i]['type'], 'colorpicker' ); ?>><?php _e('Color Picker','woocommerce-checkout-manager'); ?></option>
261
- <option value="heading" <?php (!isset($options2['shipping_buttons'][$i]['type'])) ? '' : selected( $options2['shipping_buttons'][$i]['type'], 'heading' ); ?>><?php _e('Heading','woocommerce-checkout-manager'); ?></option>
262
- <option value="multiselect" <?php (!isset($options2['shipping_buttons'][$i]['type'])) ? '' : selected( $options2['shipping_buttons'][$i]['type'], 'multiselect' ); ?>><?php _e('Multi-Select','woocommerce-checkout-manager'); ?></option>
263
- <option value="multicheckbox" <?php (!isset($options2['shipping_buttons'][$i]['type'])) ? '' : selected( $options2['shipping_buttons'][$i]['type'], 'multicheckbox' ); ?>><?php _e('Multi-Checkbox','woocommerce-checkout-manager'); ?></option>
264
- <option <?php if ( $options2['shipping_buttons'][$i]['cow'] == 'country' ) { echo 'selected="selected"'; } ?> value="wooccmcountry" <?php (!isset($options2['shipping_buttons'][$i]['type'])) ? '' : selected( $options2['shipping_buttons'][$i]['type'], 'wooccmcountry' ); ?>><?php _e('Country','woocommerce-checkout-manager'); ?></option>
265
- <option <?php if ( $options2['shipping_buttons'][$i]['cow'] == 'state' ) { echo 'selected="selected"'; } ?> value="wooccmstate" <?php (!isset($options2['shipping_buttons'][$i]['type'])) ? '' : selected( $options2['shipping_buttons'][$i]['type'], 'wooccmstate' ); ?>><?php _e('State','woocommerce-checkout-manager'); ?></option>
266
- <option value="wooccmupload" <?php (!isset($options2['shipping_buttons'][$i]['type'])) ? '' : selected( $options2['shipping_buttons'][$i]['type'], 'wooccmupload' ); ?>><?php _e('File Picker','woocommerce-checkout-manager'); ?></option>
267
  </select>
268
  </td>
269
 
270
  <td class="more_toggler1">
271
- <input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][cow]" placeholder="MyField" title="<?php _e( 'To edit Abbreviations open General > Switches > Editing Of Abbreviation Fields.', 'woocommerce-checkout-manager' ); ?>" value="<?php echo $options2['shipping_buttons'][$i]['cow']; ?>" <?php if ( empty($options['checkness']['abbreviation'])) { echo 'readonly="readonly"'; } ?> <?php if ( in_array($options2['shipping_buttons'][$i]['cow'], $htmlshippingabbr ) ) { echo 'readonly="readonly" style="pointer-events:none;"'; } ?> />
272
  </td>
9
  ?>
10
 
11
  <td style="display:none; text-align:center;" class="more_toggler1c">
12
+ <input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][more_content]" type="checkbox" value="1" <?php if ( !empty ($field['more_content'])) echo "checked='checked'"; ?> />
13
  </td>
14
 
15
  <td style="display:none;" class="more_toggler1c">
16
+ <input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][single_p]" placeholder="<?php _e('Product ID(s) e.g 1674||1233','woocommerce-checkout-manager'); ?>" value="<?php echo (empty( $field['single_p'])) ? '' : $field['single_p']; ?>" />
17
  </td>
18
 
19
  <td style="display:none;" class="more_toggler1c">
20
+ <input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][single_px]" placeholder="<?php _e('Product ID(s) e.g 1674||1233','woocommerce-checkout-manager'); ?>" value="<?php echo (empty( $field['single_px'])) ? '' : $field['single_px']; ?>" />
21
  </td>
22
 
23
  <td style="display:none;" class="more_toggler1c">
24
+ <input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][single_p_cat]" placeholder="<?php _e('Category Slug(s) e.g my-cat||my-cat2','woocommerce-checkout-manager'); ?>" value="<?php echo (empty( $field['single_p_cat'])) ? '' : $field['single_p_cat']; ?>" />
25
  </td>
26
 
27
  <td style="display:none;" class="more_toggler1c">
28
+ <input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][single_px_cat]" placeholder="<?php _e('Category Slug(s) e.g my-cat||my-cat2','woocommerce-checkout-manager'); ?>" value="<?php echo (empty( $field['single_px_cat'])) ? '' : $field['single_px_cat']; ?>" />
29
  </td>
30
 
31
  <td style="display:none;" class="hide_stuff_time">
32
+ <input type="text" placeholder="6" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][start_hour]" value="<?php echo (empty($field['start_hour'])) ? '' : $field['start_hour']; ?>" />
33
  </td>
34
 
35
  <td style="display:none;" class="hide_stuff_time">
36
+ <input type="text" placeholder="9" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][end_hour]" value="<?php echo (empty($field['end_hour'])) ? '' : $field['end_hour']; ?>" />
37
  </td>
38
 
39
  <td style="display:none;" class="hide_stuff_time">
40
+ <input type="text" placeholder="15" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][interval_min]" value="<?php echo (empty($field['interval_min'])) ? '' : $field['interval_min']; ?>" />
41
  </td>
42
 
43
  <td style="display:none;" class="hide_stuff_time">
44
+ <input type="text" placeholder="0, 10, 20, 30, 40" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][manual_min]" value="<?php echo (empty($field['manual_min'])) ? '' : $field['manual_min']; ?>" />
45
  </td>
46
 
47
  <td style="display:none;" class="hide_stuff_color hide_stuff_days">
48
+ <input type="text" placeholder="dd-mm-yy" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][format_date]" value="<?php echo (empty($field['format_date'])) ? '' : $field['format_date']; ?>" />
49
  </td>
50
 
51
  <td style="display:none;" class="hide_stuff_color hide_stuff_days">
52
+ <input type="text" placeholder="+3" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][min_before]" value="<?php echo (empty($field['min_before'])) ? '' : $field['min_before']; ?>" />
53
  </td>
54
 
55
  <td style="display:none;" class="hide_stuff_color hide_stuff_days">
56
+ <input type="text" placeholder="3" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][max_after]" value="<?php echo (empty( $field['max_after'])) ? '' : $field['max_after']; ?>" />
57
  </td>
58
 
59
  <td style="display:none; text-align:center;" class="hide_stuff_color daoo">
60
+ <input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][days_disabler]" type="checkbox" value="true" <?php if ( !empty ($field['days_disabler'])) echo "checked='checked'"; ?> />
61
  </td>
62
 
63
  <td style="display:none; text-align:center;" class="hide_stuff_days">
64
+ <input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][days_disabler0]" type="checkbox" value="1" <?php if ( !empty ($field['days_disabler0'])) echo "checked='checked'"; ?> />
65
  </td>
66
 
67
  <td style="display:none; text-align:center;" class="hide_stuff_days">
68
+ <input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][days_disabler1]" type="checkbox" value="1" <?php if ( !empty ($field['days_disabler1'])) echo "checked='checked'"; ?> />
69
  </td>
70
 
71
  <td style="display:none; text-align:center;" class="hide_stuff_days">
72
+ <input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][days_disabler2]" type="checkbox" value="1" <?php if ( !empty ($field['days_disabler2'])) echo "checked='checked'"; ?> />
73
  </td>
74
 
75
  <td style="display:none; text-align:center;" class="hide_stuff_days">
76
+ <input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][days_disabler3]" type="checkbox" value="1" <?php if ( !empty ($field['days_disabler3'])) echo "checked='checked'"; ?> />
77
  </td>
78
 
79
  <td style="display:none; text-align:center;" class="hide_stuff_days">
80
+ <input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][days_disabler4]" type="checkbox" value="1" <?php if ( !empty ($field['days_disabler4'])) echo "checked='checked'"; ?> />
81
  </td>
82
 
83
  <td style="display:none; text-align:center;" class="hide_stuff_days">
84
+ <input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][days_disabler5]" type="checkbox" value="1" <?php if ( !empty ($field['days_disabler5'])) echo "checked='checked'"; ?> />
85
  </td>
86
 
87
  <td style="display:none; text-align:center;" class="hide_stuff_days">
88
+ <input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][days_disabler6]" type="checkbox" value="1" <?php if ( !empty ($field['days_disabler6'])) echo "checked='checked'"; ?> />
89
  </td>
90
 
91
  <td style="display:none;" class="hide_stuff_color hide_stuff_days">
93
  </td>
94
 
95
  <td style="display:none;" class="hide_stuff_color hide_stuff_days">
96
+ <input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][single_yy]" placeholder="<?php _e('2013','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'yy', 'woocommerce-checkout-manager' ); ?>" value="<?php echo (empty($field['single_yy'])) ? '' : $field['single_yy']; ?>" />
97
  </td>
98
 
99
  <td style="display:none;" class="hide_stuff_color hide_stuff_days">
100
+ <input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][single_mm]" placeholder="<?php _e('10','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'mm', 'woocommerce-checkout-manager' ); ?>" value="<?php echo (empty($field['single_mm'])) ? '' : $field['single_mm']; ?>" />
101
  </td>
102
 
103
  <td style="display:none;" class="hide_stuff_color hide_stuff_days">
104
+ <input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][single_dd]" placeholder="<?php _e('25','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'dd', 'woocommerce-checkout-manager' ); ?>" value="<?php echo (empty($field['single_dd'])) ? '' : $field['single_dd']; ?>" />
105
  </td>
106
 
107
  <td style="display:none;" class="hide_stuff_color hide_stuff_days">
109
  </td>
110
 
111
  <td style="display:none;" class="hide_stuff_color hide_stuff_days">
112
+ <input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][single_max_yy]" placeholder="<?php _e('2013','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'yy', 'woocommerce-checkout-manager' ); ?>" value="<?php echo (empty( $field['single_max_yy'])) ? '' : $field['single_max_yy']; ?>" />
113
  </td>
114
 
115
  <td style="display:none;" class="hide_stuff_color hide_stuff_days">
116
+ <input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][single_max_mm]" placeholder="<?php _e('10','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'mm', 'woocommerce-checkout-manager' ); ?>" value="<?php echo (empty( $field['single_max_mm'])) ? '' : $field['single_max_mm']; ?>" />
117
  </td>
118
 
119
  <td style="display:none;" class="hide_stuff_color hide_stuff_days">
120
+ <input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][single_max_dd]" placeholder="<?php _e('25','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'dd', 'woocommerce-checkout-manager' ); ?>" value="<?php echo (empty( $field['single_max_dd'])) ? '' : $field['single_max_dd']; ?>" />
121
  </td>
122
 
123
  <td class="more_toggler1" style="text-align:center;">
124
+ <input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][checkbox]" type="checkbox" title="<?php _e( 'Whether or not the Checkout field is required', 'woocommerce-checkout-manager' ); ?>" value="true" <?php if ( !empty ($field['checkbox'])) echo "checked='checked'"; ?> />
125
  </td>
126
 
127
  <td class="more_toggler1" style="text-align:center;">
128
  <select name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][position]" title="<?php _e( 'Placement of the Checkout field', 'woocommerce-checkout-manager' ); ?>"> <!--Call run() function-->
129
+ <option value="form-row-wide" <?php ( !isset( $field['position'] ) ) ? '' : selected( $field['position'], 'form-row-wide' ); ?>><?php _e( 'Wide','woocommerce-checkout-manager' ); ?></option>
130
+ <option value="form-row-first" <?php ( !isset( $field['position'] ) ) ? '' : selected( $field['position'], 'form-row-first' ); ?>><?php _e( 'Left','woocommerce-checkout-manager' ); ?></option>
131
+ <option value="form-row-last" <?php ( !isset( $field['position'] ) ) ? '' : selected( $field['position'], 'form-row-last' ); ?>><?php _e( 'Right','woocommerce-checkout-manager' ); ?></option>
132
  </select>
133
  </td>
134
 
135
  <td class="more_toggler1" style="text-align:center;">
136
+ <input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][clear_row]" type="checkbox" title="<?php _e( 'Applies a clear fix to the Checkout field', 'woocommerce-checkout-manager' ); ?>" value="true" <?php if ( !empty ($field['clear_row'])) echo "checked='checked'"; ?> />
137
  </td>
138
 
139
  <td class="filter_field" style="display:none;text-align:center;">
140
+ <input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][deny_checkout]" type="checkbox" value="true" <?php if ( !empty ($field['deny_checkout'])) echo "checked='checked'"; ?> />
141
  </td>
142
 
143
  <td class="filter_field_tog add_amount_field condition_tick hide_stuff_time hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c" style="display:none;">
145
  </td>
146
 
147
  <td class="filter_field" style="display:none;text-align:center;">
148
+ <input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][tax_remove]" type="checkbox" value="true" <?php if ( !empty ($field['tax_remove'])) echo "checked='checked'"; ?> />
149
  </td>
150
 
151
  <td class="filter_field" style="display:none;text-align:center;">
152
+ <input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][deny_receipt]" type="checkbox" value="true" <?php if ( !empty ($field['deny_receipt'])) echo "checked='checked'"; ?> />
153
  </td>
154
 
155
  <td class="filter_field condition_tick hide_stuff_change hide_stuff_time hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c" style="display:none;text-align:center;">
156
+ <input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][add_amount]" type="checkbox" value="true" <?php if ( !empty ($field['add_amount'])) echo "checked='checked'"; ?> />
157
  </td>
158
 
159
  <td class="add_amount_field" style="display:none;text-align:center;">
160
+ <input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][fee_name]" type="text" value="<?php echo ( isset( $field['fee_name'] ) ? $field['fee_name'] : '' ); ?>" placeholder="<?php _e('My Custom Charge','woocommerce-checkout-manager'); ?>" />
161
  </td>
162
 
163
  <td class="add_amount_field" style="display:none;text-align:center;">
164
+ <input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][add_amount_field]" type="text" value="<?php echo ( isset( $field['add_amount_field'] ) ? $field['add_amount_field'] : '' ); ?>" placeholder="50" />
165
  </td>
166
 
167
  <td class="filter_field add_amount_field hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_time hide_stuff_color more_toggler1 more_toggler1c" style="display:none;text-align:center;">
168
+ <input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][conditional_parent_use]" type="checkbox" value="true" <?php if ( !empty ($field['conditional_parent_use'])) echo "checked='checked'"; ?> />
169
  </td>
170
 
171
  <td class="condition_tick" style="display:none;text-align:center;">
172
+ <input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][conditional_parent]" type="checkbox" value="true" <?php if ( !empty ($field['conditional_parent'])) echo "checked='checked'"; ?> />
173
  </td>
174
 
175
  <td class="more_toggler1">
176
+ <input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][label]" title="<?php _e( 'Label text for the Checkout field', 'woocommerce-checkout-manager' ); ?>" placeholder="<?php _e('My Field Name','woocommerce-checkout-manager'); ?>" value="<?php echo esc_attr( $field['label'] ); ?>" />
177
  </td>
178
 
179
  <td class="more_toggler1">
180
+ <input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][placeholder]" title="<?php _e( 'Placeholder text for the Checkout field', 'woocommerce-checkout-manager' ); ?>" placeholder="<?php _e('Example red','woocommerce-checkout-manager'); ?>" value="<?php echo ( empty($field['placeholder'])) ? '' : $field['placeholder']; ?>" <?php if ( $field['cow'] == 'country' || $field['cow'] == 'state' ) { echo 'readonly="readonly"'; } ?> />
181
  </td>
182
 
183
  <td style="display:none;" class="filter_field add_amount_field hide_stuff_time hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c condition_tick add_amount_field">
184
+ <input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][chosen_valt]" placeholder="<?php _e('Yes','woocommerce-checkout-manager'); ?>" value="<?php echo ( isset( $field['chosen_valt'] ) ? $field['chosen_valt'] : '' ); ?>" />
185
  </td>
186
 
187
  <td style="display:none;" class="condition_tick">
188
+ <input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][conditional_tie]" placeholder="<?php _e('Parent Abbr. Name','woocommerce-checkout-manager'); ?>" value="<?php echo ( isset( $field['conditional_tie'] ) ? $field['conditional_tie'] : '' ); ?>" />
189
  </td>
190
 
191
  <td style="display:none;" class="filter_field">
192
+ <input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][colorpickerd]" id="shipping-colorpic<?php echo $i; ?>" placeholder="<?php _e('#000000','woocommerce-checkout-manager'); ?>" value="<?php echo ( isset( $field['colorpickerd'] ) ? $field['colorpickerd'] : '' ); ?>" />
193
  </td>
194
 
195
  <td style="display:none;" class="filter_field">
196
  <select name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][colorpickertype]">
197
+ <option value="farbtastic" <?php (!isset($field['colorpickertype'])) ? '' : selected( $field['colorpickertype'], 'farbtastic' ); ?>><?php _e('Farbtastic','woocommerce-checkout-manager'); ?></option>
198
+ <option value="iris" <?php (!isset($field['colorpickertype'])) ? '' : selected( $field['colorpickertype'], 'iris' ); ?>><?php _e('Iris','woocommerce-checkout-manager'); ?></option>
199
  </select>
200
  </td>
201
 
202
  <td style="display:none;text-align:center;" class="filter_field">
203
+ <input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][user_role]" type="checkbox" value="user_role" <?php if ( !empty ($field['user_role'])) echo "checked='checked'"; ?> />
204
  </td>
205
 
206
  <td class="filter_field" style="display:none;">
207
+ <input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][role_options]" placeholder="Option 1||Option 2||Option 3" value="<?php echo ( isset( $field['role_options'] ) ? $field['role_options'] : '' ); ?>" />
208
  </td>
209
 
210
  <td class="filter_field" style="display:none;">
211
+ <input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][role_options2]" placeholder="Option 1||Option 2||Option 3" value="<?php echo ( isset( $field['role_options2'] ) ? $field['role_options2'] : '' ); ?>" />
212
  </td>
213
 
214
  <td style="display:none;" class="filter_field add_amount_field hide_stuff_time hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c condition_tick add_amount_field">
215
+ <input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][extra_class]" value="<?php echo ( isset( $field['extra_class'] ) ? $field['extra_class'] : '' ); ?>" />
216
  </td>
217
 
218
  <td style="display:none;text-align:center;" class="hide_stuff_op wccm1">
219
+ <input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][fancy]" type="checkbox" value="country_select" <?php if ( !empty ($field['fancy'])) echo "checked='checked'"; ?> />
220
  </td>
221
 
222
  <td class="hide_stuff_op wccm1" style="display:none;">
223
+ <input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][force_title2]" placeholder="<?php _e('Name Guide','woocommerce-checkout-manager'); ?>" value="<?php echo (empty($field['force_title2'])) ? '' : $field['force_title2']; ?>" />
224
  </td>
225
 
226
  <td class="hide_stuff_op wccm1" style="display:none;">
227
+ <input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][option_array]" placeholder="Option 1||Option 2||Option 3" value="<?php echo ( isset( $field['option_array'] ) ? $field['option_array'] : '' ); ?>" />
228
  </td>
229
 
230
  <td class="filter_field add_amount_field hide_stuff_time condition_tick hide_stuff_change hide_stuff_opcheck hide_stuff_color more_toggler1 more_toggler1c" style="display:none;">
231
  <?php _e('Options Toggler', 'woocommerce-checkout-manager' ); ?>
232
  </td>
233
 
234
+ <!--<td class="filter_field add_amount_field condition_tick hide_stuff_change hide_stuff_timef hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c" style="display:none;">
235
  <?php _e('Time Toggler', 'woocommerce-checkout-manager' ); ?>
236
  </td>
237
 
238
  <td class="filter_field add_amount_field hide_stuff_time condition_tick hide_stuff_change hide_stuff_opcheck hide_stuff_op more_toggler1 more_toggler1c hide_stuff_days" style="display:none;">
239
  <?php _e('Date Toggler', 'woocommerce-checkout-manager' ); ?>
240
+ </td>-->
241
 
242
  <td style="display:none;" class="filter_field add_amount_field hide_stuff_time condition_tick hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1">
243
  <?php _e('Hidden Toggler', 'woocommerce-checkout-manager' ); ?>
248
  </td>
249
 
250
  <td class="more_toggler1">
251
+ <select name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][type]" title="<?php _e( 'Type of the Checkout field', 'woocommerce-checkout-manager' ); ?>" <?php if ( $field['cow'] == 'country' || $field['cow'] == 'state' ) { echo 'readonly="readonly" style="pointer-events:none;"'; } ?> > <!--Call run() function-->
252
+ <option value="wooccmtext" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'wooccmtext' ); ?>><?php _e('Text Input','woocommerce-checkout-manager'); ?></option>
253
+ <option value="wooccmtextarea" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'wooccmtextarea' ); ?>><?php _e('Textarea','woocommerce-checkout-manager'); ?></option>
254
+ <option value="wooccmpassword" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'wooccmpassword' ); ?>><?php _e('Password','woocommerce-checkout-manager'); ?></option>
255
+ <option value="wooccmradio" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'wooccmradio' ); ?>><?php _e('Radio Buttons','woocommerce-checkout-manager'); ?></option>
256
+ <option value="checkbox_wccm" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'checkbox_wccm' ); ?>><?php _e('Check Box','woocommerce-checkout-manager'); ?></option>
257
+ <option value="wooccmselect" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'wooccmselect' ); ?>><?php _e('Select Options','woocommerce-checkout-manager'); ?></option>
258
+ <option value="datepicker" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'datepicker' ); ?>><?php _e('Date Picker','woocommerce-checkout-manager'); ?></option>
259
+ <option value="time" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'time' ); ?>><?php _e('Time Picker','woocommerce-checkout-manager'); ?></option>
260
+ <option value="colorpicker" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'colorpicker' ); ?>><?php _e('Color Picker','woocommerce-checkout-manager'); ?></option>
261
+ <option value="heading" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'heading' ); ?>><?php _e('Heading','woocommerce-checkout-manager'); ?></option>
262
+ <option value="multiselect" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'multiselect' ); ?>><?php _e('Multi-Select','woocommerce-checkout-manager'); ?></option>
263
+ <option value="multicheckbox" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'multicheckbox' ); ?>><?php _e('Multi-Checkbox','woocommerce-checkout-manager'); ?></option>
264
+ <option <?php if ( $field['cow'] == 'country' ) { echo 'selected="selected"'; } ?> value="wooccmcountry" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'wooccmcountry' ); ?>><?php _e('Country','woocommerce-checkout-manager'); ?></option>
265
+ <option <?php if ( $field['cow'] == 'state' ) { echo 'selected="selected"'; } ?> value="wooccmstate" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'wooccmstate' ); ?>><?php _e('State','woocommerce-checkout-manager'); ?></option>
266
+ <option value="wooccmupload" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'wooccmupload' ); ?>><?php _e('File Picker','woocommerce-checkout-manager'); ?></option>
267
  </select>
268
  </td>
269
 
270
  <td class="more_toggler1">
271
+ <input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][cow]" placeholder="MyField" title="<?php _e( 'To edit Abbreviations open General > Switches > Editing Of Abbreviation Fields.', 'woocommerce-checkout-manager' ); ?>" value="<?php echo $field['cow']; ?>" <?php if ( empty($options['checkness']['abbreviation'])) { echo 'readonly="readonly"'; } ?> <?php if ( in_array($field['cow'], $htmlshippingabbr ) ) { echo 'readonly="readonly" style="pointer-events:none;"'; } ?> />
272
  </td>
includes/templates/admin/woocheckout-shipping-thead.php CHANGED
@@ -115,9 +115,9 @@ if ( !defined( 'ABSPATH' ) ) exit;
115
 
116
  <th style="cursor:pointer;text-align:center;font-size:30px;display:none;" class="filter_field add_amount_field condition_tick hide_stuff_change hide_stuff_time hide_stuff_opcheck hide_stuff_tog hide_stuff_color more_toggler1 more_toggler1c" width="2%"><span class="toggle_shower">&equiv;</span></th>
117
 
118
- <th style="cursor:pointer;text-align:center;font-size:30px;display:none;" class="filter_field add_amount_field condition_tick hide_stuff_opcheck hide_stuff_op hide_stuff_change hide_stuff_time_tog hide_stuff_color more_toggler1 more_toggler1c" width="2%"><span class="toggle_shower">&equiv;</span></th>
119
 
120
- <th style="cursor:pointer;text-align:center;font-size:30px;display:none;" class="filter_field add_amount_field hide_stuff_time condition_tick hide_stuff_change hide_stuff_opcheck hide_stuff_days hide_stuff_color_tog hide_stuff_op more_toggler1 more_toggler1c" width="2%"><span class="toggle_shower">&equiv;</span></th>
121
 
122
  <th style="display:none;cursor:pointer;text-align:center;font-size:30px;" class="filter_field add_amount_field condition_tick hide_stuff_change hide_stuff_opcheck hide_stuff_time hide_stuff_op hide_stuff_color more_toggler1 more_toggler1a" width="2%"><span class="toggle_shower">&equiv;</span></th>
123
 
115
 
116
  <th style="cursor:pointer;text-align:center;font-size:30px;display:none;" class="filter_field add_amount_field condition_tick hide_stuff_change hide_stuff_time hide_stuff_opcheck hide_stuff_tog hide_stuff_color more_toggler1 more_toggler1c" width="2%"><span class="toggle_shower">&equiv;</span></th>
117
 
118
+ <!--<th style="cursor:pointer;text-align:center;font-size:30px;display:none;" class="filter_field add_amount_field condition_tick hide_stuff_opcheck hide_stuff_op hide_stuff_change hide_stuff_time_tog hide_stuff_color more_toggler1 more_toggler1c" width="2%"><span class="toggle_shower">&equiv;</span></th>
119
 
120
+ <th style="cursor:pointer;text-align:center;font-size:30px;display:none;" class="filter_field add_amount_field hide_stuff_time condition_tick hide_stuff_change hide_stuff_opcheck hide_stuff_days hide_stuff_color_tog hide_stuff_op more_toggler1 more_toggler1c" width="2%"><span class="toggle_shower">&equiv;</span></th>-->
121
 
122
  <th style="display:none;cursor:pointer;text-align:center;font-size:30px;" class="filter_field add_amount_field condition_tick hide_stuff_change hide_stuff_opcheck hide_stuff_time hide_stuff_op hide_stuff_color more_toggler1 more_toggler1a" width="2%"><span class="toggle_shower">&equiv;</span></th>
123
 
includes/templates/admin/woocheckout-shipping.php CHANGED
@@ -1,88 +1,82 @@
1
  <table class="widefat shipping-wccs-table shipping-semi" style="display:none;" border="1" name="shipping_table">
2
- <thead>
3
-
4
- <tr>
5
- <th style="width:3%;" class="shipping-wccs-order" title="<?php esc_attr_e( 'Change the order of Checkout fields', 'woocommerce-checkout-manager' ); ?>">#</th>
6
-
7
- <?php require( WOOCCM_PLUGIN_DIR.'includes/templates/admin/woocheckout-shipping-thead.php' ); ?>
8
-
9
- <th width="1%" scope="col" title="<?php esc_attr_e( 'Remove button', 'woocommerce-checkout-manager' ); ?>"><strong>X</strong><!-- remove --></th>
10
- </tr>
11
-
12
- </thead>
13
- <tbody>
14
-
15
- <?php
16
- if( isset( $options2['shipping_buttons'] ) ) {
17
- $shipping = array(
18
- 'country',
19
- 'first_name',
20
- 'last_name',
21
- 'company',
22
- 'address_1',
23
- 'address_2',
24
- 'city',
25
- 'state',
26
- 'postcode'
27
- );
28
- $size = count( $options2['shipping_buttons'] );
29
- // $size = max( array_keys( $options2['shipping_buttons'] ) );
30
- for( $i = 0; $i < $size; $i++ ) {
31
-
32
- /*
33
- if( !isset( $options2['shipping_buttons'][$i] ) )
34
- break;
35
- */
36
- ?>
37
-
38
- <tr valign="top" id="wccs-shipping-id-<?php echo $i; ?>" class="shipping-wccs-row">
39
-
40
- <td style="display:none;" class="shipping-wccs-order-hidden">
41
- <input type="hidden" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][order]" value="<?php echo ( empty( $options2['shipping_buttons'][$i]['order'] ) ) ? $i : $options2['shipping_buttons'][$i]['order']; ?>" />
42
- </td>
43
- <td class="shipping-wccs-order" title="<?php esc_attr_e( 'Drag-and-drop this Checkout field to adjust its ordering', 'woocommerce-checkout-manager' ); ?>"><?php echo $i+1; ?></td>
44
-
45
- <?php require(WOOCCM_PLUGIN_DIR.'includes/templates/admin/woocheckout-shipping-tbody.php'); ?>
46
-
47
- <?php if( in_array( $options2['shipping_buttons'][$i]['cow'], $shipping ) ) { ?>
48
- <td style="text-align:center;">
49
- <input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][disabled]" type="checkbox" value="true" <?php if ( !empty ( $options2['shipping_buttons'][$i]['disabled'] ) ) echo "checked='checked'"; ?> />
50
- </td>
51
- <?php } else { ?>
52
- <td class="shipping-wccs-remove"><a class="shipping-wccs-remove-button" href="javascript:;" title="<?php esc_attr_e( 'Delete this Checkout field', 'woocommerce-checkout-manager' ); ?>">&times;</a></td>
53
- <?php } ?>
54
-
55
- </tr>
56
- <!-- #wccs-shipping-id-<?php echo $i; ?> .shipping-wccs-row -->
57
-
58
- <?php
59
- }
60
- }
61
- ?>
62
-
63
- <?php
64
- $i = 999;
65
- ?>
66
-
67
- <tr valign="top" id="wccs-shipping-id-<?php echo $i; ?>" class="shipping-wccs-clone" >
68
-
69
- <td style="display:none;" class="shipping-wccs-order-hidden" >
70
- <input type="hidden" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][order]" value="<?php echo $i; ?>" />
71
- </td>
72
-
73
- <td class="shipping-wccs-order" title="<?php esc_attr_e( 'Drag-and-drop this Checkout field to adjust its ordering', 'woocommerce-checkout-manager' ); ?>"><?php echo $i; ?></td>
74
-
75
- <?php require( WOOCCM_PLUGIN_DIR.'includes/templates/admin/woocheckout-shipping-clone.php' ); ?>
76
-
77
- <td class="shipping-wccs-remove"><a class="shipping-wccs-remove-button" href="javascript:;" title="<?php esc_attr_e( 'Delete this Checkout field', 'woocommerce-checkout-manager' ); ?>">&times;</a></td>
78
-
79
- </tr>
80
- <!-- #wccs-shipping-id-<?php echo $i; ?> .shipping-wccs-clone -->
81
- </tbody>
82
  </table>
83
  <!-- .widefat -->
84
 
85
  <div class="shipping-wccs-table-footer shipping-semi" style="display:none;">
86
- <a href="javascript:;" id="shipping-wccs-add-button" class="button-secondary"><?php _e( '+ Add New Field', 'woocommerce-checkout-manager' ); ?></a>
87
  </div>
88
  <!-- .shipping-wccs-table-footer -->
1
  <table class="widefat shipping-wccs-table shipping-semi" style="display:none;" border="1" name="shipping_table">
2
+ <thead>
3
+
4
+ <tr>
5
+ <th style="width:3%;" class="shipping-wccs-order" title="<?php esc_attr_e('Change the order of Checkout fields', 'woocommerce-checkout-manager'); ?>">#</th>
6
+
7
+ <?php require( WOOCCM_PLUGIN_DIR . 'includes/templates/admin/woocheckout-shipping-thead.php' ); ?>
8
+
9
+ <th width="1%" scope="col" title="<?php esc_attr_e('Remove button', 'woocommerce-checkout-manager'); ?>"><strong>X</strong><!-- remove --></th>
10
+ </tr>
11
+
12
+ </thead>
13
+ <tbody>
14
+
15
+ <?php
16
+ if ($fields = WOOCCM_Fields::get_shipping_fields()) {
17
+ $shipping = array(
18
+ 'country',
19
+ 'first_name',
20
+ 'last_name',
21
+ 'company',
22
+ 'address_1',
23
+ 'address_2',
24
+ 'city',
25
+ 'state',
26
+ 'postcode'
27
+ );
28
+
29
+ foreach ($fields as $i => $field) {
30
+ ?>
31
+
32
+ <tr valign="top" id="wccs-shipping-id-<?php echo $i; ?>" class="shipping-wccs-row">
33
+
34
+ <td style="display:none;" class="shipping-wccs-order-hidden">
35
+ <input type="hidden" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][order]" value="<?php echo ( empty($field['order']) ) ? $i : $field['order']; ?>" />
36
+ </td>
37
+ <td class="shipping-wccs-order" title="<?php esc_attr_e('Drag-and-drop this Checkout field to adjust its ordering', 'woocommerce-checkout-manager'); ?>"><?php echo $i + 1; ?></td>
38
+
39
+ <?php require(WOOCCM_PLUGIN_DIR . 'includes/templates/admin/woocheckout-shipping-tbody.php'); ?>
40
+
41
+ <?php if (in_array($field['cow'], $shipping)) { ?>
42
+ <td style="text-align:center;">
43
+ <input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][disabled]" type="checkbox" value="true" <?php if (!empty($field['disabled'])) echo "checked='checked'"; ?> />
44
+ </td>
45
+ <?php } else { ?>
46
+ <td class="shipping-wccs-remove"><a class="shipping-wccs-remove-button" href="javascript:;" title="<?php esc_attr_e('Delete this Checkout field', 'woocommerce-checkout-manager'); ?>">&times;</a></td>
47
+ <?php } ?>
48
+
49
+ </tr>
50
+ <!-- #wccs-shipping-id-<?php echo $i; ?> .shipping-wccs-row -->
51
+
52
+ <?php
53
+ }
54
+ }
55
+ ?>
56
+
57
+ <?php
58
+ $i = 999;
59
+ ?>
60
+
61
+ <tr valign="top" id="wccs-shipping-id-<?php echo $i; ?>" class="shipping-wccs-clone" >
62
+
63
+ <td style="display:none;" class="shipping-wccs-order-hidden" >
64
+ <input type="hidden" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][order]" value="<?php echo $i; ?>" />
65
+ </td>
66
+
67
+ <td class="shipping-wccs-order" title="<?php esc_attr_e('Drag-and-drop this Checkout field to adjust its ordering', 'woocommerce-checkout-manager'); ?>"><?php echo $i; ?></td>
68
+
69
+ <?php require( WOOCCM_PLUGIN_DIR . 'includes/templates/admin/woocheckout-shipping-clone.php' ); ?>
70
+
71
+ <td class="shipping-wccs-remove"><a class="shipping-wccs-remove-button" href="javascript:;" title="<?php esc_attr_e('Delete this Checkout field', 'woocommerce-checkout-manager'); ?>">&times;</a></td>
72
+
73
+ </tr>
74
+ <!-- #wccs-shipping-id-<?php echo $i; ?> .shipping-wccs-clone -->
75
+ </tbody>
 
 
 
 
 
 
76
  </table>
77
  <!-- .widefat -->
78
 
79
  <div class="shipping-wccs-table-footer shipping-semi" style="display:none;">
80
+ <a href="javascript:;" id="shipping-wccs-add-button" class="button-secondary"><?php _e('+ Add New Field', 'woocommerce-checkout-manager'); ?></a>
81
  </div>
82
  <!-- .shipping-wccs-table-footer -->
includes/templates/functions/billing_functions.php CHANGED
@@ -50,7 +50,7 @@ function wooccm_billing_scripts() {
50
  return;
51
 
52
  foreach ($options['billing_buttons'] as $btn) {
53
-
54
  if ($btn['type'] == 'datepicker') {
55
  echo '
56
  <script type="text/javascript">
50
  return;
51
 
52
  foreach ($options['billing_buttons'] as $btn) {
53
+
54
  if ($btn['type'] == 'datepicker') {
55
  echo '
56
  <script type="text/javascript">
new/admin.php DELETED
@@ -1,273 +0,0 @@
1
- <?php
2
-
3
- if (!class_exists('WOOCCM_Admin')) {
4
-
5
- class WOOCCM_Admin {
6
-
7
- protected static $instance;
8
-
9
- function ajax_toggle_field_enabled() {
10
-
11
- if (current_user_can('manage_woocommerce') && check_ajax_referer('wooccm_admin', 'nonce') && isset($_POST['field_id'])) {
12
-
13
- $field_id = wc_clean(wp_unslash($_POST['field_id']));
14
-
15
- if ($options = get_option('wccs_settings3')) {
16
-
17
- if (array_key_exists('billing_buttons', $options)) {
18
-
19
- $disabled = empty($options['billing_buttons'][$field_id]['disabled']);
20
-
21
- $options['billing_buttons'][$field_id]['disabled'] = $disabled;
22
-
23
- update_option('wccs_settings3', $options);
24
-
25
- wp_send_json_success(!$disabled);
26
- }
27
- }
28
- }
29
-
30
- wp_send_json_error('invalid_field_id');
31
- wp_die();
32
- }
33
-
34
- function ajax_add_field() {
35
-
36
- if (current_user_can('manage_woocommerce') && check_ajax_referer('wooccm_admin', 'nonce')) {
37
-
38
- if ($options = get_option('wccs_settings3')) {
39
-
40
- if (array_key_exists('billing_buttons', $options)) {
41
-
42
- $options['billing_buttons'][] = array(
43
- 'order' => count($options['billing_buttons']) + 1,
44
- 'label' => esc_html__('New Field', 'woocommerce-checkout-manager'),
45
- 'placeholder' => esc_html__('New Field', 'woocommerce-checkout-manager'),
46
- 'position' => 'form-row-wide',
47
- 'required' => false,
48
- 'clear_row' => false,
49
- 'type' => 'wooccmtext'
50
- );
51
-
52
- update_option('wccs_settings3', $options);
53
-
54
- wp_send_json_success();
55
- }
56
- }
57
- }
58
-
59
- wp_send_json_error();
60
- wp_die();
61
- }
62
-
63
- function ajax_edit_field() {
64
-
65
- if (current_user_can('manage_woocommerce') && check_ajax_referer('wooccm_admin', 'nonce')) {
66
-
67
- if ($options = get_option('wccs_settings3')) {
68
-
69
- if (array_key_exists('billing_buttons', $options)) {
70
-
71
- $field_id = isset($_REQUEST['field_id']) ? absint($_REQUEST['field_id']) : 0;
72
-
73
- if (isset($options['billing_buttons'][$field_id])) {
74
-
75
- $options['billing_buttons'][$field_id]['id'] = $field_id;
76
- $options['billing_buttons'][$field_id]['prev_id'] = $field_id - 1;
77
- $options['billing_buttons'][$field_id]['next_id'] = min($field_id + 1, count($options['billing_buttons']) - 1);
78
-
79
- wp_send_json_success($options['billing_buttons'][$field_id]);
80
- }
81
-
82
- wp_send_json_error(esc_html__('Undefined field id', 'woocommerce-checkout-managerS'));
83
- }
84
- }
85
- }
86
-
87
- wp_send_json_error(esc_html__('Unknow error', 'woocommerce-checkout-managerS'));
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() {
121
-
122
- global $current_section;
123
-
124
- $sections = array();
125
-
126
- $sections[''] = esc_html__('General', 'woocommerce-checkout-manager');
127
- $sections['orders'] = esc_html__('Orders', 'woocommerce-checkout-manager');
128
- $sections['billing'] = esc_html__('Billing', 'woocommerce-checkout-manager');
129
- $sections['shipping'] = esc_html__('Shipping', 'woocommerce-checkout-manager');
130
- $sections['additional'] = esc_html__('Additional', 'woocommerce-checkout-manager');
131
- $sections['advanced'] = esc_html__('Advanced', 'woocommerce-checkout-manager');
132
-
133
- echo '<ul class="subsubsub">';
134
-
135
- $array_keys = array_keys($sections);
136
-
137
- foreach ($sections as $id => $label) {
138
- echo '<li><a href="' . admin_url('admin.php?page=wc-settings&tab=wooccm&section=' . sanitize_title($id)) . '" class="' . ( $current_section == $id ? 'current' : '' ) . '">' . $label . '</a> ' . ( end($array_keys) == $id ? '' : '|' ) . ' </li>';
139
- }
140
-
141
- echo '</ul><br class="clear" />';
142
- }
143
-
144
- function add_tab($settings_tabs) {
145
- $settings_tabs[WOOCCM_PREFIX] = esc_html__('Checkout', 'woocommerce-checkout-manager');
146
- return $settings_tabs;
147
- }
148
-
149
- function add_section_general() {
150
-
151
- global $current_section;
152
-
153
- if ('' == $current_section) {
154
- if ($options = get_option('wccs_settings', array())) {
155
- include_once('admin/pages/general.php');
156
- }
157
- }
158
- }
159
-
160
- function add_section_orders() {
161
-
162
- global $current_section;
163
-
164
- if ('shipping' == $current_section) {
165
- if ($options = get_option('wccs_settings', array())) {
166
- include_once('admin/pages/orders.php');
167
- }
168
- }
169
- }
170
-
171
- function add_section_billing() {
172
-
173
- global $current_section;
174
-
175
- if ('billing' == $current_section) {
176
- if ($options = get_option('wccs_settings3', array())) {
177
- include_once('admin/pages/billing.php');
178
- }
179
- }
180
- }
181
-
182
- function add_section_shipping() {
183
-
184
- global $current_section;
185
-
186
- if ('' == $current_section) {
187
- if ($options = get_option('wccs_settings', array())) {
188
- include_once('admin/pages/shipping.php');
189
- }
190
- }
191
- }
192
-
193
- function add_section_additional() {
194
-
195
- global $current_section;
196
-
197
- if ('additional' == $current_section) {
198
- if ($options = get_option('wccs_settings', array())) {
199
- include_once('admin/pages/additional.php');
200
- }
201
- }
202
- }
203
-
204
- function add_section_advanced() {
205
- global $current_section;
206
- if ('advanced' == $current_section) {
207
- if ($options = get_option('wccs_settings', array())) {
208
- require_once('admin/pages/advanced.php');
209
- }
210
- }
211
- }
212
-
213
- function save_section_billing() {
214
-
215
- global $current_section;
216
-
217
- if ('billing' == $current_section) {
218
-
219
- if (isset($_POST['gateway_order'])) {
220
-
221
- $gateway_order = wc_clean(wp_unslash($_POST['gateway_order']));
222
-
223
- if ($options = get_option('wccs_settings3')) {
224
-
225
- if (array_key_exists('billing_buttons', $options)) {
226
-
227
- foreach ($options['billing_buttons'] as $id => $custom_field) {
228
-
229
- if (isset($gateway_order[$id])) {
230
- $options['billing_buttons'][$id]['order'] = $gateway_order[$id];
231
- }
232
- }
233
-
234
- update_option('wccs_settings3', $options);
235
- }
236
- }
237
- }
238
- }
239
- }
240
-
241
- function add_menu_page() {
242
- add_submenu_page('woocommerce', esc_html__('Checkout', 'woocommerce-checkout-manager'), esc_html__('Checkout', 'woocommerce-checkout-manager'), 'manage_options', admin_url('admin.php?page=wc-settings&tab=' . sanitize_title(WOOCCM_PREFIX)));
243
- }
244
-
245
- function init() {
246
- add_action('admin_menu', array($this, 'add_menu_page'));
247
- add_filter('woocommerce_settings_tabs_array', array($this, 'add_tab'), 50);
248
- add_filter('woocommerce_sections_' . WOOCCM_PREFIX, array($this, 'add_sections'));
249
- add_action('woocommerce_sections_' . WOOCCM_PREFIX, array($this, 'add_section_general'), 99);
250
- add_action('woocommerce_sections_' . WOOCCM_PREFIX, array($this, 'add_section_orders'), 99);
251
- add_action('woocommerce_sections_' . WOOCCM_PREFIX, array($this, 'add_section_billing'), 99);
252
- add_action('woocommerce_sections_' . WOOCCM_PREFIX, array($this, 'add_section_shipping'), 99);
253
- add_action('woocommerce_sections_' . WOOCCM_PREFIX, array($this, 'add_section_additional'), 99);
254
- add_action('woocommerce_sections_' . WOOCCM_PREFIX, array($this, 'add_section_advanced'), 99);
255
- add_action('woocommerce_settings_save_' . WOOCCM_PREFIX, array($this, 'save_section_billing'));
256
- add_action('wp_ajax_wooccm_toggle_field_enabled', array($this, 'ajax_toggle_field_enabled'));
257
- add_action('wp_ajax_wooccm_add_field', array($this, 'ajax_add_field'));
258
- add_action('wp_ajax_wooccm_edit_field', array($this, 'ajax_edit_field'));
259
- add_action('wp_ajax_wooccm_save_field', array($this, 'ajax_save_field'));
260
- }
261
-
262
- public static function instance() {
263
- if (!isset(self::$instance)) {
264
- self::$instance = new self();
265
- self::$instance->init();
266
- }
267
- return self::$instance;
268
- }
269
-
270
- }
271
-
272
- WOOCCM_Admin::instance();
273
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
new/admin/meta-boxes/html-order-uploads.php DELETED
@@ -1,61 +0,0 @@
1
- <div id="wooccm_order_attachment_inner" class="wc-metaboxes-wrapper">
2
- <table class="woocommerce_order_items back_end">
3
- <thead>
4
- <tr>
5
- <!--<th><?php _e('ID', 'woocommerce-checkout-manager'); ?></th>-->
6
- <th><?php _e('Image', 'woocommerce-checkout-manager'); ?></th>
7
- <th><?php _e('Filename', 'woocommerce-checkout-manager'); ?></th>
8
- <th><?php _e('Dimensions', 'woocommerce-checkout-manager'); ?></th>
9
- <th><?php _e('Extension', ' woocommerce-checkout-manager'); ?></th>
10
- <th class="column-actions"><?php _e('Actions', 'woocommerce-checkout-manager'); ?></th>
11
- </tr>
12
- </thead>
13
- <tbody class="product_images">
14
- <?php
15
- if (!empty($attachments)) :
16
- foreach ($attachments as $attachment_id) :
17
- $image_attributes = wp_get_attachment_url($attachment_id);
18
- $image_attributes2 = wp_get_attachment_image_src($attachment_id);
19
- $filename = basename($image_attributes);
20
- $wp_filetype = wp_check_filetype($filename);
21
- ?>
22
- <tr class="image wccm_filesli wccmv_<?php echo esc_attr($attachment_id); ?>">
23
- <!--<td><?php echo esc_attr($attachment_id); ?></td>-->
24
- <td><?php echo wp_get_attachment_link($attachment_id, '', false, false, wp_get_attachment_image($attachment_id, array(75, 75), false)); ?></td>
25
- <td><?php echo wp_get_attachment_link($attachment_id, '', false, false, preg_replace('/\.[^.]+$/', '', $filename)); ?></td>
26
- <td>
27
- <?php
28
- if ($image_attributes2[1] == '') {
29
- echo '-';
30
- } else {
31
- echo $image_attributes2[1] . ' x ' . $image_attributes2[2];
32
- }
33
- ?>
34
- </td>
35
- <td><?php echo strtoupper($wp_filetype['ext']); ?></td>
36
- <td class="column-actions" nowrap>
37
- <!--<a href="<?php echo esc_url($image_attributes2[0]); ?>" target="_blank" class="button"><?php esc_html_e('Download', 'woocommerce-checkout-manager'); ?></a>-->
38
- <a class="button wooccm_delete_attachment" data-attachment_id="<?php echo esc_attr($attachment_id); ?>" data-tip="<?php esc_html_e('Delete', 'woocommerce-checkout-manager'); ?>"><?php esc_html_e('Delete', 'woocommerce-checkout-manager'); ?></a>
39
- </td>
40
- </tr>
41
- <?php endforeach; ?>
42
- <?php else: ?>
43
- <tr>
44
- <td colspan="6" style="text-align:left;"><?php esc_html_e('No files have been uploaded to this Order.', 'woocommerce-checkout-manager'); ?></td>
45
- </tr>
46
- <?php endif; ?>
47
- </tbody>
48
- </table>
49
- <input type="hidden" id="delete_attachments_ids" name="delete_attachments_ids" value="<?php echo esc_attr(implode(',', $attachments)); ?>" />
50
- <input type="hidden" id="all_attachments_ids" name="all_attachments_ids" value="<?php echo esc_attr(implode(',', $attachments)); ?>" />
51
- <div class="clear"></div>
52
- <div class="add_product_images hide-if-no-js">
53
- <a class="button button-primary wccm_add_order_link fileinput-button">
54
- <span><?php _e('Add Order Files', 'woocommerce-checkout-manager'); ?></span>
55
- <input data-order_id="<?php echo esc_attr($order->get_id()); ?>" type="file" name="wooccm_order_attachment_upload" id="wooccm_order_attachment_upload" multiple />
56
- </a>
57
- <input type="button" id="wooccm_order_attachment_update" class="button button-secondary" value="<?php _e('Save Changes', 'woocommerce-checkout-manager'); ?>" disabled="disabled">
58
- </div>
59
- <div class="wccm_results"></div>
60
- <div class="clear"></div>
61
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
new/admin/pages/additional.php DELETED
@@ -1,8 +0,0 @@
1
- <?php
2
-
3
- /*
4
- * To change this license header, choose License Headers in Project Properties.
5
- * To change this template file, choose Tools | Templates
6
- * and open the template in the editor.
7
- */
8
-
 
 
 
 
 
 
 
 
new/admin/pages/advanced.php DELETED
@@ -1,29 +0,0 @@
1
- <div class="widefat general-semi advanced" border="1">
2
-
3
- <div class="section">
4
- <h3 class="heading"><?php _e('Advanced', 'woocommerce-checkout-manager'); ?></h3>
5
- </div>
6
- <!-- .section -->
7
-
8
- <div class="section">
9
-
10
- <div class="option">
11
- <div class="info-of"><?php _e('Administrator Actions', 'woocommerce-checkout-manager'); ?></div>
12
- <?php if (current_user_can('manage_options')) { ?>
13
- <ul>
14
- <li><a href="<?php echo add_query_arg(array('action' => 'wooccm_reset_update_notice', '_wpnonce' => wp_create_nonce('wooccm_reset_update_notice'))); ?>"><?php _e('Reset <em>Run the updater</em> prompt', 'woocommerce-checkout-manager'); ?></a></li>
15
- <li><a href="<?php echo add_query_arg(array('action' => 'wooccm_nuke_options', '_wpnonce' => wp_create_nonce('wooccm_nuke_options'))); ?>" class="confirm-button" data-confirm="<?php _e('This will permanently delete all WordPress Options associated with WooCommerce Checkout Manager. Are you sure you want to proceed?', 'woocommerce-checkout-manager'); ?>"><?php _e('Delete WooCommerce Checkout Manager WordPress Options', 'woocommerce-checkout-manager'); ?></a></li>
16
- <li><a href="<?php echo add_query_arg(array('action' => 'wooccm_nuke_order_meta', '_wpnonce' => wp_create_nonce('wooccm_nuke_order_meta'))); ?>" class="confirm-button" data-confirm="<?php _e('This will permanently delete all WordPress Post meta associated with WooCommerce Checkout Manager that is linked to Orders. Are you sure you want to proceed?', 'woocommerce-checkout-manager'); ?>"><?php _e('Delete WooCommerce Checkout Manager Orders Post meta', 'woocommerce-checkout-manager'); ?></a></li>
17
- <li><a href="<?php echo add_query_arg(array('action' => 'wooccm_nuke_user_meta', '_wpnonce' => wp_create_nonce('wooccm_nuke_user_meta'))); ?>" class="confirm-button" data-confirm="<?php _e('This will permanently delete all WordPress Post meta associated with WooCommerce Checkout Manager that is linked to Users. Are you sure you want to proceed?', 'woocommerce-checkout-manager'); ?>"><?php _e('Delete WooCommerce Checkout Manager Users Post meta', 'woocommerce-checkout-manager'); ?></a></li>
18
- </ul>
19
- <?php } else { ?>
20
- <p><?php _e('These actions are available only to WordPress Users with the <em>manage_options</em> User Capability.', 'woocommerce-checkout-manager'); ?></p>
21
- <?php } ?>
22
- </div>
23
- <!-- .option -->
24
-
25
- </div>
26
- <!-- .section -->
27
-
28
- </div>
29
- <!--.advanced -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
new/admin/pages/billing.php DELETED
@@ -1,646 +0,0 @@
1
- <h1 class="screen-reader-text"><?php esc_html_e('Billing', 'woocommerce-checkout-manager'); ?></h1>
2
- <h2><?php esc_html_e('Billing fields', 'woocommerce-checkout-manager'); ?></h2>
3
- <div id="wooccm_billing_settings-description">
4
- <p>Email notifications sent from WooCommerce are listed below. Click on an email to configure it.</p>
5
- </div>
6
- <div id="wooccm_billing_settings-actions">
7
- <p>
8
- <a href="javascript:;" id="wooccm_billing_settings_add" class="button button-primary"><?php esc_html_e('+ Add New Field', 'woocommerce-checkout-manager') ?></a>
9
- <a href="javascript:;" id="wooccm_billing_settings_import" class="button button-secondary"><?php esc_html_e('Import', 'woocommerce-checkout-manager') ?></a>
10
- <a href="javascript:;" id="wooccm_billing_settings_reset" class="button button-secondary"><?php esc_html_e('Reset', 'woocommerce-checkout-manager') ?></a>
11
- </p>
12
- </div>
13
- <table class="form-table">
14
- <tbody>
15
- <tr valign="top">
16
- <td class="wooccm_billing_wrapper wc_payment_gateways_wrapper" colspan="2">
17
- <table id="wooccm_billing_fields" class="wc_gateways widefat" cellspacing="0" aria-describedby="wooccm_billing_settings-description">
18
- <thead>
19
- <tr>
20
- <th class="sort" style="width:1%"></th>
21
- <th class="status" style="width:1%"><?php esc_html_e('Enabled', 'woocommerce-checkout-manager'); ?></th>
22
- <!--<th class="order"><?php esc_html_e('Order', 'woocommerce-checkout-manager'); ?></th>-->
23
- <th class="required" style="width:1%"><?php esc_html_e('Required', 'woocommerce-checkout-manager'); ?></th>
24
- <th class="type" style="width:1%"><?php esc_html_e('Type', 'woocommerce-checkout-manager'); ?></th>
25
- <th class="position" style="width:1%;min-width: 100px;"><?php esc_html_e('Position', 'woocommerce-checkout-manager'); ?></th>
26
- <th class="clear" style="width:1%"><?php esc_html_e('Clear', 'woocommerce-checkout-manager'); ?></th>
27
- <th class="label" style="width:1%;min-width: 100px;"><?php esc_html_e('Label', 'woocommerce-checkout-manager'); ?></th>
28
- <th class="placeholder"><?php esc_html_e('Placeholder', 'woocommerce-checkout-manager'); ?></th>
29
- <th class="actions"></th>
30
- </tr>
31
- </thead>
32
- <tbody class="ui-sortable">
33
- <?php
34
- if ($options) {
35
-
36
- if (array_key_exists('billing_buttons', $options)) {
37
-
38
- uasort($options['billing_buttons'], 'wooccm_sort_fields');
39
-
40
- if ($custom_fields = $options['billing_buttons']) {
41
-
42
- foreach ($custom_fields as $id => $custom_field) {
43
- ?>
44
- <tr data-options_name="wccs_settings3" data-options_key="billing_buttons" data-field_id="<?php echo esc_attr($id); ?>">
45
- <td class="sort ui-sortable-handle">
46
- <div class="wc-item-reorder-nav">
47
- <button type="button" class="wc-move-up wc-move-disabled" tabindex="-1" aria-hidden="true" aria-label="<?php echo esc_attr(sprintf(__('Move the "%s" payment method up', 'woocommerce-checkout-manager'), @$custom_field['label'])); ?>"><?php esc_html_e('Move up', 'woocommerce-checkout-manager'); ?></button>
48
- <button type="button" class="wc-move-down" tabindex="0" aria-hidden="false" aria-label="<?php echo esc_attr(sprintf(__('Move the "%s" payment method down', 'woocommerce-checkout-manager'), @$custom_field['label'])); ?>"><?php esc_html_e('Move down', 'woocommerce-checkout-manager'); ?></button>
49
- <input type="hidden" name="gateway_order[]" value="<?php echo esc_attr(@$custom_field['order']); ?>">
50
- </div>
51
- </td>
52
- <td class="status">
53
- <a class="wooccm-field-toggle-enabled" href="#">
54
- <?php
55
- if (empty($custom_field['disabled'])) {
56
- /* Translators: %s Payment gateway name. */
57
- echo '<span class="woocommerce-input-toggle woocommerce-input-toggle--enabled" aria-label="' . esc_attr(sprintf(__('The "%s" payment method is currently enabled', 'woocommerce-checkout-manager'), @$custom_field['label'])) . '">' . esc_attr__('Yes', 'woocommerce-checkout-manager') . '</span>';
58
- } else {
59
- /* Translators: %s Payment gateway name. */
60
- echo '<span class="woocommerce-input-toggle woocommerce-input-toggle--disabled" aria-label="' . esc_attr(sprintf(__('The "%s" payment method is currently disabled', 'woocommerce-checkout-manager'), @$custom_field['label'])) . '">' . esc_attr__('No', 'woocommerce-checkout-manager') . '</span>';
61
- }
62
- ?>
63
- </a>
64
- </td>
65
- <!--<td class="order"><strong><?php echo esc_html(@$custom_field['order']); ?></strong>-->
66
- <td class="required">
67
- <?php
68
- if (!empty($custom_field['checkbox'])) {
69
- ?>
70
- <span class="status-enabled"><?php esc_html_e('Yes'); ?></span>
71
- <?php } else { ?>
72
- <span class="status-disabled"><?php esc_html_e('Yes'); ?></span>
73
- <?php } ?>
74
- </td>
75
- <td class="type">
76
- <?php echo esc_html(@$custom_field['type']); ?>
77
- </td>
78
- <td class="position">
79
- <?php echo esc_html(@$custom_field['position']); ?>
80
- </td>
81
- <td class="clear">
82
- <?php
83
- if (!empty($custom_field['clear_row'])) {
84
- ?>
85
- <span class="status-enabled"><?php esc_html_e('Yes'); ?></span>
86
- <?php } else { ?>
87
- <span class="status-disabled"><?php esc_html_e('Yes'); ?></span>
88
- <?php } ?>
89
- </td>
90
- <td class="label">
91
- <strong><?php echo esc_html(@$custom_field['label']); ?></strong>
92
- </td>
93
- <td class="placeholder">
94
- <?php echo esc_html(@$custom_field['placeholder']); ?>
95
- </td>
96
- <td class="action">
97
- <a class="wooccm_billing_settings_edit button" aria-label="<?php esc_html_e('Edit checkout field', 'woocommerce-checkout-manager'); ?>" href="javascript:;"><?php esc_html_e('Edit'); ?></a>
98
- <a class="wooccm_billing_settings_delete" aria-label="<?php esc_html_e('Edit checkout field', 'woocommerce-checkout-manager'); ?>" href="javascript:;"><?php esc_html_e('Delete'); ?></a>
99
- </td>
100
- </tr>
101
- <?php
102
- }
103
- }
104
- }
105
- }
106
- ?>
107
- </tbody>
108
- </table>
109
-
110
- </tr>
111
- </tbody>
112
- </table>
113
- <script type="text/html" id='tmpl-wpmi-modal-backdrop'>
114
- </script>
115
- <script type="text/html" id='tmpl-wpmi-modal-window'>
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="advanced_panel">
154
- <a href="#advanced_panel"><span><?php esc_html_e('Advanced', 'woocommerce-checkout-manager'); ?></span></a>
155
- </li>
156
- <li class="marketplace-suggestions_options">
157
- <a href="#marketplace_suggestions"><span><?php esc_html_e('Advanced', 'woocommerce-checkout-manager'); ?></span></a>
158
- </li>
159
- </ul>
160
-
161
- <div id="general_product_data" class="panel woocommerce_options_panel" style="display: none;">
162
- <div class="options_group">
163
- <!--<p>
164
- <input type="hidden" name="order" value="{{data.order}}">
165
- </p>-->
166
- <!--<p>
167
- <label><?php esc_html_e('Disabled', 'woocommerce-checkout-manager'); ?></label>
168
- <input name="disabled" type="checkbox" value="{{data.disabled}}">
169
- </p>-->
170
- <!--<p>
171
- <label><?php esc_html_e('Required', 'woocommerce-checkout-manager'); ?></label>
172
- <input name="checkbox" type="checkbox" title="Whether or not the checkout field is required" value="{{data.checkbox}}" checked="checked">
173
- </p>-->
174
- <p class="form-field">
175
- <label><?php esc_html_e('Name', 'woocommerce-checkout-manager'); ?></label>
176
- <input class="short" type="text" name="cow" placeholder="<?php esc_html_e('MyField', 'woocommerce-checkout-manager'); ?>" value="{{data.cow}}" readonly="readonly">
177
- <span class="description"><?php esc_html_e('To edit Abbreviations open General > Switches > Editing Of Abbreviation Fields.', 'woocommerce-checkout-manager'); ?></span>
178
- </p>
179
- <p class="form-field">
180
- <label><?php esc_html_e('Default', 'woocommerce-checkout-manager'); ?></label>
181
- <input class="short" type="text" name="default" placeholder="<?php esc_html_e('Enter a default value (optional)', 'woocommerce-checkout-manager'); ?>" value="{{data.default}}" readonly="readonly">
182
- </p>
183
- </div>
184
- <!--<div class="options_group">
185
- <p class="form-field">
186
- <label><?php esc_html_e('Position', 'woocommerce-checkout-manager'); ?></label>
187
- <select class="select short" name="position">
188
- <option <# if ( data.position == 'form-row-wide' ) { #>selected<# } #> value="form-row-wide"><?php esc_html_e('Wide', 'woocommerce-checkout-manager'); ?></option>
189
- <option <# if ( data.position == 'form-row-first' ) { #>selected<# } #> value="form-row-first"><?php esc_html_e('Left', 'woocommerce-checkout-manager'); ?></option>
190
- <option <# if ( data.position == 'form-row-last' ) { #>selected<# } #> value="form-row-last"><?php esc_html_e('Right', 'woocommerce-checkout-manager'); ?></option>
191
- </select>
192
- <span class="description"><?php esc_html_e('Placement of the checkout field.', 'woocommerce-checkout-manager'); ?></span>
193
- </p>
194
- <p class="form-field">
195
- <label><?php esc_html_e('Clear', 'woocommerce-checkout-manager'); ?></label>
196
- <input <# if ( data.clear_row == 'true' ) { #>checked<# } #> type="checkbox" name="clear_row" value="true">
197
- <span class="description"><?php esc_html_e('Applies a clear fix to the checkout field.', 'woocommerce-checkout-manager'); ?></span>
198
- </p>
199
- <p class="form-field">
200
- <label><?php esc_html_e('Extra class', 'woocommerce-checkout-manager'); ?></label>
201
- <input class="short" type="text" name="extra_class" value="{{data.extra_class}}">
202
- </p>
203
- </div>-->
204
- <!--<div class="options_group">
205
- <p class="form-field">
206
- <label><?php esc_html_e('Label', 'woocommerce-checkout-manager'); ?></label>
207
- <input class="short" type="text" name="label" placeholder="<?php esc_html_e('My Field Name', 'woocommerce-checkout-manager'); ?>" value="{{data.label}}">
208
- <span class="description"><?php esc_html_e('Placeholder text for the checkout field.', 'woocommerce-checkout-manager'); ?></span>
209
- </p>
210
- <p class="form-field">
211
- <label><?php esc_html_e('Placeholder', 'woocommerce-checkout-manager'); ?></label>
212
- <input class="short" type="text" name="placeholder" placeholder="<?php esc_html_e('Example red', 'woocommerce-checkout-manager'); ?>" value="{{data.placeholder}}">
213
- <span class="description"><?php esc_html_e('Placeholder text for the checkout field.', 'woocommerce-checkout-manager'); ?></span>
214
- </p>
215
- </div>
216
-
217
- <div class="options_group">
218
- <p class="form-field">
219
- <label><?php esc_html_e('Type', 'woocommerce-checkout-manager'); ?></label>
220
- <select class="select short" name="type">
221
- <option <# if ( data.type == 'wooccmtext' ) { #>selected<# } #> value="wooccmtext"><?php esc_html_e('Text Input', 'woocommerce-checkout-manager'); ?></option>
222
- <option <# if ( data.type == 'wooccmtextarea' ) { #>selected<# } #> value="wooccmtextarea"><?php esc_html_e('Textarea', 'woocommerce-checkout-manager'); ?></option>
223
- <option <# if ( data.type == 'wooccmpassword' ) { #>selected<# } #> value="wooccmpassword"><?php esc_html_e('Password', 'woocommerce-checkout-manager'); ?></option>
224
- <option <# if ( data.type == 'wooccmradio' ) { #>selected<# } #> value="wooccmradio"><?php esc_html_e('Radio Buttons', 'woocommerce-checkout-manager'); ?></option>
225
- <option <# if ( data.type == 'checkbox_wccm' ) { #>selected<# } #> value="checkbox_wccm"><?php esc_html_e('Check Box', 'woocommerce-checkout-manager'); ?></option>
226
- <option <# if ( data.type == 'wooccmselect' ) { #>selected<# } #> value="wooccmselect"><?php esc_html_e('Select Options', 'woocommerce-checkout-manager'); ?></option>
227
- <option <# if ( data.type == 'datepicker' ) { #>selected<# } #> value="datepicker"><?php esc_html_e('Date Picker', 'woocommerce-checkout-manager'); ?></option>
228
- <option <# if ( data.type == 'time' ) { #>selected<# } #> value="time"><?php esc_html_e('Time Picker', 'woocommerce-checkout-manager'); ?></option>
229
- <option <# if ( data.type == 'colorpicker' ) { #>selected<# } #> value="colorpicker"><?php esc_html_e('Color Picker', 'woocommerce-checkout-manager'); ?></option>
230
- <option <# if ( data.type == 'heading' ) { #>selected<# } #> value="heading"><?php esc_html_e('Heading', 'woocommerce-checkout-manager'); ?></option>
231
- <option <# if ( data.type == 'multiselect' ) { #>selected<# } #> value="multiselect"><?php esc_html_e('Multi-Select', 'woocommerce-checkout-manager'); ?></option>
232
- <option <# if ( data.type == 'multicheckbox' ) { #>selected<# } #> value="multicheckbox"><?php esc_html_e('Multi-Checkbox', 'woocommerce-checkout-manager'); ?></option>
233
- <option <# if ( data.type == 'wooccmcountry' ) { #>selected<# } #> value="wooccmcountry"><?php esc_html_e('Country', 'woocommerce-checkout-manager'); ?></option>
234
- <option <# if ( data.type == 'wooccmstate' ) { #>selected<# } #> value="wooccmstate"><?php esc_html_e('State', 'woocommerce-checkout-manager'); ?></option>
235
- <option <# if ( data.type == 'wooccmupload' ) { #>selected<# } #> value="wooccmupload"><?php esc_html_e('File Picker', 'woocommerce-checkout-manager'); ?></option>
236
- </select>
237
- <span class="description"><?php esc_html_e('Type of the checkout field', 'woocommerce-checkout-manager'); ?></span>
238
- </p>
239
- </div>-->
240
- <div class="options_group">
241
- <!--
242
- 1326
243
- <p class="form-field">
244
- <label><?php esc_html_e('Adapt', 'woocommerce-checkout-manager'); ?></label>
245
- <input <# if ( data.fancy == 'country_select' ) { #>checked<# } #> type="checkbox" name="fancy" value="country_select">
246
- </p>
247
- -->
248
- <p class="form-field">
249
- <label><?php esc_html_e('Title', 'woocommerce-checkout-manager'); ?></label>
250
- <input class="short" type="text" name="force_title2" placeholder="<?php esc_html_e('Name Guide', 'woocommerce-checkout-manager'); ?>" value="{{data.force_title2}}">
251
- </p>
252
- <p class="form-field">
253
- <label><?php esc_html_e('Options', 'woocommerce-checkout-manager'); ?></label>
254
- <input class="short" type="text" name="option_array" placeholder="Option 1||Option 2||Option 3" value="{{data.option_array}}">
255
- </p>
256
- </div>
257
- </div>
258
-
259
- <div id="shipping_product_data" class="panel woocommerce_options_panel hidden" style="display: none;">
260
- <div class="options_group">
261
- <p class="form-field">
262
- <label><?php esc_html_e('Conditional', 'woocommerce-checkout-manager'); ?></label>
263
- <input <# if ( data.conditional_parent_use == 'true' ) { #>checked<# } #> type="checkbox" name="conditional_parent_use" value="true">
264
- </p>
265
- <p class="form-field">
266
- <label><?php esc_html_e('Conditional Parent', 'woocommerce-checkout-manager'); ?></label>
267
- <input <# if ( data.conditional_parent == 'true' ) { #>checked<# } #> type="checkbox" name="conditional_parent" value="true">
268
- </p>
269
- <p class="form-field">
270
- <label><?php esc_html_e('Conditional Tie', 'woocommerce-checkout-manager'); ?></label>
271
- <input class="short" type="text" name="conditional_tie" placeholder="<?php esc_html_e('Parent Abbr. Name', 'woocommerce-checkout-manager'); ?>" value="{{data.conditional_tie}}">
272
- </p>
273
- <p class="form-field">
274
- <label><?php esc_html_e('Chosen Value', 'woocommerce-checkout-manager'); ?></label>
275
- <input class="short" type="text" name="chosen_valt" placeholder="<?php esc_html_e('Yes'); ?>" value="{{data.chosen_valt}}">
276
- </p>
277
- </div>
278
- </div>
279
-
280
- <div id="linked_product_data" class="panel woocommerce_options_panel hidden" style="display: none;">
281
-
282
- <div class="options_group">
283
- <p class="form-field">
284
- <label><?php esc_html_e('Add Amount', 'woocommerce-checkout-manager'); ?></label>
285
- <input <# if ( data.add_amount == 'true' ) { #>checked<# } #> type="checkbox" name="add_amount" value="true">
286
- </p>
287
- <p class="form-field">
288
- <label><?php esc_html_e('Amount Name', 'woocommerce-checkout-manager'); ?></label>
289
- <input class="short" name="fee_name" type="text" value="{{data.fee_name}}" placeholder="<?php esc_html_e('My Custom Charge', 'woocommerce-checkout-manager'); ?>">
290
- </p>
291
- <p class="form-field">
292
- <label><?php esc_html_e('Amount Total', 'woocommerce-checkout-manager'); ?></label>
293
- <input class="short" name="add_amount_field" type="text" value="{{data.add_amount_field}}" placeholder="50">
294
- <select style="margin:0 0 0 10px;line-height: 30px; height: 30px;" class="select" name="add_amount_type">
295
- <option value="fixed" selected="selected">$</option>
296
- <option value="percent">%</option>
297
- </select>
298
- </p>
299
- </div>
300
-
301
- <div class="options_group">
302
- <p class="form-field">
303
- <label><?php esc_html_e('Tax Remove', 'woocommerce-checkout-manager'); ?></label>
304
- <input <# if ( data.tax_remove == 'true' ) { #>checked<# } #> type="checkbox" name="tax_remove" value="true">
305
- </p>
306
- <!--<p class="form-field">
307
- <label><?php esc_html_e('Deny Checkout', 'woocommerce-checkout-manager'); ?></label>
308
- <input <# if ( data.deny_checkout == 'true' ) { #>checked<# } #> type="checkbox" name="deny_checkout" value="true">
309
- <span class="description"><?php esc_html_e('1326.', 'woocommerce-checkout-manager'); ?></span>
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="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="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="colorpickertype">
322
- <option <# if ( data.colorpickertype == 'farbtastic' ) { #>selected<# } #> value="farbtastic"><?php esc_html_e('Farbtastic', 'woocommerce-checkout-manager'); ?></option>
323
- <option <# if ( data.colorpickertype == 'iris' ) { #>selected<# } #> value="iris"><?php esc_html_e('Iris', 'woocommerce-checkout-manager'); ?></option>
324
- </select>
325
- </p>
326
- </div>
327
-
328
- </div>
329
-
330
- <div id="variable_product_options" class="panel woocommerce_options_panel hidden" style="display: none;">
331
-
332
- <div class="options_group">
333
- <p class="form-field">
334
- <label><?php esc_html_e('User Role', 'woocommerce-checkout-manager'); ?></label>
335
- <input <# if ( data.user_role == 'user_role' ) { #>checked<# } #> type="checkbox" name="user_role" value="user_role">
336
- </p>
337
- <p class="form-field">
338
- <label><?php esc_html_e('Show for Roles', 'woocommerce-checkout-manager'); ?></label>
339
- <input class="short" type="text" name="role_options" placeholder="Option 1||Option 2||Option 3" value="{{data.role_options}}">
340
- </p>
341
- <p class="form-field">
342
- <label><?php esc_html_e('Hide for Roles', 'woocommerce-checkout-manager'); ?></label>
343
- <input class="short" type="text" name="role_options2" placeholder="Option 1||Option 2||Option 3" value="{{data.role_options2}}">
344
- </p>
345
- </div>
346
-
347
- <div class="options_group">
348
- <p class="form-field">
349
- <label><?php esc_html_e('More', 'woocommerce-checkout-manager'); ?></label>
350
- <input <# if ( data.more_content == '1' ) { #>checked<# } #> type="checkbox" name="more_content" value="1">
351
- <span class="description"><?php esc_html_e('Apply conditions event it there is more than one product', 'woocommerce-checkout-manager'); ?></span>
352
- </p>
353
- </div>
354
-
355
- <div class="options_group">
356
- <p class="form-field">
357
- <label><?php esc_html_e('Hide Field from Product', 'woocommerce-checkout-manager'); ?></label>
358
- <input class="short" type="text" name="single_p" placeholder="<?php esc_html_e('Product ID(s) e.g 1674||1233', 'woocommerce-checkout-manager'); ?>" value="{{data.single_p}}">
359
- </p>
360
- <p class="form-field">
361
- <label><?php esc_html_e('Show Field for Product', 'woocommerce-checkout-manager'); ?></label>
362
- <input class="short" type="text" name="single_px" placeholder="<?php esc_html_e('Product ID(s) e.g 1674||1233', 'woocommerce-checkout-manager'); ?>" value="{{data.single_px}}">
363
- </p>
364
- </div>
365
-
366
- <div class="options_group">
367
- <p class="form-field">
368
- <label><?php esc_html_e('Hide Field from Category', 'woocommerce-checkout-manager'); ?></label>
369
- <input class="short" type="text" name="single_p_cat" placeholder="<?php esc_html_e('Category Slug(s) e.g my-cat||my-cat2', 'woocommerce-checkout-manager'); ?>" value="{{data.single_p_cat}}">
370
- </p>
371
- <p class="form-field">
372
- <label><?php esc_html_e('Show Field for Category', 'woocommerce-checkout-manager'); ?></label>
373
- <input class="short" type="text" name="single_px_cat" placeholder="<?php esc_html_e('Category Slug(s) e.g my-cat||my-cat2', 'woocommerce-checkout-manager'); ?>" value="{{data.sigle_px_cat}}">
374
- </p>
375
- </div>
376
- </div>
377
-
378
- <div id="advanced_product_data" class="panel woocommerce_options_panel hidden" style="display: none;">
379
-
380
- <div class="options_group">
381
- <p class="form-field">
382
- <label><?php esc_html_e('Start Hour', 'woocommerce-checkout-manager'); ?></label>
383
- <input class="short" type="text" placeholder="6" name="start_hour" value="{{data.start_hour}}">
384
- </p>
385
- <p class="form-field">
386
- <label><?php esc_html_e('End Hour', 'woocommerce-checkout-manager'); ?></label>
387
- <input class="short" type="text" placeholder="9" name="end_hour" value="{{data.end_hour}}">
388
- </p>
389
- <p class="form-field">
390
- <label><?php esc_html_e('Interval Min.', 'woocommerce-checkout-manager'); ?></label>
391
- <input class="short" type="text" placeholder="15" name="interval_min" value="{{data.interval_min}}">
392
- </p>
393
- <p class="form-field">
394
- <label><?php esc_html_e('Manual Min.', 'woocommerce-checkout-manager'); ?></label>
395
- <input class="short" type="text" placeholder="0, 10, 20, 30, 40" name="manual_min" value="{{data.manual_min}}">
396
- </p>
397
- </div>
398
-
399
- <div class="options_group">
400
- <p class="form-field">
401
- <label><?php esc_html_e('Date Format', 'woocommerce-checkout-manager'); ?></label>
402
- <input class="short" type="text" placeholder="dd-mm-yy" name="format_date" value="{{data.format_date}}">
403
- </p>
404
- <p class="form-field">
405
- <label><?php esc_html_e('Days Before', 'woocommerce-checkout-manager'); ?></label>
406
- <input class="short" type="text" placeholder="+3" name="min_before" value="{{data.min_before}}">
407
- </p>
408
- <p class="form-field">
409
- <label><?php esc_html_e('Days After', 'woocommerce-checkout-manager'); ?></label>
410
- <input class="short" type="text" placeholder="3" name="max_after" value="{{data.max_after}}">
411
- </p>
412
- <p class="form-field">
413
- <label><?php esc_html_e('Days Enabler', 'woocommerce-checkout-manager'); ?></label>
414
- <input <# if ( data.days_disabler == 'true' ) { #>checked<# } #> type="checkbox" name="days_disabler" value="true">
415
- </p>
416
- <p class="form-field">
417
- <label><?php esc_html_e('Sundays', 'woocommerce-checkout-manager'); ?></label>
418
- <input <# if ( data.days_disabler0 == '1' ) { #>checked<# } #> type="checkbox" name="days_disabler0" value="1">
419
- </p>
420
- <p class="form-field">
421
- <label><?php esc_html_e('Mondays', 'woocommerce-checkout-manager'); ?></label>
422
- <input <# if ( data.days_disabler1 == '1' ) { #>checked<# } #> type="checkbox" name="days_disabler1" value="1">
423
- </p>
424
- <p class="form-field">
425
- <label><?php esc_html_e('Tuesdays', 'woocommerce-checkout-manager'); ?></label>
426
- <input <# if ( data.days_disabler2 == '1' ) { #>checked<# } #> type="checkbox" name="days_disabler2" value="1">
427
- </p>
428
- <p class="form-field">
429
- <label><?php esc_html_e('Wednesdays', 'woocommerce-checkout-manager'); ?></label>
430
- <input <# if ( data.days_disabler3 == '1' ) { #>checked<# } #> type="checkbox" name="days_disabler3" value="1">
431
- </p>
432
- <p class="form-field">
433
- <label><?php esc_html_e('Thursdays', 'woocommerce-checkout-manager'); ?></label>
434
- <input <# if ( data.days_disabler4 == '1' ) { #>checked<# } #> type="checkbox" name="days_disabler4" value="1">
435
- </p>
436
- <p class="form-field">
437
- <label><?php esc_html_e('Fridays', 'woocommerce-checkout-manager'); ?></label>
438
- <input <# if ( data.days_disabler5 == '1' ) { #>checked<# } #> type="checkbox" name="days_disabler5" value="1">
439
- </p>
440
- <p class="form-field">
441
- <label><?php esc_html_e('Satudays', 'woocommerce-checkout-manager'); ?></label>
442
- <input <# if ( data.days_disabler6 == '1' ) { #>checked<# } #> type="checkbox" name="days_disabler6" value="1">
443
- </p>
444
- </div>
445
-
446
- <div class="options_group">
447
- <p class="form-field dimensions_field">
448
- <label for="product_length"><?php esc_html_e('Min Date', 'woocommerce-checkout-manager'); ?></label>
449
- <span class="wrap">
450
- <input style="width:29%" type="text" name="single_yy" placeholder="2013" title="yy" value="{{data.single_yy}}">
451
- <input style="width:29%" type="text" name="single_mm" placeholder="10" title="mm" value="{{data.single_mm}}">
452
- <input style="width:29%" type="text" name="single_dd" placeholder="25" title="dd" value="{{data.single_dd}}">
453
- </span>
454
- <span class="woocommerce-help-tip"></span>
455
- </p>
456
- <p class="form-field dimensions_field">
457
- <label for="product_length"><?php esc_html_e('Max Date', 'woocommerce-checkout-manager'); ?></label>
458
- <span class="wrap">
459
- <input style="width:29%" type="text" name="single_max_yy" placeholder="2013" title="yy" value="{{data.single_max_yy}}">
460
- <input style="width:29%" type="text" name="single_max_mm" placeholder="10" title="mm" value="{{data.single_max_mm}}">
461
- <input style="width:29%" type="text" name="single_max_dd" placeholder="25" title="dd" value="{{data.single_max_dd}}">
462
- </span>
463
- <span class="woocommerce-help-tip"></span>
464
- </p>
465
- </div>
466
-
467
- </div>
468
- <div id="advanced_panel" class="panel woocommerce_options_panel hidden" style="display: none;">
469
- <div class="options_group">
470
- <p class="form-field">
471
- <label><?php esc_html_e('Listable', 'woocommerce-checkout-manager'); ?></label>
472
- <input <# if ( data.clear_row == 'true' ) { #>checked<# } #> type="checkbox" name="listable" value="listable">
473
- <span class="description"><?php esc_html_e('Display in View Orders screen ', 'woocommerce-checkout-manager'); ?></span>
474
- </p>
475
- <p class="form-field">
476
- <label><?php esc_html_e('Sortable', 'woocommerce-checkout-manager'); ?></label>
477
- <input <# if ( data.clear_row == 'true' ) { #>checked<# } #> type="checkbox" name="sortable" value="sortable">
478
- <span class="description"><?php esc_html_e('Allow Sorting on View Orders screen', 'woocommerce-checkout-manager'); ?></span>
479
- </p>
480
- <p class="form-field">
481
- <label><?php esc_html_e('Filterable', 'woocommerce-checkout-manager'); ?></label>
482
- <input <# if ( data.clear_row == 'true' ) { #>checked<# } #> type="checkbox" name="filterable" value="filterable">
483
- <span class="description"><?php esc_html_e('Allow Filtering on View Orders screen', 'woocommerce-checkout-manager'); ?></span>
484
- </p>
485
- </div>
486
- </div>
487
- <div id="marketplace_suggestions" class="panel woocommerce_options_panel hidden" style="display: none;">
488
- <div class="marketplace-suggestions-container showing-suggestion" data-marketplace-suggestions-context="product-edit-meta-tab-header">
489
- <div class="marketplace-suggestion-container" data-suggestion-slug="product-edit-meta-tab-header">
490
- <div class="marketplace-suggestion-container-content">
491
- <h4>Recommended extensions</h4></div>
492
- <div class="marketplace-suggestion-container-cta"></div>
493
- </div>
494
- </div>
495
- <div class="marketplace-suggestions-container showing-suggestion" data-marketplace-suggestions-context="product-edit-meta-tab-body">
496
- <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">
497
- <div class="marketplace-suggestion-container-content">
498
- <h4>Name Your Price</h4>
499
- <p>Let customers pay what they want - useful for donations, tips and more</p>
500
- </div>
501
- <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>
502
- <a class="suggestion-dismiss" title="Dismiss this suggestion" href="#"></a>
503
- </div>
504
- </div>
505
- <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">
506
- <div class="marketplace-suggestion-container-content">
507
- <h4>Additional Variation Images</h4>
508
- <p>Showcase your products in the best light with a image for each variation</p>
509
- </div>
510
- <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>
511
- <a class="suggestion-dismiss" title="Dismiss this suggestion" href="#"></a>
512
- </div>
513
- </div>
514
- <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">
515
- <div class="marketplace-suggestion-container-content">
516
- <h4>One Page Checkout</h4>
517
- <p>Don't make customers click around - let them choose products, checkout &amp; pay all on one page</p>
518
- </div>
519
- <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>
520
- <a class="suggestion-dismiss" title="Dismiss this suggestion" href="#"></a>
521
- </div>
522
- </div>
523
- <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">
524
- <div class="marketplace-suggestion-container-content">
525
- <h4>Min/Max Quantities</h4>
526
- <p>Specify minimum and maximum allowed product quantities for orders to be completed</p>
527
- </div>
528
- <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>
529
- <a class="suggestion-dismiss" title="Dismiss this suggestion" href="#"></a>
530
- </div>
531
- </div>
532
- </div>
533
- <div class="marketplace-suggestions-container showing-suggestion" data-marketplace-suggestions-context="product-edit-meta-tab-footer">
534
- <div class="marketplace-suggestion-container" data-suggestion-slug="product-edit-meta-tab-footer-browse-all">
535
- <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>
536
- <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>
537
- </div>
538
- </div>
539
- <div class="marketplace-suggestions-metabox-nosuggestions-placeholder hidden">
540
- <img src="https://woocommerce.com/wp-content/plugins/wccom-plugins/marketplace-suggestions/icons/get_more_options.svg" class="marketplace-suggestion-icon">
541
- <div class="marketplace-suggestion-placeholder-content">
542
- <h4>Enhance your products</h4>
543
- <p>Extensions can add new functionality to your product pages that make your store stand out</p>
544
- </div>
545
- <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>
546
- <br>
547
- <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>
548
- </div>
549
- </div>
550
- <div class="clear"></div>
551
- </div>
552
- </div>
553
-
554
- </div>
555
- <div class="attachment-info">
556
- <span class="settings-save-status">
557
- <span class="spinner"></span>
558
- <span class="saved"><?php esc_html_e('Saved.'); ?></span>
559
- </span>
560
- <div class="details">
561
- <div class="filename"><strong><?php esc_html_e('Field id', 'woocommerce-checkout-manager'); ?>:</strong> #{{data.id}}</div>
562
- <div class="filename"><strong><?php esc_html_e('Filed slug', 'woocommerce-checkout-manager'); ?>:</strong> {{data.cow}}</div>
563
- </div>
564
-
565
- <div class="settings">
566
-
567
- <label class="setting" data-setting="label">
568
- <span class="name"><?php esc_html_e('Type', 'woocommerce-checkout-manager'); ?></span>
569
- <select name="type">
570
- <option <# if ( data.type == 'wooccmtext' ) { #>selected<# } #> value="wooccmtext"><?php esc_html_e('Text Input', 'woocommerce-checkout-manager'); ?></option>
571
- <option <# if ( data.type == 'wooccmtextarea' ) { #>selected<# } #> value="wooccmtextarea"><?php esc_html_e('Textarea', 'woocommerce-checkout-manager'); ?></option>
572
- <option <# if ( data.type == 'wooccmpassword' ) { #>selected<# } #> value="wooccmpassword"><?php esc_html_e('Password', 'woocommerce-checkout-manager'); ?></option>
573
- <option <# if ( data.type == 'wooccmradio' ) { #>selected<# } #> value="wooccmradio"><?php esc_html_e('Radio Buttons', 'woocommerce-checkout-manager'); ?></option>
574
- <option <# if ( data.type == 'checkbox_wccm' ) { #>selected<# } #> value="checkbox_wccm"><?php esc_html_e('Check Box', 'woocommerce-checkout-manager'); ?></option>
575
- <option <# if ( data.type == 'wooccmselect' ) { #>selected<# } #> value="wooccmselect"><?php esc_html_e('Select Options', 'woocommerce-checkout-manager'); ?></option>
576
- <option <# if ( data.type == 'datepicker' ) { #>selected<# } #> value="datepicker"><?php esc_html_e('Date Picker', 'woocommerce-checkout-manager'); ?></option>
577
- <option <# if ( data.type == 'time' ) { #>selected<# } #> value="time"><?php esc_html_e('Time Picker', 'woocommerce-checkout-manager'); ?></option>
578
- <option <# if ( data.type == 'colorpicker' ) { #>selected<# } #> value="colorpicker"><?php esc_html_e('Color Picker', 'woocommerce-checkout-manager'); ?></option>
579
- <option <# if ( data.type == 'heading' ) { #>selected<# } #> value="heading"><?php esc_html_e('Heading', 'woocommerce-checkout-manager'); ?></option>
580
- <option <# if ( data.type == 'multiselect' ) { #>selected<# } #> value="multiselect"><?php esc_html_e('Multi-Select', 'woocommerce-checkout-manager'); ?></option>
581
- <option <# if ( data.type == 'multicheckbox' ) { #>selected<# } #> value="multicheckbox"><?php esc_html_e('Multi-Checkbox', 'woocommerce-checkout-manager'); ?></option>
582
- <option <# if ( data.type == 'wooccmcountry' ) { #>selected<# } #> value="wooccmcountry"><?php esc_html_e('Country', 'woocommerce-checkout-manager'); ?></option>
583
- <option <# if ( data.type == 'wooccmstate' ) { #>selected<# } #> value="wooccmstate"><?php esc_html_e('State', 'woocommerce-checkout-manager'); ?></option>
584
- <option <# if ( data.type == 'wooccmupload' ) { #>selected<# } #> value="wooccmupload"><?php esc_html_e('File Picker', 'woocommerce-checkout-manager'); ?></option>
585
- </select>
586
- </label>
587
- <p class="description"><?php esc_html_e('Type of the checkout field', 'woocommerce-checkout-manager'); ?></p>
588
-
589
- <label class="setting" data-setting="label">
590
- <span class="name"><?php esc_html_e('Label', 'woocommerce-checkout-manager'); ?></span>
591
- <input type="text" name="label" placeholder="<?php esc_html_e('My Field Name', 'woocommerce-checkout-manager'); ?>" value="{{data.label}}">
592
- </label>
593
- <p class="description"><?php esc_html_e('Label text for the checkout field.', 'woocommerce-checkout-manager'); ?></p>
594
- <label class="setting" data-setting="placeholder">
595
- <span class="name"><?php esc_html_e('Placeholder', 'woocommerce-checkout-manager'); ?></span>
596
- <input type="text" name="placeholder" placeholder="<?php esc_html_e('Example red', 'woocommerce-checkout-manager'); ?>" value="{{data.placeholder}}">
597
- </label>
598
- <p class="description"><?php esc_html_e('Placeholder text for the checkout field.', 'woocommerce-checkout-manager'); ?></p>
599
- <label class="setting" data-setting="position">
600
- <span class="name"><?php esc_html_e('Position', 'woocommerce-checkout-manager'); ?></span>
601
- <select class="select short" name="position">
602
- <option <# if ( data.position == 'form-row-wide' ) { #>selected<# } #> value="form-row-wide"><?php esc_html_e('Wide', 'woocommerce-checkout-manager'); ?></option>
603
- <option <# if ( data.position == 'form-row-first' ) { #>selected<# } #> value="form-row-first"><?php esc_html_e('Left', 'woocommerce-checkout-manager'); ?></option>
604
- <option <# if ( data.position == 'form-row-last' ) { #>selected<# } #> value="form-row-last"><?php esc_html_e('Right', 'woocommerce-checkout-manager'); ?></option>
605
- </select>
606
- </label>
607
- <p class="description"><?php esc_html_e('Placement of the checkout field.', 'woocommerce-checkout-manager'); ?></p>
608
- <label class="setting" data-setting="clear_row">
609
- <span class="name"><?php esc_html_e('Clear', 'woocommerce-checkout-manager'); ?></span>
610
- <input <# if ( data.clear_row == 'true' ) { #>checked<# } #> type="checkbox" name="clear_row" value="true">
611
- </label>
612
- <p class="description"><?php esc_html_e('Applies a clear fix to the checkout field.', 'woocommerce-checkout-manager'); ?></p>
613
- <label class="setting" data-setting="extra_class">
614
- <span class="name"><?php esc_html_e('Extra class', 'woocommerce-checkout-manager'); ?></span>
615
- <input class="short" type="text" name="extra_class" value="{{data.extra_class}}">
616
- </label>
617
-
618
- <div class="attachment-compat">
619
- <form class="compat-item"></form>
620
- </div>
621
- </div>
622
-
623
- <div class="actions">
624
- <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> |
625
- <a target="_blank" href="<?php echo WOOCCM_PURCHASE_URL; ?>"><?php esc_html_e('Get premium version', 'woocommerce-checkout-manager'); ?></a> |
626
- <a target="_blank" href="<?php echo WOOCCM_PURCHASE_URL; ?>"><?php esc_html_e('Get premium version', 'woocommerce-checkout-manager'); ?></a>
627
- </div>
628
-
629
- </div>
630
- </div>
631
-
632
- </div>
633
- <div class="media-frame-toolbar" style="left:0;">
634
- <div class="media-toolbar">
635
- <div class="media-toolbar-secondary"></div>
636
- <div class="media-toolbar-primary search-form">
637
- <button type="submit" class="media-modal-save button button-primary media-button button-large"><?php esc_html_e('Save'); ?></button>
638
- <button type="button" class="media-modal-delete button button-secondary media-button button-large"><?php esc_html_e('Delete'); ?></button>
639
- </div>
640
- </div>
641
- </div>
642
- </div>
643
- </form>
644
- </div>
645
- </div>
646
- </script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
new/admin/pages/general.php DELETED
@@ -1,133 +0,0 @@
1
- <h1 class="screen-reader-text"><?php esc_html_e('General', 'woocommerce-checkout-manager'); ?></h1>
2
- <h2><?php esc_html_e('General', 'woocommerce-checkout-manager'); ?></h2>
3
- <div id="wooccm_billing_settings-description">
4
- <p>Email notifications sent from WooCommerce are listed below. Click on an email to configure it.</p>
5
- </div>
6
- <table class="form-table" cellspacing="0">
7
- <tbody>
8
- <tr valign="top" class="">
9
- <th scope="row" class="titledesc">
10
- <?php esc_html_e('Hide shipping fields', 'woocommerce-checkout-manager'); ?>
11
- </th>
12
- <td class="forminp forminp-checkbox">
13
- <fieldset>
14
- <legend class="screen-reader-text">
15
- <span>
16
- <?php printf(__('Hide %s heading', 'woocommerce-checkout-manager'), __('Ship to a different address?', 'woocommerce-checkout-manager')); ?>
17
- </span>
18
- </legend>
19
- <label for="woocommerce_allow_bulk_remove_personal_data">
20
- <input type="checkbox" name="wccs_settings[checkness][additional_info]" value="true"<?php checked(!empty($options['checkness']['additional_info']), true); ?> />
21
- <?php printf(__('Hide %s heading', 'woocommerce-checkout-manager'), __('Ship to a different address?', 'woocommerce-checkout-manager')); ?>
22
- </label>
23
- <!--<p class="description"><?php printf(__('Hide %s heading', 'woocommerce-checkout-manager'), __('Ship to a different address?', 'woocommerce-checkout-manager')); ?></p>-->
24
- </fieldset>
25
- </td>
26
- </tr>
27
-
28
- <tr valign="top" class="">
29
- <th scope="row" class="titledesc">
30
- <?php esc_html_e('Show shipping checkout fields', 'woocommerce-checkout-manager'); ?>
31
- </th>
32
- <td class="forminp forminp-checkbox">
33
- <fieldset>
34
- <legend class="screen-reader-text">
35
- <span>
36
- <?php esc_html_e('Show shipping checkout fields', 'woocommerce-checkout-manager'); ?>
37
- </span>
38
- </legend>
39
- <label for="show_shipping_fields">
40
- <input type="checkbox" name="wccs_settings[checkness][show_shipping_fields]" value="true"<?php checked(!empty($options['checkness']['show_shipping_fields']), true); ?> />
41
- <?php printf(__(' Force show Shipping Checkout fields', 'woocommerce-checkout-manager'), sprintf(__('Hide %s heading', 'woocommerce-checkout-manager'), __('Ship to a different address?', 'woocommerce-checkout-manager'))); ?>
42
- </label>
43
- <p class="description"><?php printf(__('To be used in conjunction with %s', 'woocommerce-checkout-manager'), __('Ship to a different address?', 'woocommerce-checkout-manager')); ?></p>
44
- </fieldset>
45
- </td>
46
- </tr>
47
- <tr valign="top" class="">
48
- <th scope="row" class="titledesc">
49
- <?php esc_html_e('Hide create an account', 'woocommerce-checkout-manager'); ?>
50
- </th>
51
- <td class="forminp forminp-checkbox">
52
- <fieldset>
53
- <legend class="screen-reader-text">
54
- <span>
55
- <?php esc_html_e('Hide create an account', 'woocommerce-checkout-manager'); ?>
56
- </span>
57
- </legend>
58
- <label for="auto_create_wccm_account">
59
- <input type="checkbox" name="wccs_settings[checkness][auto_create_wccm_account]" value="true"<?php checked(!empty($options['checkness']['auto_create_wccm_account']), true); ?> />
60
- <?php printf(__('Hide %s checkbox on Checkout page for guests', 'woocommerce-checkout-manager'), __('Create an account?', 'woocommerce-checkout-manager')); ?>
61
- </label>
62
- <p class="description"><?php printf(__('Hide %s checkbox on Checkout page for guests', 'woocommerce-checkout-manager'), __('Create an account?', 'woocommerce-checkout-manager')); ?></p>
63
- </fieldset>
64
- </td>
65
- </tr>
66
- <tr valign="top" class="">
67
- <th scope="row" class="titledesc">
68
- <?php _e('Retain Fields Information', 'woocommerce-checkout-manager'); ?>
69
- </th>
70
- <td class="forminp forminp-checkbox">
71
- <fieldset>
72
- <legend class="screen-reader-text">
73
- <span>
74
- <?php _e('Retain Fields Information', 'woocommerce-checkout-manager'); ?>
75
- </span>
76
- </legend>
77
- <label for="retainval">
78
- <input type="checkbox" name="wccs_settings[checkness][retainval]" value="true"<?php checked(!empty($options['checkness']['retainval']), true); ?> />
79
- <?php _e('Retain Fields Information', 'woocommerce-checkout-manager'); ?>
80
- </label>
81
- <p class="description"><?php _e('Retain Fields Information', 'woocommerce-checkout-manager'); ?></p>
82
- </fieldset>
83
- </td>
84
- </tr>
85
- <tr valign="top" class="">
86
- <th scope="row" class="titledesc">
87
- <?php _e('Editing Of Abbreviation Fields', 'woocommerce-checkout-manager'); ?>
88
- </th>
89
- <td class="forminp forminp-checkbox">
90
- <fieldset>
91
- <legend class="screen-reader-text">
92
- <span>
93
- <?php _e('Editing Of Abbreviation Fields', 'woocommerce-checkout-manager'); ?>
94
- </span>
95
- </legend>
96
- <label for="abbreviation">
97
- <input type="checkbox" name="wccs_settings[checkness][abbreviation]" value="true"<?php checked(!empty($options['checkness']['abbreviation']), true); ?> />
98
- <?php _e('Editing Of Abbreviation Fields', 'woocommerce-checkout-manager'); ?>
99
- </label>
100
- <p class="description"><?php _e('Editing Of Abbreviation Fields', 'woocommerce-checkout-manager'); ?></p>
101
- </fieldset>
102
- </td>
103
- </tr>
104
- <tr valign="top">
105
- <th scope="row" class="titledesc">
106
- <label for="position">
107
- <?php _e('Additional fields position', 'woocommerce-checkout-manager'); ?>
108
- <span class="woocommerce-help-tip"></span>
109
- </label>
110
- </th>
111
- <td class="forminp forminp-select">
112
- <select name="position" id="position" style="min-width:300px;" class="wc-enhanced-select enhanced" tabindex="-1" aria-hidden="true">
113
- <option value="before_billing_form" <?php selected($options['checkness']['position'], 'before_billing_form'); ?>><?php _e('Before Billing fields', 'woocommerce-checkout-manager'); ?></option>
114
- <option value="after_billing_form" <?php selected($options['checkness']['position'], 'after_billing_form'); ?>><?php _e('After Billing fields', 'woocommerce-checkout-manager'); ?></option>
115
- <option value="before_shipping_form" <?php selected($options['checkness']['position'], 'before_shipping_form'); ?>><?php _e('Before Shipping fields', 'woocommerce-checkout-manager'); ?></option>
116
- <option value="after_shipping_form" <?php selected($options['checkness']['position'], 'after_shipping_form'); ?>><?php _e('After Shipping fields', 'woocommerce-checkout-manager'); ?></option>
117
- <option value="after_order_notes" <?php selected($options['checkness']['position'], 'after_order_notes'); ?>><?php _e('After Order Notes', 'woocommerce-checkout-manager'); ?></option>
118
- </select>
119
- </td>
120
- </tr>
121
- </tbody>
122
- </table>
123
- <!--<div class="section">
124
- <h3 class="heading checkbox">
125
- <div class="option">
126
- <label>
127
- <input type="checkbox" name="wccs_settings[checkness][admin_translation]" value="true"<?php checked(!empty($options['checkness']['admin_translation']), true); ?> />
128
- <div class="info-of"><?php _e('Translate WooCommerce Checkout Manager Options Panel', 'woocommerce-checkout-manager'); ?></div>
129
- </label>
130
- </div>
131
- </h3>
132
- </div>-->
133
- <!-- section -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
new/admin/pages/orders.php DELETED
@@ -1,8 +0,0 @@
1
- <?php
2
-
3
- /*
4
- * To change this license header, choose License Headers in Project Properties.
5
- * To change this template file, choose Tools | Templates
6
- * and open the template in the editor.
7
- */
8
-
 
 
 
 
 
 
 
 
new/admin/pages/shipping.php DELETED
@@ -1,8 +0,0 @@
1
- <?php
2
-
3
- /*
4
- * To change this license header, choose License Headers in Project Properties.
5
- * To change this template file, choose Tools | Templates
6
- * and open the template in the editor.
7
- */
8
-
 
 
 
 
 
 
 
 
new/checkout.php CHANGED
@@ -153,13 +153,6 @@ if (!class_exists('WOOCCM_Checkout')) {
153
  }
154
  }
155
 
156
- function checkout_attachment_results() {
157
- ?>
158
- <div class="clear"></div>
159
- <div style="margin: 16px 0 0 0; display: none;" id="wooccm_checkout_attachment_results" class="woocommerce-message"></div>
160
- <?php
161
- }
162
-
163
  function init() {
164
  add_action('wp_ajax_wooccm_checkout_attachment_upload', array($this, 'ajax_checkout_attachment_upload'));
165
  add_action('wp_ajax_nopriv_wooccm_checkout_attachment_upload', array($this, 'ajax_checkout_attachment_upload'));
@@ -168,7 +161,6 @@ if (!class_exists('WOOCCM_Checkout')) {
168
  add_action('woocommerce_checkout_update_order_meta', array($this, 'checkout_billing_attachment_update_ids'));
169
  add_action('woocommerce_checkout_update_order_meta', array($this, 'checkout_shipping_attachment_update_ids'));
170
  add_action('woocommerce_checkout_update_order_meta', array($this, 'checkout_additional_attachment_update_ids'));
171
- add_action('woocommerce_review_order_after_submit', array($this, 'checkout_attachment_results'));
172
  }
173
 
174
  public static function instance() {
153
  }
154
  }
155
 
 
 
 
 
 
 
 
156
  function init() {
157
  add_action('wp_ajax_wooccm_checkout_attachment_upload', array($this, 'ajax_checkout_attachment_upload'));
158
  add_action('wp_ajax_nopriv_wooccm_checkout_attachment_upload', array($this, 'ajax_checkout_attachment_upload'));
161
  add_action('woocommerce_checkout_update_order_meta', array($this, 'checkout_billing_attachment_update_ids'));
162
  add_action('woocommerce_checkout_update_order_meta', array($this, 'checkout_shipping_attachment_update_ids'));
163
  add_action('woocommerce_checkout_update_order_meta', array($this, 'checkout_additional_attachment_update_ids'));
 
164
  }
165
 
166
  public static function instance() {
new/fields_conditional.php CHANGED
@@ -7,17 +7,17 @@ if (!class_exists('WOOCCM_Fields_Conditional')) {
7
  protected static $i = 0;
8
 
9
  function add_field_class($field, $key) {
10
-
11
- // Conditional
12
- // -----------------------------------------------------------------------
13
- if (!empty($field['conditional_tie'])) {
14
- $field['class'][] = $field['conditional_tie'];
15
  }
16
-
17
  return $field;
18
  }
19
 
20
- function add_conditional_interaction($fields, $name, $key, $prefix = '') {
 
 
21
 
22
  if ($options = get_option($name)) {
23
 
@@ -40,7 +40,6 @@ if (!class_exists('WOOCCM_Fields_Conditional')) {
40
 
41
  <script>
42
  (function ($) {
43
-
44
  <?php
45
  if ($field['type'] == 'checkbox_wccm') :
46
  if (!empty($field['conditional_parent']) && !empty($field['conditional_parent_use']) && !empty($field['chosen_valt'])) :
@@ -69,7 +68,7 @@ if (!class_exists('WOOCCM_Fields_Conditional')) {
69
  if ($field['type'] == 'wooccmselect') :
70
  if (!empty($field['conditional_parent']) && !empty($field['conditional_parent_use']) && !empty($field['chosen_valt'])) :
71
  ?>
72
- $("#billing_<?php echo $field['cow'] . '_field.' . $field['conditional_tie']; ?> select").change(function () {
73
  <?php
74
  foreach ($options['billing_buttons'] as $field3) :
75
  if (empty($field3['conditional_parent']) && !empty($field3['conditional_parent_use']) && !empty($field3['conditional_tie'])) :
@@ -135,16 +134,15 @@ if (!class_exists('WOOCCM_Fields_Conditional')) {
135
 
136
  function add_checkout_billing_conditional($fields) {
137
  $this->add_conditional_interaction($fields, 'wccs_settings3', 'billing_buttons', 'billing_');
138
- }
139
 
140
  function init() {
141
  // Add field class
142
  add_filter('wooccm_checkout_field_filter', array($this, 'add_field_class'), 10, 2);
143
 
144
- // Add contional interactions
145
- add_action('woocommerce_after_checkout_form', array($this, 'add_checkout_additional_conditional'));
146
- add_action('woocommerce_after_checkout_form', array($this, 'add_checkout_shipping_conditional'));
147
- add_action('woocommerce_after_checkout_form', array($this, 'add_checkout_billing_conditional'));
148
  }
149
 
150
  public static function instance() {
7
  protected static $i = 0;
8
 
9
  function add_field_class($field, $key) {
10
+ if (!empty($field['conditional_parent_use']) && !empty($field['conditional_tie']) && !empty($field['chosen_valt']) && ($field['conditional_tie'] != $field['cow'])) {
11
+ $field['class'][] = 'wooccm-conditional-child';
12
+ $field['custom_attributes']['data-conditional-parent'] = $field['conditional_tie'];
13
+ $field['custom_attributes']['data-conditional-parent-value'] = $field['chosen_valt'];
 
14
  }
 
15
  return $field;
16
  }
17
 
18
+ /*
19
+ *
20
+ * function add_conditional_interaction($fields, $name, $key, $prefix = '') {
21
 
22
  if ($options = get_option($name)) {
23
 
40
 
41
  <script>
42
  (function ($) {
 
43
  <?php
44
  if ($field['type'] == 'checkbox_wccm') :
45
  if (!empty($field['conditional_parent']) && !empty($field['conditional_parent_use']) && !empty($field['chosen_valt'])) :
68
  if ($field['type'] == 'wooccmselect') :
69
  if (!empty($field['conditional_parent']) && !empty($field['conditional_parent_use']) && !empty($field['chosen_valt'])) :
70
  ?>
71
+ $("#billing_<?php echo $field['cow'] . '_field.' . $field['conditional_tie']; ?> select").on('change', function () {
72
  <?php
73
  foreach ($options['billing_buttons'] as $field3) :
74
  if (empty($field3['conditional_parent']) && !empty($field3['conditional_parent_use']) && !empty($field3['conditional_tie'])) :
134
 
135
  function add_checkout_billing_conditional($fields) {
136
  $this->add_conditional_interaction($fields, 'wccs_settings3', 'billing_buttons', 'billing_');
137
+ }*/
138
 
139
  function init() {
140
  // Add field class
141
  add_filter('wooccm_checkout_field_filter', array($this, 'add_field_class'), 10, 2);
142
 
143
+ //add_action('woocommerce_after_checkout_form', array($this, 'add_checkout_additional_conditional'));
144
+ //add_action('woocommerce_after_checkout_form', array($this, 'add_checkout_shipping_conditional'));
145
+ //add_action('woocommerce_after_checkout_form', array($this, 'add_checkout_billing_conditional'));
 
146
  }
147
 
148
  public static function instance() {
new/fields_filters.php CHANGED
@@ -162,8 +162,8 @@ function wooccm_checkout_field_text_handler($field = '', $key, $args, $value) {
162
 
163
  add_filter('woocommerce_form_field_wooccmtext', 'wooccm_checkout_field_text_handler', 10, 4);
164
 
165
- // Textarea
166
- function wooccm_checkout_field_textarea_handler($field = '', $key, $args, $value) {
167
 
168
  global $current_user;
169
 
@@ -171,57 +171,57 @@ function wooccm_checkout_field_textarea_handler($field = '', $key, $args, $value
171
  $user_role = array_shift($user_roles);
172
 
173
  if (!empty($args['user_role']) && (!empty($args['role_options']) || !empty($args['role_options2']))) {
174
- $rolekeys = explode('||', $args['role_options']);
175
- $rolekeys2 = explode('||', $args['role_options2']);
176
- if (!empty($args['role_options']) && !in_array($user_role, $rolekeys)) {
177
- return;
178
- }
179
- if (!empty($args['role_options2']) && in_array($user_role, $rolekeys2)) {
180
- return;
181
- }
182
  }
183
 
184
  if (!empty($args['clear']))
185
- $after = '<div class="clear"></div>';
186
  else
187
- $after = '';
188
 
189
  if ($args['wooccm_required']) {
190
- $args['class'][] = 'validate-required';
191
- $required = '&nbsp;<abbr class="required" title="' . esc_attr__('required', 'woocommerce') . '">*</abbr>';
192
  } else {
193
- $required = '';
194
  }
195
 
196
  $args['maxlength'] = ( $args['maxlength'] ) ? 'maxlength="' . absint($args['maxlength']) . '"' : '';
197
 
198
  if (is_string($args['label_class'])) {
199
- $args['label_class'] = array($args['label_class']);
200
  }
201
 
202
  if (is_null($value)) {
203
- $value = $args['default'];
204
  }
205
 
206
- // Custom attribute handling
207
  $custom_attributes = array();
208
 
209
  if (!empty($args['custom_attributes']) && is_array($args['custom_attributes'])) {
210
- foreach ($args['custom_attributes'] as $attribute => $attribute_value) {
211
- $custom_attributes[] = esc_attr($attribute) . '="' . esc_attr($attribute_value) . '"';
212
- }
213
  }
214
 
215
  if (!empty($args['validate'])) {
216
- foreach ($args['validate'] as $validate) {
217
- $args['class'][] = 'validate-' . $validate;
218
- }
219
  }
220
 
221
  $field = '<p class="form-row ' . esc_attr(implode(' ', $args['class'])) . '" id="' . esc_attr($args['id']) . '_field">';
222
 
223
  if ($args['label']) {
224
- $field .= '<label for="' . esc_attr($args['id']) . '" class="' . esc_attr(implode(' ', $args['label_class'])) . '">' . $args['label'] . $required . '</label>';
225
  }
226
 
227
  // WordPress Filters to override default row and column counts
@@ -231,15 +231,15 @@ function wooccm_checkout_field_textarea_handler($field = '', $key, $args, $value
231
  $field .= '<textarea name="' . esc_attr($key) . '" class="input-text ' . esc_attr(implode(' ', $args['input_class'])) . '" id="' . esc_attr($args['id']) . '" placeholder="' . esc_attr($args['placeholder']) . '" ' . $args['maxlength'] . ' ' . ( empty($args['custom_attributes']['rows']) ? ' rows="' . $rows . '"' : '' ) . ( empty($args['custom_attributes']['cols']) ? ' cols="' . $columns . '"' : '' ) . implode(' ', $custom_attributes) . '>' . esc_textarea($value) . '</textarea>';
232
 
233
  if ($args['description']) {
234
- $field .= '<span class="description">' . esc_attr($args['description']) . '</span>';
235
  }
236
 
237
  $field .= '</p>' . $after;
238
 
239
  return $field;
240
- }
241
 
242
- add_filter('woocommerce_form_field_wooccmtextarea', 'wooccm_checkout_field_textarea_handler', 10, 4);
243
 
244
  // Password
245
  function wooccm_checkout_field_password_handler($field = '', $key, $args, $value) {
@@ -354,7 +354,7 @@ function wooccm_checkout_field_radio_handler($field = '', $key, $args, $value) {
354
  $field .= '<fieldset><legend>' . $args['label'] . $required . '</legend>';
355
 
356
  if (!empty($args['options'])) {
357
- foreach (explode('||', $args['options']) as $option_key => $option_text) {
358
  $field .= '<label><input type="radio" ' . checked($value, wooccm_wpml_string(esc_attr($option_text)), false) . ' name="' . esc_attr($key) . '" value="' . wooccm_wpml_string(esc_attr($option_text)) . '" /> ' . wooccm_wpml_string(esc_html($option_text)) . '</label>';
359
  }
360
  }
@@ -366,8 +366,8 @@ function wooccm_checkout_field_radio_handler($field = '', $key, $args, $value) {
366
 
367
  add_filter('woocommerce_form_field_wooccmradio', 'wooccm_checkout_field_radio_handler', 10, 4);
368
 
369
- // Select Options
370
- function wooccm_checkout_field_select_handler($field = '', $key, $args, $value) {
371
 
372
  global $current_user;
373
 
@@ -375,26 +375,26 @@ function wooccm_checkout_field_select_handler($field = '', $key, $args, $value)
375
  $user_role = array_shift($user_roles);
376
 
377
  if (!empty($args['user_role']) && (!empty($args['role_options']) || !empty($args['role_options2']))) {
378
- $rolekeys = explode('||', $args['role_options']);
379
- $rolekeys2 = explode('||', $args['role_options2']);
380
- if (!empty($args['role_options']) && !in_array($user_role, $rolekeys)) {
381
- return;
382
- }
383
- if (!empty($args['role_options2']) && in_array($user_role, $rolekeys2)) {
384
- return;
385
- }
386
  }
387
 
388
  if (!empty($args['clear']))
389
- $after = '<div class="clear"></div>';
390
  else
391
- $after = '';
392
 
393
  if ($args['wooccm_required']) {
394
- $args['class'][] = 'validate-required';
395
- $required = '&nbsp;<abbr class="required" title="' . esc_attr__('required', 'woocommerce') . '">*</abbr>';
396
  } else {
397
- $required = '';
398
  }
399
 
400
  $args['maxlength'] = ( $args['maxlength'] ) ? 'maxlength="' . absint($args['maxlength']) . '"' : '';
@@ -402,28 +402,31 @@ function wooccm_checkout_field_select_handler($field = '', $key, $args, $value)
402
  $options = '';
403
 
404
  if (!empty($args['options'])) {
405
- $options .= ( $args['default'] ? '<option value="">' . $args['default'] . '</option>' : '' );
406
- foreach (explode('||', $args['options']) as $option_key => $option_text)
407
- $options .= '<option ' . selected($value, $option_key, false) . '>' . wooccm_wpml_string(esc_attr($option_text)) . '</option>';
408
- }
409
 
 
 
 
 
410
  $field = '<p class="form-row ' . esc_attr(implode(' ', $args['class'])) . '" id="' . esc_attr($key) . '_field">';
411
 
412
  if ($args['label'])
413
- $field .= '<label for="' . esc_attr($key) . '" class="' . implode(' ', $args['label_class']) . '">' . $args['label'] . $required . '</label>';
414
 
415
  $field .= '
416
  <select class="' . esc_attr($args['fancy']) . '" data-placeholder="' . (!empty($args['default']) ? __($args['default'], 'woocommerce-checkout-manager') : '' ) . '" name="' . esc_attr($key) . '" id="' . esc_attr($key) . '" >
417
- ' . $options . '
418
  </select>
419
- </p>' . $after;
420
 
421
  return $field;
422
- }
423
 
424
- add_filter('woocommerce_form_field_wooccmselect', 'wooccm_checkout_field_select_handler', 10, 4);
425
 
426
- // Check Box
427
  function wooccm_checkout_field_checkbox_handler($field = '', $key, $args, $value) {
428
 
429
  global $current_user;
@@ -467,7 +470,7 @@ function wooccm_checkout_field_checkbox_handler($field = '', $key, $args, $value
467
  return $field;
468
  }
469
 
470
- add_filter('woocommerce_form_field_checkbox_wccm', 'wooccm_checkout_field_checkbox_handler', 10, 4);
471
 
472
  /* State
473
  function wooccm_checkout_field_state_handler($field = '', $key, $args, $value) {
@@ -732,10 +735,12 @@ function wooccm_checkout_field_multiselect_handler($field = '', $key, $args, $va
732
 
733
  $options = '';
734
 
735
- if (!empty($args['options']))
736
- foreach (explode('||', $args['options']) as $option_key => $option_text)
737
  $options .= '<option value="' . wooccm_wpml_string(esc_attr($option_text)) . '" ' . selected($value, $option_key, false) . '>' . wooccm_wpml_string(esc_attr($option_text)) . '</option>';
738
-
 
 
739
  $field = '<p class="form-row ' . esc_attr(implode(' ', $args['class'])) . '" id="' . esc_attr($key) . '_field">';
740
 
741
  if ($args['label'])
@@ -754,22 +759,6 @@ add_filter('woocommerce_form_field_multiselect', 'wooccm_checkout_field_multisel
754
  // Multi-Checkbox
755
  function wooccm_checkout_field_multicheckbox_handler($field = '', $key, $args, $value) {
756
 
757
- global $current_user;
758
-
759
- $user_roles = $current_user->roles;
760
- $user_role = array_shift($user_roles);
761
-
762
- if (!empty($args['user_role']) && (!empty($args['role_options']) || !empty($args['role_options2']))) {
763
- $rolekeys = explode('||', $args['role_options']);
764
- $rolekeys2 = explode('||', $args['role_options2']);
765
- if (!empty($args['role_options']) && !in_array($user_role, $rolekeys)) {
766
- return;
767
- }
768
- if (!empty($args['role_options2']) && in_array($user_role, $rolekeys2)) {
769
- return;
770
- }
771
- }
772
-
773
  if (!empty($args['clear']))
774
  $after = '<div class="clear"></div>';
775
  else
@@ -787,7 +776,7 @@ function wooccm_checkout_field_multicheckbox_handler($field = '', $key, $args, $
787
  $options = '';
788
 
789
  if (!empty($args['options'])) {
790
- foreach (explode('||', $args['options']) as $option_key => $option_text) {
791
  $options .= '<label><input type="checkbox" name="' . esc_attr($key) . '[]" value="' . wooccm_wpml_string(esc_attr($option_text)) . '"' . selected($value, $option_key, false) . ' /> ' . wooccm_wpml_string(esc_attr($option_text)) . '</label>';
792
  }
793
  }
162
 
163
  add_filter('woocommerce_form_field_wooccmtext', 'wooccm_checkout_field_text_handler', 10, 4);
164
 
165
+ /* Textarea
166
+ function wooccm_checkout_field_textarea_handler($field = '', $key, $args, $value) {
167
 
168
  global $current_user;
169
 
171
  $user_role = array_shift($user_roles);
172
 
173
  if (!empty($args['user_role']) && (!empty($args['role_options']) || !empty($args['role_options2']))) {
174
+ $rolekeys = explode('||', $args['role_options']);
175
+ $rolekeys2 = explode('||', $args['role_options2']);
176
+ if (!empty($args['role_options']) && !in_array($user_role, $rolekeys)) {
177
+ return;
178
+ }
179
+ if (!empty($args['role_options2']) && in_array($user_role, $rolekeys2)) {
180
+ return;
181
+ }
182
  }
183
 
184
  if (!empty($args['clear']))
185
+ $after = '<div class="clear"></div>';
186
  else
187
+ $after = '';
188
 
189
  if ($args['wooccm_required']) {
190
+ $args['class'][] = 'validate-required';
191
+ $required = '&nbsp;<abbr class="required" title="' . esc_attr__('required', 'woocommerce') . '">*</abbr>';
192
  } else {
193
+ $required = '';
194
  }
195
 
196
  $args['maxlength'] = ( $args['maxlength'] ) ? 'maxlength="' . absint($args['maxlength']) . '"' : '';
197
 
198
  if (is_string($args['label_class'])) {
199
+ $args['label_class'] = array($args['label_class']);
200
  }
201
 
202
  if (is_null($value)) {
203
+ $value = $args['default'];
204
  }
205
 
206
+ // Custom attribute handling
207
  $custom_attributes = array();
208
 
209
  if (!empty($args['custom_attributes']) && is_array($args['custom_attributes'])) {
210
+ foreach ($args['custom_attributes'] as $attribute => $attribute_value) {
211
+ $custom_attributes[] = esc_attr($attribute) . '="' . esc_attr($attribute_value) . '"';
212
+ }
213
  }
214
 
215
  if (!empty($args['validate'])) {
216
+ foreach ($args['validate'] as $validate) {
217
+ $args['class'][] = 'validate-' . $validate;
218
+ }
219
  }
220
 
221
  $field = '<p class="form-row ' . esc_attr(implode(' ', $args['class'])) . '" id="' . esc_attr($args['id']) . '_field">';
222
 
223
  if ($args['label']) {
224
+ $field .= '<label for="' . esc_attr($args['id']) . '" class="' . esc_attr(implode(' ', $args['label_class'])) . '">' . $args['label'] . $required . '</label>';
225
  }
226
 
227
  // WordPress Filters to override default row and column counts
231
  $field .= '<textarea name="' . esc_attr($key) . '" class="input-text ' . esc_attr(implode(' ', $args['input_class'])) . '" id="' . esc_attr($args['id']) . '" placeholder="' . esc_attr($args['placeholder']) . '" ' . $args['maxlength'] . ' ' . ( empty($args['custom_attributes']['rows']) ? ' rows="' . $rows . '"' : '' ) . ( empty($args['custom_attributes']['cols']) ? ' cols="' . $columns . '"' : '' ) . implode(' ', $custom_attributes) . '>' . esc_textarea($value) . '</textarea>';
232
 
233
  if ($args['description']) {
234
+ $field .= '<span class="description">' . esc_attr($args['description']) . '</span>';
235
  }
236
 
237
  $field .= '</p>' . $after;
238
 
239
  return $field;
240
+ }
241
 
242
+ add_filter('woocommerce_form_field_wooccmtextarea', 'wooccm_checkout_field_textarea_handler', 10, 4); */
243
 
244
  // Password
245
  function wooccm_checkout_field_password_handler($field = '', $key, $args, $value) {
354
  $field .= '<fieldset><legend>' . $args['label'] . $required . '</legend>';
355
 
356
  if (!empty($args['options'])) {
357
+ foreach ($args['options'] as $option_key => $option_text) {
358
  $field .= '<label><input type="radio" ' . checked($value, wooccm_wpml_string(esc_attr($option_text)), false) . ' name="' . esc_attr($key) . '" value="' . wooccm_wpml_string(esc_attr($option_text)) . '" /> ' . wooccm_wpml_string(esc_html($option_text)) . '</label>';
359
  }
360
  }
366
 
367
  add_filter('woocommerce_form_field_wooccmradio', 'wooccm_checkout_field_radio_handler', 10, 4);
368
 
369
+ /* Select Options
370
+ function wooccm_checkout_field_select_handler($field = '', $key, $args, $value) {
371
 
372
  global $current_user;
373
 
375
  $user_role = array_shift($user_roles);
376
 
377
  if (!empty($args['user_role']) && (!empty($args['role_options']) || !empty($args['role_options2']))) {
378
+ $rolekeys = explode('||', $args['role_options']);
379
+ $rolekeys2 = explode('||', $args['role_options2']);
380
+ if (!empty($args['role_options']) && !in_array($user_role, $rolekeys)) {
381
+ return;
382
+ }
383
+ if (!empty($args['role_options2']) && in_array($user_role, $rolekeys2)) {
384
+ return;
385
+ }
386
  }
387
 
388
  if (!empty($args['clear']))
389
+ $after = '<div class="clear"></div>';
390
  else
391
+ $after = '';
392
 
393
  if ($args['wooccm_required']) {
394
+ $args['class'][] = 'validate-required';
395
+ $required = '&nbsp;<abbr class="required" title="' . esc_attr__('required', 'woocommerce') . '">*</abbr>';
396
  } else {
397
+ $required = '';
398
  }
399
 
400
  $args['maxlength'] = ( $args['maxlength'] ) ? 'maxlength="' . absint($args['maxlength']) . '"' : '';
402
  $options = '';
403
 
404
  if (!empty($args['options'])) {
405
+ //$options .= ( $args['default'] ? '<option value="">' . $args['default'] . '</option>' : '' );
406
+
407
+ var_dump($value);
 
408
 
409
+ foreach (explode('||', $args['options']) as $option_key => $option_text) {
410
+ $options .= '<option value="' . $option_text . '" ' . selected($value, $option_text, false) . '>' . wooccm_wpml_string(esc_attr($option_text)) . '</option>';
411
+ }
412
+ }
413
  $field = '<p class="form-row ' . esc_attr(implode(' ', $args['class'])) . '" id="' . esc_attr($key) . '_field">';
414
 
415
  if ($args['label'])
416
+ $field .= '<label for="' . esc_attr($key) . '" class="' . implode(' ', $args['label_class']) . '">' . $args['label'] . $required . '</label>';
417
 
418
  $field .= '
419
  <select class="' . esc_attr($args['fancy']) . '" data-placeholder="' . (!empty($args['default']) ? __($args['default'], 'woocommerce-checkout-manager') : '' ) . '" name="' . esc_attr($key) . '" id="' . esc_attr($key) . '" >
420
+ ' . $options . '
421
  </select>
422
+ </p>' . $after;
423
 
424
  return $field;
425
+ }
426
 
427
+ add_filter('woocommerce_form_field_wooccmselect', 'wooccm_checkout_field_select_handler', 10, 4); */
428
 
429
+ /* Check Box
430
  function wooccm_checkout_field_checkbox_handler($field = '', $key, $args, $value) {
431
 
432
  global $current_user;
470
  return $field;
471
  }
472
 
473
+ add_filter('woocommerce_form_field_checkbox_wccm', 'wooccm_checkout_field_checkbox_handler', 10, 4);*/
474
 
475
  /* State
476
  function wooccm_checkout_field_state_handler($field = '', $key, $args, $value) {
735
 
736
  $options = '';
737
 
738
+ if (!empty($args['options'])) {
739
+ foreach ($args['options'] as $option_key => $option_text) {
740
  $options .= '<option value="' . wooccm_wpml_string(esc_attr($option_text)) . '" ' . selected($value, $option_key, false) . '>' . wooccm_wpml_string(esc_attr($option_text)) . '</option>';
741
+ }
742
+ }
743
+
744
  $field = '<p class="form-row ' . esc_attr(implode(' ', $args['class'])) . '" id="' . esc_attr($key) . '_field">';
745
 
746
  if ($args['label'])
759
  // Multi-Checkbox
760
  function wooccm_checkout_field_multicheckbox_handler($field = '', $key, $args, $value) {
761
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
762
  if (!empty($args['clear']))
763
  $after = '<div class="clear"></div>';
764
  else
776
  $options = '';
777
 
778
  if (!empty($args['options'])) {
779
+ foreach ($args['options'] as $option_key => $option_text) {
780
  $options .= '<label><input type="checkbox" name="' . esc_attr($key) . '[]" value="' . wooccm_wpml_string(esc_attr($option_text)) . '"' . selected($value, $option_key, false) . ' /> ' . wooccm_wpml_string(esc_attr($option_text)) . '</label>';
781
  }
782
  }
new/fields_handler.php CHANGED
@@ -9,8 +9,6 @@ if (!class_exists('WOOCCM_Fields_Handler')) {
9
 
10
  function add_field_classes($field, $key) {
11
 
12
- //var_dump($field);
13
-
14
  // Position
15
  // -----------------------------------------------------------------------
16
  if (!empty($field['position'])) {
@@ -18,12 +16,18 @@ if (!class_exists('WOOCCM_Fields_Handler')) {
18
  $field['class'][] = $field['position'];
19
  }
20
 
 
 
 
 
 
 
21
  // Type
22
  // -----------------------------------------------------------------------
23
  if (!empty($field['type'])) {
24
  $field['class'][] = 'wooccm-type-' . $field['type'];
25
  }
26
-
27
  // Color
28
  // -----------------------------------------------------------------------
29
  if (!empty($field['type']) && $field['type'] == 'colorpicker') {
@@ -50,7 +54,7 @@ if (!class_exists('WOOCCM_Fields_Handler')) {
50
  foreach ($fields as $key => $type) {
51
 
52
  foreach ($type as $id => $field) {
53
- //var_dump($field);
54
  // Remove disabled
55
  // -------------------------------------------------------------------
56
  if (!empty($field['disabled'])) {
9
 
10
  function add_field_classes($field, $key) {
11
 
 
 
12
  // Position
13
  // -----------------------------------------------------------------------
14
  if (!empty($field['position'])) {
16
  $field['class'][] = $field['position'];
17
  }
18
 
19
+ // WOOCCM
20
+ // -----------------------------------------------------------------------
21
+
22
+ $field['class'][] = 'wooccm-field';
23
+ $field['class'][] = 'wooccm-field-' . $field['cow'];
24
+
25
  // Type
26
  // -----------------------------------------------------------------------
27
  if (!empty($field['type'])) {
28
  $field['class'][] = 'wooccm-type-' . $field['type'];
29
  }
30
+
31
  // Color
32
  // -----------------------------------------------------------------------
33
  if (!empty($field['type']) && $field['type'] == 'colorpicker') {
54
  foreach ($fields as $key => $type) {
55
 
56
  foreach ($type as $id => $field) {
57
+
58
  // Remove disabled
59
  // -------------------------------------------------------------------
60
  if (!empty($field['disabled'])) {
new/fields_init.php ADDED
@@ -0,0 +1,311 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if (!class_exists('WOOCCM_Fields')) {
4
+
5
+ class WOOCCM_Fields {
6
+
7
+ protected static $instance;
8
+
9
+ public static function get_default_address_fields() {
10
+
11
+ $defaults = array(
12
+ 'country',
13
+ 'first_name',
14
+ 'last_name',
15
+ 'company',
16
+ 'address_1',
17
+ 'address_2',
18
+ 'city',
19
+ 'state',
20
+ 'postcode',
21
+ 'email',
22
+ 'phone'
23
+ );
24
+
25
+ return array_merge(array_keys(WC()->countries->get_default_address_fields()), $defaults);
26
+ }
27
+
28
+ public static function get_fields_parent_types() {
29
+
30
+ return array(
31
+ 'text',
32
+ 'textarea',
33
+ 'password',
34
+ 'select',
35
+ 'multiselect',
36
+ 'radio',
37
+ 'checkbox',
38
+ 'multicheckbox',
39
+ 'datepicker',
40
+ 'timepicker',
41
+ 'colorpicker',
42
+ 'country',
43
+ 'state',
44
+ //'heading',
45
+ //'button' => __('Button', 'woocommerce-checkout-manager'),
46
+ 'file'
47
+ );
48
+ }
49
+
50
+ public static function get_fields_types() {
51
+
52
+ return apply_filters('wooccm_fields_fields_types', array(
53
+ 'text' => __('Text', 'woocommerce-checkout-manager'),
54
+ 'textarea' => __('Text Area', 'woocommerce-checkout-manager'),
55
+ 'password' => __('Text Area', 'woocommerce-checkout-manager'),
56
+ 'select' => __('Select', 'woocommerce-checkout-manager'),
57
+ 'multiselect' => __('Multiselect', 'woocommerce-checkout-manager'),
58
+ 'radio' => __('Radio', 'woocommerce-checkout-manager'),
59
+ 'checkbox' => __('Checkbox', 'woocommerce-checkout-manager'),
60
+ 'multicheckbox' => __('Multi-checkbox', 'woocommerce-checkout-manager'),
61
+ 'datepicker' => __('Datepicker', 'woocommerce-checkout-manager'),
62
+ 'timepicker' => __('Timepicker', 'woocommerce-checkout-manager'),
63
+ 'colorpicker' => __('Colorpicker', 'woocommerce-checkout-manager'),
64
+ 'country' => __('Countru', 'woocommerce-checkout-manager'),
65
+ 'state' => __('State', 'woocommerce-checkout-manager'),
66
+ 'heading' => __('Heading', 'woocommerce-checkout-manager'),
67
+ //'button' => __('Button', 'woocommerce-checkout-manager'),
68
+ 'file' => __('File', 'woocommerce-checkout-manager'),
69
+ ));
70
+ }
71
+
72
+ static function get_field_args() {
73
+
74
+ $args = array(
75
+ // Defaults
76
+ // -------------------------------------------------------------------
77
+ 'disabled' => false,
78
+ 'order' => null,
79
+ 'priority' => null,
80
+ 'slug' => null,
81
+ 'type' => null,
82
+ 'label' => null,
83
+ 'placeholder' => null,
84
+ //'force_title2' => null,
85
+ 'default' => null,
86
+ //'color' => null,
87
+ //'colorpickerd' => null,
88
+ 'position' => null,
89
+ //'clear_row' => null,
90
+ 'clear' => null,
91
+ //'options_array' => null,
92
+ 'options' => null,
93
+ 'required' => null,
94
+ //'checkbox' => null,
95
+ //'wooccm_required' => null,
96
+ 'class' => null,
97
+ 'extra_class' => null,
98
+ // Display
99
+ // -------------------------------------------------------------------
100
+ 'user_role' => null,
101
+ 'role_options' => array(),
102
+ 'role_options2' => array(),
103
+ 'more_content' => null,
104
+ 'single_p' => array(),
105
+ 'single_p_cat' => array(),
106
+ 'single_px' => array(),
107
+ 'single_px_cat' => array(),
108
+ // Timing
109
+ // -------------------------------------------------------------------
110
+ 'start_hour' => null,
111
+ 'end_hour' => null,
112
+ 'interval_min' => null,
113
+ 'manual_min' => null,
114
+ 'min_before' => null,
115
+ 'max_after' => null,
116
+ 'format_date' => null,
117
+ 'single_dd' => null,
118
+ 'single_max_dd' => null,
119
+ 'single_max_mm' => null,
120
+ 'single_max_yy' => null,
121
+ 'single_mm' => null,
122
+ 'single_yy' => null,
123
+ // Amount
124
+ // -------------------------------------------------------------------
125
+ 'add_amount' => null,
126
+ //'fee_name' => null,
127
+ 'add_admoun_name' => null,
128
+ 'add_amount_type' => null,
129
+ 'add_amount_tax' => null,
130
+ //'tax_remove' => null,
131
+ // Conditional
132
+ // -------------------------------------------------------------------
133
+ 'conditional' => null,
134
+ //'conditional_parent_use' => null,
135
+ //'conditional_tie' => null,
136
+ 'conditional_parent_slug' => null,
137
+ 'conditional_parent_value' => null,
138
+ //'conditional_parent' => null,
139
+ //'chosen_valt' => null,
140
+ // Display
141
+ // -------------------------------------------------------------------
142
+ 'listable' => null,
143
+ 'sortable' => null,
144
+ 'filterable' => null,
145
+ //
146
+ // Email
147
+ // -------------------------------------------------------------------
148
+ //deny_receipt
149
+ //'colorpickertype' => null,
150
+ //'fancy' => null,
151
+ );
152
+
153
+ return $args;
154
+ }
155
+
156
+ public static function get_billing_fields() {
157
+ return self::get_fields('wccs_settings3', 'billing', self::get_default_address_fields());
158
+ }
159
+
160
+ public static function get_shipping_fields() {
161
+ return self::get_fields('wccs_settings2', 'shipping', self::get_default_address_fields());
162
+ }
163
+
164
+ public static function get_additional_fields() {
165
+ return self::get_fields('wccs_settings', '', self::get_default_address_fields());
166
+ }
167
+
168
+ protected static function get_fields($name, $prefix = 'additional', $defaults = array()) {
169
+
170
+ if ($fields = get_option($name, $prefix, $defaults)) {
171
+
172
+ // Compatibility with 4.x
173
+ // ---------------------------------------------------------------------
174
+ if (array_key_exists("{$prefix}_buttons", $fields)) {
175
+ $fields = $fields["{$prefix}_buttons"];
176
+ }
177
+
178
+ // Additional compatibility with 4.x
179
+ // ---------------------------------------------------------------------
180
+ if ($name == 'wccs_settings') {
181
+ $fields = (array) @$fields['buttons'];
182
+ }
183
+
184
+ foreach ($fields as $id => $field) {
185
+
186
+ $key = sprintf("%s_%s", $prefix, $field['cow']);
187
+
188
+ if (isset($_GET['page']) && strpos($_GET['page'], 'woocommerce-checkout-manager') !== false) {
189
+ $fields[$id] = self::old_panel_compatibility($field, $key);
190
+ } else {
191
+ $fields[$id] = self::new_panel_compatibility($field, $key);
192
+ }
193
+ }
194
+
195
+ // Resort the fields by order
196
+ // ---------------------------------------------------------------------
197
+ //$fields[] = uasort($fields, 'wooccm_sort_fields');
198
+ //if ($fields[0]) {
199
+ // unset($fields[0]);
200
+ //}
201
+ }
202
+
203
+ return $fields;
204
+ }
205
+
206
+ protected static function new_panel_compatibility($field, $key) {
207
+
208
+ if ($field['type'] == 'wooccmtext') {
209
+ $field['type'] = 'text';
210
+ }
211
+ if ($field['type'] == 'wooccmstate') {
212
+ $field['type'] = 'state';
213
+ }
214
+ if ($field['type'] == 'wooccmcountry') {
215
+ $field['type'] = 'country';
216
+ }
217
+ if ($field['type'] == 'wooccmselect') {
218
+ $field['type'] = 'select';
219
+ }
220
+ if ($field['type'] == 'wooccmtextarea') {
221
+ $field['type'] = 'textarea';
222
+ }
223
+ if ($field['type'] == 'checkbox_wccm') {
224
+ $field['type'] = 'checkbox';
225
+ }
226
+
227
+ $field['slug'] = @$field['cow'];
228
+ $field['id'] = $key;
229
+
230
+ if ($field['type'] == 'colorpicker') {
231
+ $field['default'] = @$field['colorpickerd'];
232
+ } else {
233
+ $field['default'] = @$field['force_title2'];
234
+ }
235
+
236
+ if (!empty($field['role_options']) && !is_array($field['role_options'])) {
237
+ if (strpos($field['role_options'], '||') !== false) {
238
+ $field['role_options'] = explode('||', $field['role_options']);
239
+ } else {
240
+ $field['role_options'] = (array) $field['role_options'];
241
+ }
242
+ }
243
+
244
+ if (!empty($field['role_options2']) && !is_array($field['role_options2'])) {
245
+ if (strpos($field['role_options2'], '||') !== false) {
246
+ $field['role_options2'] = explode('||', $field['role_options2']);
247
+ } else {
248
+ $field['role_options2'] = (array) $field['role_options2'];
249
+ }
250
+ }
251
+
252
+ if (!empty($field['days_disabler'])) {
253
+
254
+ $field['days_disabler'] = array();
255
+
256
+ for ($day_index = 0; $day_index <= 6; $day_index++) {
257
+
258
+ if (!empty($field['days_disabler' . $day_index])) {
259
+ $field['days_disabler'][strval($day_index)] = strval($day_index);
260
+ }
261
+ }
262
+ }
263
+
264
+ $field['clear'] = @$field['clear_row'];
265
+ $field['required'] = @$field['checkbox'];
266
+ $field['conditional'] = @$field['conditional_parent_use'];
267
+ $field['conditional_tie'] = @$field['conditional_parent_slug'];
268
+ $field['conditional_value'] = @$field['chosen_valt'];
269
+ $field['add_amount_name'] = @$field['fee_name'];
270
+ $field['add_amount_tax'] = !@$field['tax_remove'];
271
+
272
+ return $field;
273
+ }
274
+
275
+ protected static function old_panel_compatibility($field) {
276
+
277
+ foreach ($field as $id => $key) {
278
+
279
+ if (is_array($field[$id]) && in_array('key', array('single_p', 'single_p_cat', 'single_px', 'single_px_cat'))) {
280
+ $field[$id] = implode('||', $field[$id]);
281
+ }
282
+
283
+ if (is_array(@$field['days_disabler'])) {
284
+
285
+ foreach ($field['days_disabler'] as $day_index => $day) {
286
+ $field['days_disabler' . strval($day_index)] = 1;
287
+ }
288
+
289
+ $field['days_disabler'] = 1;
290
+ }
291
+ }
292
+
293
+ return $field;
294
+ }
295
+
296
+ function init() {
297
+
298
+ }
299
+
300
+ public static function instance() {
301
+ if (!isset(self::$instance)) {
302
+ self::$instance = new self();
303
+ //self::$instance->init();
304
+ }
305
+ return self::$instance;
306
+ }
307
+
308
+ }
309
+
310
+ WOOCCM_Fields::instance();
311
+ }
new/fields_register.php CHANGED
@@ -8,17 +8,11 @@ if (!class_exists('WOOCCM_Fields_Register')) {
8
 
9
  function add_checkout_field_filter($key, $fields, $custom_field) {
10
 
11
- $defaults = array(
12
- 'address_1',
13
- 'address_2',
14
- 'city',
15
- 'postcode',
16
- 'state',
17
- 'country'
18
- );
19
 
20
  $fields[$key] = wp_parse_args($custom_field, (array) @$fields[$key]);
21
 
 
 
22
  // Class
23
  // -----------------------------------------------------------------------
24
  if (!is_array(@$fields[$key]['class'])) {
@@ -39,15 +33,18 @@ if (!class_exists('WOOCCM_Fields_Register')) {
39
 
40
  // Options
41
  // -----------------------------------------------------------------------
42
- //if (!empty($custom_field['option_array'])) {
43
- $fields[$key]['options'] = @$custom_field['option_array'];
44
- //}
45
- // Default
46
- // -----------------------------------------------------------------------
47
- if (isset($custom_field['force_title2'])) {
48
- $fields[$key]['default'] = $fields[$key]['force_title2'];
49
  }
50
 
 
 
 
 
 
51
  // Clear
52
  // -----------------------------------------------------------------------
53
  if (isset($custom_field['clear_row'])) {
@@ -71,6 +68,15 @@ if (!class_exists('WOOCCM_Fields_Register')) {
71
  if ($fields[$key]['type'] == 'wooccmcountry') {
72
  $fields[$key]['type'] = 'country';
73
  }
 
 
 
 
 
 
 
 
 
74
 
75
  // Required
76
  // -----------------------------------------------------------------------
8
 
9
  function add_checkout_field_filter($key, $fields, $custom_field) {
10
 
 
 
 
 
 
 
 
 
11
 
12
  $fields[$key] = wp_parse_args($custom_field, (array) @$fields[$key]);
13
 
14
+ //$fields[$key]['key'] = $key;
15
+
16
  // Class
17
  // -----------------------------------------------------------------------
18
  if (!is_array(@$fields[$key]['class'])) {
33
 
34
  // Options
35
  // -----------------------------------------------------------------------
36
+ if (!empty($custom_field['option_array'])) {
37
+
38
+ $options = explode('||', @$custom_field['option_array']);
39
+
40
+ $fields[$key]['options'] = array_combine($options, $options);
 
 
41
  }
42
 
43
+ // Default
44
+ // -----------------------------------------------------------------------
45
+ //if (isset($custom_field['force_title2'])) {
46
+ $fields[$key]['default'] = @$fields[$key]['force_title2'];
47
+ //}
48
  // Clear
49
  // -----------------------------------------------------------------------
50
  if (isset($custom_field['clear_row'])) {
68
  if ($fields[$key]['type'] == 'wooccmcountry') {
69
  $fields[$key]['type'] = 'country';
70
  }
71
+ if ($fields[$key]['type'] == 'wooccmselect') {
72
+ $fields[$key]['type'] = 'select';
73
+ }
74
+ if ($fields[$key]['type'] == 'wooccmtextarea') {
75
+ $fields[$key]['type'] = 'textarea';
76
+ }
77
+ if ($fields[$key]['type'] == 'checkbox_wccm') {
78
+ $fields[$key]['type'] = 'checkbox';
79
+ }
80
 
81
  // Required
82
  // -----------------------------------------------------------------------
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.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -137,6 +137,12 @@ Example:
137
 
138
  == Changelog ==
139
 
 
 
 
 
 
 
140
  = 4.4.6 =
141
  * Fix: woocommerce checkout undefined class
142
  * Improvement: woocommerce checkout color field rebuilt
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.8
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.8 =
141
+ * Improvement: backward compatibility with new panel
142
+
143
+ = 4.4.7 =
144
+ * Improvement: woocommerce checkout conditional fields rebuilt
145
+
146
  = 4.4.6 =
147
  * Fix: woocommerce checkout undefined class
148
  * Improvement: woocommerce checkout color field rebuilt
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.6
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.6');
20
  }
21
  if (!defined('WOOCCM_PLUGIN_FILE')) {
22
  define('WOOCCM_PLUGIN_FILE', __FILE__);
@@ -186,6 +186,8 @@ if (!class_exists('WOOCCM')) {
186
 
187
  wp_register_style('woocommerce_admin_marketplace_styles', WC()->plugin_url() . '/assets/css/marketplace-suggestions.css', array(), WC_VERSION);
188
 
 
 
189
  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);
190
 
191
  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);
@@ -242,16 +244,14 @@ if (!class_exists('WOOCCM')) {
242
 
243
  //1326
244
  // only for panel
245
- wp_enqueue_media();
 
246
  wp_enqueue_script('wooccm-modal');
247
-
248
  // 1326
249
  // only for orders
250
  wp_enqueue_script('wooccm-admin');
251
  // only for backend maybe orders
252
  wp_enqueue_script('wooccm-order-upload');
253
-
254
- wp_enqueue_style('woocommerce_admin_marketplace_styles');
255
  }
256
 
257
  function admin_head() {
@@ -368,13 +368,14 @@ if (!class_exists('WOOCCM')) {
368
  include( WOOCCM_PLUGIN_DIR . 'includes/templates/functions/required/billing_required.php' );
369
  include( WOOCCM_PLUGIN_DIR . 'includes/templates/functions/required/shipping_required.php' );
370
  //include( WOOCCM_PLUGIN_DIR . 'includes/templates/functions/wooccm_editing_wrapper.php' );
371
-
372
  // New
373
  // -----------------------------------------------------------------------
374
  //include( WOOCCM_PLUGIN_DIR . 'new/install.php' );
375
- //include( WOOCCM_PLUGIN_DIR . 'new/admin.php' );
 
376
  include( WOOCCM_PLUGIN_DIR . 'new/checkout.php' );
377
  include( WOOCCM_PLUGIN_DIR . 'new/orders.php' );
 
378
  include( WOOCCM_PLUGIN_DIR . 'new/fields_register.php' );
379
  include( WOOCCM_PLUGIN_DIR . 'new/fields_additional.php' );
380
  include( WOOCCM_PLUGIN_DIR . 'new/fields_display.php' );
2
  /**
3
  * Plugin Name: WooCommerce Checkout Manager
4
  * Description: Manages WooCommerce Checkout, the advanced way.
5
+ * Version: 4.4.8
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.8');
20
  }
21
  if (!defined('WOOCCM_PLUGIN_FILE')) {
22
  define('WOOCCM_PLUGIN_FILE', __FILE__);
186
 
187
  wp_register_style('woocommerce_admin_marketplace_styles', WC()->plugin_url() . '/assets/css/marketplace-suggestions.css', array(), WC_VERSION);
188
 
189
+ wp_register_style('wooccm-admin', plugins_url('assets/css/wooccm-admin.css', WOOCCM_PLUGIN_FILE), array('woocommerce_admin_marketplace_styles'), WOOCCM_PLUGIN_VERSION, 'all');
190
+
191
  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);
192
 
193
  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);
244
 
245
  //1326
246
  // only for panel
247
+ wp_enqueue_media();
248
+ wp_enqueue_style('wooccm-admin');
249
  wp_enqueue_script('wooccm-modal');
 
250
  // 1326
251
  // only for orders
252
  wp_enqueue_script('wooccm-admin');
253
  // only for backend maybe orders
254
  wp_enqueue_script('wooccm-order-upload');
 
 
255
  }
256
 
257
  function admin_head() {
368
  include( WOOCCM_PLUGIN_DIR . 'includes/templates/functions/required/billing_required.php' );
369
  include( WOOCCM_PLUGIN_DIR . 'includes/templates/functions/required/shipping_required.php' );
370
  //include( WOOCCM_PLUGIN_DIR . 'includes/templates/functions/wooccm_editing_wrapper.php' );
 
371
  // New
372
  // -----------------------------------------------------------------------
373
  //include( WOOCCM_PLUGIN_DIR . 'new/install.php' );
374
+ //include( WOOCCM_PLUGIN_DIR . 'new/admin/ajax.php' );
375
+ //include( WOOCCM_PLUGIN_DIR . 'new/admin/admin.php' );
376
  include( WOOCCM_PLUGIN_DIR . 'new/checkout.php' );
377
  include( WOOCCM_PLUGIN_DIR . 'new/orders.php' );
378
+ include( WOOCCM_PLUGIN_DIR . 'new/fields_init.php' );
379
  include( WOOCCM_PLUGIN_DIR . 'new/fields_register.php' );
380
  include( WOOCCM_PLUGIN_DIR . 'new/fields_additional.php' );
381
  include( WOOCCM_PLUGIN_DIR . 'new/fields_display.php' );