WooCommerce Checkout Manager - Version 4.6.3

Version Description

  • Fix: small CSS issues
  • Fix: woocommerce checkout manager upload files in admin panel
Download this release

Release Info

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

Code changes from version 4.6.2 to 4.6.3

assets/backend/css/wooccm-admin.css CHANGED
@@ -2,6 +2,21 @@
2
  opacity: 0.5;
3
  pointer-events: none;
4
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  table.wc_gateways > tbody > tr > td.label {
6
  font-weight: 600;
7
  }
@@ -86,6 +101,86 @@ table.wooccm-enhanced-options > tbody > tr > td.sort .wc-item-reorder-nav {
86
  box-shadow: 0 0 2px rgba(30, 140, 190, 0.8) !important;
87
  outline: 2px solid transparent!important;
88
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
89
  .marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context=product-edit-meta-tab-body] .marketplace-suggestion-container,
90
  .marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context=product-edit-meta-tab-footer] .marketplace-suggestion-container,
91
  .marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context=product-edit-meta-tab-header] .marketplace-suggestion-container {
2
  opacity: 0.5;
3
  pointer-events: none;
4
  }
5
+ .button.fileinput-button {
6
+ position: relative;
7
+ overflow: hidden!important;
8
+ }
9
+ .button.fileinput-button input {
10
+ position: absolute;
11
+ top: 0;
12
+ right: 0;
13
+ margin: 0;
14
+ opacity: 0;
15
+ -ms-filter: 'alpha(opacity=0)';
16
+ font-size: 200px;
17
+ direction: ltr;
18
+ cursor: pointer;
19
+ }
20
  table.wc_gateways > tbody > tr > td.label {
21
  font-weight: 600;
22
  }
101
  box-shadow: 0 0 2px rgba(30, 140, 190, 0.8) !important;
102
  outline: 2px solid transparent!important;
103
  }
104
+ #wooccm-order-files .inside {
105
+ margin: 0;
106
+ padding: 0;
107
+ background: #fefefe;
108
+ display: block!important;
109
+ }
110
+ #wooccm-order-files .handlediv,
111
+ #wooccm-order-files .hndle {
112
+ display: none;
113
+ }
114
+ #wooccm-order-files .wooccm_upload_results {
115
+ display: inline-block;
116
+ margin: 0 10px;
117
+ }
118
+ #wooccm-order-files .wooccm_order_attachments_wrapper {
119
+ margin: 0;
120
+ overflow-x: auto;
121
+ }
122
+ #wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments {
123
+ width: 100%;
124
+ background: #fff;
125
+ }
126
+ #wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments thead th:first-child {
127
+ padding-left: 2em;
128
+ }
129
+ #wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments thead th.sortable {
130
+ cursor: pointer;
131
+ }
132
+ #wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments .item {
133
+ min-width: 200px;
134
+ }
135
+ #wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments thead th {
136
+ text-align: left;
137
+ padding: 1em;
138
+ font-weight: 400;
139
+ color: #999;
140
+ background: #f8f8f8;
141
+ user-select: none;
142
+ }
143
+ #wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments tbody#order_line_items tr:first-child td {
144
+ border-top: none;
145
+ }
146
+ #wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments tbody tr:last-child td {
147
+ border-bottom: 1px solid #dfdfdf;
148
+ }
149
+ #wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments td.thumb {
150
+ text-align: left;
151
+ width: 38px;
152
+ padding-bottom: 1.5em;
153
+ }
154
+ #wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments td.thumb .wc-order-item-thumbnail {
155
+ width: 38px;
156
+ height: 38px;
157
+ border: 2px solid #e8e8e8;
158
+ background: #f8f8f8;
159
+ color: #ccc;
160
+ position: relative;
161
+ font-size: 21px;
162
+ display: block;
163
+ text-align: center;
164
+ }
165
+ #wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments tbody th:first-child,
166
+ #wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments td:first-child {
167
+ padding-left: 2em;
168
+ }
169
+ #wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments tbody th,
170
+ #wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments td {
171
+ padding: 1.5em 1em 1em;
172
+ text-align: left;
173
+ line-height: 1.5em;
174
+ vertical-align: top;
175
+ border-bottom: 1px solid #f8f8f8;
176
+ }
177
+ #wooccm-order-files .wc-order-data-row {
178
+ border-bottom: 1px solid #dfdfdf;
179
+ padding: 1.5em 2em;
180
+ background: #f8f8f8;
181
+ line-height: 2em;
182
+ text-align: left;
183
+ }
184
  .marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context=product-edit-meta-tab-body] .marketplace-suggestion-container,
185
  .marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context=product-edit-meta-tab-footer] .marketplace-suggestion-container,
186
  .marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context=product-edit-meta-tab-header] .marketplace-suggestion-container {
assets/backend/css/wooccm-admin.css.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../../less/wooccm-admin.less"],"names":[],"mappings":"AAAA;EACE,YAAA;EACA,oBAAA;;AAuBQ,KAPP,YAEC,QAEE,KACE,KAEG;EACC,gBAAA;;AAQV,KAAC;EACC,YAAA;EACA,gBAAA;;AAFF,KAAC,wBAIC,QACE,KACE;EACE,uBAAA;;AAPR,KAAC,wBAYC,QACE,KACE,KACE,MAAK;EACH,WAAA;;AAhBV,KAAC,wBAYC,QACE,KACE,KAIE,OAAM;EACJ,kBAAA;;AAnBV,KAAC,wBAYC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;AAGF,CAAC,mBAAmB;EAClB,sBAAA;EACA,WAAA;EACA,gBAAA;EACA,oBAAA;EACA,oBAAA;EACA,cAAA;EACA,mCAAA;EACA,SAAS,GAAT;EACA,qBAAA;EACA,gBAAA;;AAGF,kCAAkC,mBAAmB,iEAAkE,kCAAkC,sCAAsC,EAAC;EAC9L,qBAAA;EACA,gBAAA;EACA,kBAAA;EACA,SAAA;;AAGF,kCAAkC,mBAAmB;EACnD,YAAA;EACA,0BAAA;EACA,6BAAA;;AAGF,kCAAkC,mBAAoB,kCAAkC,sCAAsC;EAC5H,qBAAA;EACA,kBAAA;EACA,QAAA;EACA,WAAA;EACA,gBAAA;;AAEF,CAAC;EACC,YAAA;EACA,gBAAA;EACA,WAAA;;AAGF,kCAAkC,mBAAoB;EACpD,wBAAA;EACA,+BAAA;EACA,uBAAA;EACA,oBAAA;EACA,qBAAA;EACA,aAAA;EACA,4BAAA;EACA,6BAAA;EACA,8BAAA;EACA,sBAAA;EACA,kBAAA;;AAGF,kCAAkC,mBAAoB,kCAAkC,0CAA0C;EAChI,SAAA;;AAGF,kCAAkC,mBAAmB,iEAAkE,kCAAkC,0CAA0C;EACjM,UAAA;EACA,gBAAA;;AAGF,kCAAkC,mBAAoB,kCAAkC,0CAA0C;EAChI,SAAA;EACA,eAAA;EACA,WAAA;;AAGF,mBAAqC;EAEnC,kCAAkC,mBAAoB;IACpD,yBAAA;IACA,2BAAA;IACA,mBAAA;IACA,8BAAA;IACA,6BAAA;IACA,2BAAA;IACA,mBAAA","file":"wooccm-admin.css"}
1
+ {"version":3,"sources":["../../less/wooccm-admin.less"],"names":[],"mappings":"AAAA;EACE,YAAA;EACA,oBAAA;;AAeA,OAAC;EACC,kBAAA;EACA,0BAAA;;AAFF,OAAC,iBAIC;EACE,kBAAA;EACA,MAAA;EACA,QAAA;EACA,SAAA;EACA,UAAA;EACA,YAAW,kBAAX;EACA,gBAAA;EACA,cAAA;EACA,eAAA;;AAeI,KAPP,YAEC,QAEE,KACE,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oB,kCAAkC,IAAG;EACzF,YAAA;EACA,SAAA;EACA,mBAAA;EACA,mBAAA;EACA,sBAAA;EACA,cAAA;;AAGF,kCAAkC,mBAAoB,kCAAkC;EACtF,mBAAA;EACA,qBAAA;EACA,aAAA;EACA,gBAAA;EACA,iBAAA;;AAGF,CAAC,mBAAmB;EAClB,sBAAA;EACA,WAAA;EACA,gBAAA;EACA,oBAAA;EACA,oBAAA;EACA,cAAA;EACA,mCAAA;EACA,SAAS,GAAT;EACA,qBAAA;EACA,gBAAA;;AAGF,kCAAkC,mBAAmB,iEAAkE,kCAAkC,sCAAsC,EAAC;EAC9L,qBAAA;EACA,gBAAA;EACA,kBAAA;EACA,SAAA;;AAGF,kCAAkC,mBAAmB;EACnD,YAAA;EACA,0BAAA;EACA,6BAAA;;AAGF,kCAAkC,mBAAoB,kCAAkC,sCAAsC;EAC5H,qBAAA;EACA,kBAAA;EACA,QAAA;EACA,WAAA;EACA,gBAAA;;AAEF,CAAC;EACC,YAAA;EACA,gBAAA;EACA,WAAA;;AAGF,kCAAkC,mBAAoB;EACpD,wBAAA;EACA,+BAAA;EACA,uBAAA;EACA,oBAAA;EACA,qBAAA;EACA,aAAA;EACA,4BAAA;EACA,6BAAA;EACA,8BAAA;EACA,sBAAA;EACA,kBAAA;;AAGF,kCAAkC,mBAAoB,kCAAkC,0CAA0C;EAChI,SAAA;;AAGF,kCAAkC,mBAAmB,iEAAkE,kCAAkC,0CAA0C;EACjM,UAAA;EACA,gBAAA;;AAGF,kCAAkC,mBAAoB,kCAAkC,0CAA0C;EAChI,SAAA;EACA,eAAA;EACA,WAAA;;AAGF,mBAAqC;EAEnC,kCAAkC,mBAAoB;IACpD,yBAAA;IACA,2BAAA;IACA,mBAAA;IACA,8BAAA;IACA,6BAAA;IACA,2BAAA;IACA,mBAAA","file":"wooccm-admin.css"}
assets/frontend/js/wooccm-checkout.js CHANGED
@@ -425,7 +425,7 @@
425
  $input.css('color', '#fff').css('background', $input.val()).hide();
426
 
427
  $input.iris({
428
- wccmclass: $input.attr('id'),
429
  palettes: true,
430
  color: '',
431
  hide: false,
425
  $input.css('color', '#fff').css('background', $input.val()).hide();
426
 
427
  $input.iris({
428
+ class: $input.attr('id'),
429
  palettes: true,
430
  color: '',
431
  hide: false,
assets/frontend/js/wooccm-checkout.min.js CHANGED
@@ -1 +0,0 @@
1
- (function(e){var f=function(h){return h.is(".processing")||h.parents(".processing").length};var g=function(h){if(!f(h)){h.addClass("processing").block({message:null,overlayCSS:{background:"#fff",opacity:0.6}})}};var a=function(h){h.removeClass("processing").unblock()};var d=function(n,l,m,h,k){var o=e(n),p;if(k.match("image.*")){p="image"}else{if(k.match("application/ms.*")){m=wooccm_upload.icons.spreadsheet;p="spreadsheet"}else{if(k.match("application/x.*")){m=wooccm_upload.icons.archive;p="application"}else{if(k.match("audio.*")){m=wooccm_upload.icons.audio;p="audio"}else{if(k.match("text.*")){m=wooccm_upload.icons.text;p="text"}else{if(k.match("video.*")){m=wooccm_upload.icons.video;p="video"}else{m=wooccm_upload.icons.interactive;p="interactive"}}}}}}var j='<span data-file_id="'+l+'" title="'+h+'" class="wooccm-file-file">\n <span class="wooccm-file-list-container">\n <a title="'+h+'" class="wooccm-file-list-delete">×</a>\n <span class="wooccm-file-list-image-container">\n <img class="'+p+'" alt="'+h+'" src="'+m+'"/>\n </span>\n </span>\n </span>';o.append(j).fadeIn()};function b(i,h){if(h){i.find("label .optional").remove();i.addClass("validate-required");if(i.find("label .required").length===0){i.find("label").append('&nbsp;<abbr class="required" title="'+wc_address_i18n_params.i18n_required_text+'">*</abbr>')}}else{i.find("label .required").remove();i.removeClass("validate-required woocommerce-invalid woocommerce-invalid-required-field");if(i.find("label .optional").length===0){i.find("label").append('&nbsp;<span class="optional">('+wc_address_i18n_params.i18n_optional_text+")</span>")}}}e(document).on("country_to_state_changing",function(i,k,m){var j=m,h;var l=e.parseJSON(wc_address_i18n_params.locale_fields);e.each(l,function(n,o){var p=j.find(o),q=p.find("[data-required]").data("required")||0;b(p,q)})});var c=[];e(".wooccm-type-file").each(function(j,m){var k=e(m),l=k.find("[type=file]"),h=k.find(".wooccm-file-button"),n=k.find(".wooccm-file-list");c[k.attr("id")]=[];h.on("click",function(i){i.preventDefault();l.trigger("click")});n.on("click",".wooccm-file-list-delete",function(i){e(this).closest(".wooccm-file-file").remove()});l.on("change",function(o){var i=e(this)[0].files;if(i.length){if(window.FileReader){e.each(i,function(q,p){var r=n.find("span[data-file_id]").length+q;if(r>=wooccm_upload.limit.max_files){alert("Exeeds max files limit of "+wooccm_upload.limit.max_files);return false}if(p.size>wooccm_upload.limit.max_file_size){alert("Exeeds max file size of "+wooccm_upload.limit.max_file_size);return true}reader=new FileReader();reader.onload=(function(s){return function(t){setTimeout(function(){d(n,c[k.attr("id")].push(p)-1,t.target.result,s.name,s.type)},200)}})(p);console.log(p.name);reader.readAsDataURL(p)})}}})});e("#order_review").on("ajaxSuccess",function(l){var k=e(l.target),j=k.find("#place_order"),i=e(".wooccm-type-file"),h=i.length;if(h){j.addClass("wooccm-upload-process")}});e(document).on("click","#place_order.wooccm-upload-process",function(l){l.preventDefault();var i=e("form.checkout"),k=e(this),j=e(".wooccm-type-file"),h=j.length;j.each(function(m,p){var n=e(p),r=n.find(".wooccm-file-field"),q=n.find(".wooccm-file-list");if(window.FormData&&c[n.attr("id")].length){if(!f(i)){k.html(wooccm_upload.message.uploading);g(i)}var o=new FormData();q.find("span[data-file_id]").each(function(t,s){var u=e(s).data("file_id");if(t>wooccm_upload.limit.max_files){console.log("Exeeds max files limit of "+wooccm_upload.limit.max_files);return false}if(c[n.attr("id")][u]===undefined){console.log("Undefined "+u);return true}if(c[n.attr("id")][u].size>wooccm_upload.limit.max_file_size){console.log("Exeeds max file size of "+wooccm_upload.limit.max_files);return true}console.log("We're ready to upload "+c[n.attr("id")][u].name);o.append("wooccm_checkout_attachment_upload[]",c[n.attr("id")][u])});o.append("action","wooccm_checkout_attachment_upload");o.append("nonce",wooccm_upload.nonce);e.ajax({async:false,url:wooccm_upload.ajax_url,type:"POST",cache:false,data:o,processData:false,contentType:false,beforeSend:function(s){},success:function(s){if(s.success){r.val(s.data)}else{e("body").trigger("update_checkout")}},complete:function(s){h=h-1}})}else{h=h-1}if(h==0){a(i);k.removeClass("wooccm-upload-process").trigger("click")}})});e(document).on("change",".wooccm-add-price",function(h){e("body").trigger("update_checkout")});e(".wooccm-conditional-child").each(function(h,m){var j=e(m),l=e("#"+j.find("[data-conditional-parent]").data("conditional-parent")+"_field"),k=j.find("[data-conditional-parent-value]").data("conditional-parent-value").toString();if(l.length){l.on("wooccm_change change keyup",function(o){var n=e(o.target),i=n.val();if(n.hasClass("select2-selection")){return}if(n.prop("type")=="checkbox"){i=n.is(":checked")}if(k==i||(e.isArray(i)&&i.indexOf(k)>-1)){j.fadeIn()}else{j.fadeOut()}n.off("wooccm_change");n.off("change");n.off("keyup")});l.find("select:first").trigger("wooccm_change");l.find("textarea:first").trigger("wooccm_change");l.find("input[type=button]:first").trigger("wooccm_change");l.find("input[type=radio]:checked:first").trigger("wooccm_change");l.find("input[type=checkbox]:checked:first").trigger("wooccm_change");l.find("input[type=color]:first").trigger("wooccm_change");l.find("input[type=date]:first").trigger("wooccm_change");l.find("input[type=datetime-local]:first").trigger("wooccm_change");l.find("input[type=email]:first").trigger("wooccm_change");l.find("input[type=file]:first").trigger("wooccm_change");l.find("input[type=hidden]:first").trigger("wooccm_change");l.find("input[type=image]:first").trigger("wooccm_change");l.find("input[type=month]:first").trigger("wooccm_change");l.find("input[type=number]:first").trigger("wooccm_change");l.find("input[type=password]:first").trigger("wooccm_change");l.find("input[type=range]:first").trigger("wooccm_change");l.find("input[type=reset]:first").trigger("wooccm_change");l.find("input[type=search]:first").trigger("wooccm_change");l.find("input[type=submit]:first").trigger("wooccm_change");l.find("input[type=tel]:first").trigger("wooccm_change");l.find("input[type=text]:first").trigger("wooccm_change");l.find("input[type=time]:first").trigger("wooccm_change");l.find("input[type=url]:first").trigger("wooccm_change");l.find("input[type=week]:first").trigger("wooccm_change")}else{j.show()}});e(".wooccm-type-datepicker").each(function(h,k){var j=e(k),l=j.find("input[type=text]");if(e.isFunction(e.fn.datepicker)){l.datepicker({dateFormat:l.data("formatdate")||"dd-mm-yy",minDate:l.data("mindate")||undefined,maxDate:l.data("maxdate")||undefined,beforeShowDay:function(n){var i=n.getDay(),m=l.data("disable")||false;if(!m){return[true]}else{return[m[i]!==undefined]}}})}});e(".wooccm-type-timepicker").each(function(h,k){var j=e(k),l=j.find("input[type=text]");if(e.isFunction(e.fn.timepicker)){l.timepicker({showPeriod:true,showLeadingZero:true,hours:l.data("hours")||undefined,minutes:l.data("minutes")||undefined,})}});e(".wooccm-colorpicker-farbtastic").each(function(h,k){var j=e(k),m=j.find("input[type=text]"),l=j.find(".wooccmcolorpicker_container");m.hide();if(e.isFunction(e.fn.farbtastic)){l.farbtastic("#"+m.attr("id"));l.on("click",function(i){m.fadeIn()})}});e(".wooccm-colorpicker-iris").each(function(h,k){var j=e(k),l=j.find("input[type=text]");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/frontend/js/wooccm-order-upload.js CHANGED
@@ -47,15 +47,15 @@
47
  all_attachments_ids: $('#all_attachments_ids').val()
48
  },
49
  beforeSend: function (response) {
50
- $('.wccm_results').html(wooccm_upload.message.saving);
51
  },
52
  success: function (response) {
53
  if (response.success) {
54
- $('.wccm_results').html(wooccm_upload.message.deleted);
55
 
56
  $('#wooccm_order_attachment_update').prop('disabled', true);
57
  } else {
58
- $('.wccm_results').html(response.data);
59
  }
60
  }
61
  });
@@ -90,7 +90,7 @@
90
  for(x=0; x < ' . $number_of_types . '; x++){
91
  if( !wooempt || file.type.match(file_array[x]) ) {
92
  if (formdata) {
93
- formdata.append("files_wccm[]",file);
94
  }
95
  }
96
  }
@@ -112,21 +112,21 @@
112
  contentType: false,
113
  beforeSend: function (response) {
114
 
115
- $('.wccm_results').html(wooccm_upload.message.uploading);
116
 
117
- block($('#wooccm_order_attachment_inner'));
118
  },
119
  success: function (response) {
120
 
121
  if (response.success) {
122
- $('#wooccm_order_attachment_inner').fadeOut();
123
- $('#wooccm_order_attachment_inner').replaceWith($(response.data).fadeIn());
124
- $('.wccm_results').html(wooccm_upload.message.success);
125
  } else {
126
- $('.wccm_results').html(response.data);
127
  }
128
 
129
- unblock($('#wooccm_order_attachment_inner'));
130
  }
131
  });
132
  }
47
  all_attachments_ids: $('#all_attachments_ids').val()
48
  },
49
  beforeSend: function (response) {
50
+ $('.wooccm_upload_results').html(wooccm_upload.message.saving);
51
  },
52
  success: function (response) {
53
  if (response.success) {
54
+ $('.wooccm_upload_results').html(wooccm_upload.message.deleted);
55
 
56
  $('#wooccm_order_attachment_update').prop('disabled', true);
57
  } else {
58
+ $('.wooccm_upload_results').html(response.data);
59
  }
60
  }
61
  });
90
  for(x=0; x < ' . $number_of_types . '; x++){
91
  if( !wooempt || file.type.match(file_array[x]) ) {
92
  if (formdata) {
93
+ formdata.append("files_wooccm[]",file);
94
  }
95
  }
96
  }
112
  contentType: false,
113
  beforeSend: function (response) {
114
 
115
+ $('.wooccm_upload_results').html(wooccm_upload.message.uploading);
116
 
117
+ block($('.wooccm_order_attachments_wrapper'));
118
  },
119
  success: function (response) {
120
 
121
  if (response.success) {
122
+ $('.wooccm_order_attachments_wrapper').fadeOut();
123
+ $('.wooccm_order_attachments_wrapper').replaceWith($(response.data).fadeIn());
124
+ $('.wooccm_upload_results').html(wooccm_upload.message.success);
125
  } else {
126
+ $('.wooccm_upload_results').html(response.data);
127
  }
128
 
129
+ unblock($('.wooccm_order_attachments_wrapper'));
130
  }
131
  });
132
  }
assets/frontend/js/wooccm-order-upload.min.js CHANGED
@@ -1 +1 @@
1
- (function(b){var c=function(e){return e.is(".processing")||e.parents(".processing").length};var d=function(e){if(!c(e)){e.addClass("processing").block({message:null,overlayCSS:{background:"#fff",opacity:0.6}})}};var a=function(e){e.removeClass("processing").unblock()};b(document).ready(function(e){e(document).on("click",".wooccm_delete_attachment",function(h){var g=e(this).closest("tr"),f=e(this).data("attachment_id");g.hide();e("#wooccm_order_attachment_update").prop("disabled",false);e("#delete_attachments_ids").val(e("#delete_attachments_ids").val().replace(f,""))});e(document).on("click","#wooccm_order_attachment_update",function(f){e.ajax({url:wooccm_upload.ajax_url,type:"POST",cache:false,data:{action:"wooccm_order_attachment_update",nonce:wooccm_upload.nonce,delete_attachments_ids:e("#delete_attachments_ids").val(),all_attachments_ids:e("#all_attachments_ids").val()},beforeSend:function(g){e(".wccm_results").html(wooccm_upload.message.saving)},success:function(g){if(g.success){e(".wccm_results").html(wooccm_upload.message.deleted);e("#wooccm_order_attachment_update").prop("disabled",true)}else{e(".wccm_results").html(g.data)}}})});e(document).on("change","#wooccm_order_attachment_upload",function(m){var l=false,n=e(this).data("order_id");if(window.FormData){l=new FormData()}var k=0,g=this.files.length,h,f,j;for(;k<g;k++){j=this.files[k];if(l){l.append("wooccm_order_attachment_upload[]",j)}}if(l){l.append("action","wooccm_order_attachment_upload");l.append("nonce",wooccm_upload.nonce);l.append("order_id",n);e.ajax({url:wooccm_upload.ajax_url,type:"POST",cache:false,data:l,processData:false,contentType:false,beforeSend:function(i){e(".wccm_results").html(wooccm_upload.message.uploading);d(e("#wooccm_order_attachment_inner"))},success:function(i){if(i.success){e("#wooccm_order_attachment_inner").fadeOut();e("#wooccm_order_attachment_inner").replaceWith(e(i.data).fadeIn());e(".wccm_results").html(wooccm_upload.message.success)}else{e(".wccm_results").html(i.data)}a(e("#wooccm_order_attachment_inner"))}})}})})})(jQuery);
1
+ (function(b){var c=function(e){return e.is(".processing")||e.parents(".processing").length};var d=function(e){if(!c(e)){e.addClass("processing").block({message:null,overlayCSS:{background:"#fff",opacity:0.6}})}};var a=function(e){e.removeClass("processing").unblock()};b(document).ready(function(e){e(document).on("click",".wooccm_delete_attachment",function(h){var g=e(this).closest("tr"),f=e(this).data("attachment_id");g.hide();e("#wooccm_order_attachment_update").prop("disabled",false);e("#delete_attachments_ids").val(e("#delete_attachments_ids").val().replace(f,""))});e(document).on("click","#wooccm_order_attachment_update",function(f){e.ajax({url:wooccm_upload.ajax_url,type:"POST",cache:false,data:{action:"wooccm_order_attachment_update",nonce:wooccm_upload.nonce,delete_attachments_ids:e("#delete_attachments_ids").val(),all_attachments_ids:e("#all_attachments_ids").val()},beforeSend:function(g){e(".wooccm_upload_results").html(wooccm_upload.message.saving)},success:function(g){if(g.success){e(".wooccm_upload_results").html(wooccm_upload.message.deleted);e("#wooccm_order_attachment_update").prop("disabled",true)}else{e(".wooccm_upload_results").html(g.data)}}})});e(document).on("change","#wooccm_order_attachment_upload",function(m){var l=false,n=e(this).data("order_id");if(window.FormData){l=new FormData()}var k=0,g=this.files.length,h,f,j;for(;k<g;k++){j=this.files[k];if(l){l.append("wooccm_order_attachment_upload[]",j)}}if(l){l.append("action","wooccm_order_attachment_upload");l.append("nonce",wooccm_upload.nonce);l.append("order_id",n);e.ajax({url:wooccm_upload.ajax_url,type:"POST",cache:false,data:l,processData:false,contentType:false,beforeSend:function(i){e(".wooccm_upload_results").html(wooccm_upload.message.uploading);d(e(".wooccm_order_attachments_wrapper"))},success:function(i){if(i.success){e(".wooccm_order_attachments_wrapper").fadeOut();e(".wooccm_order_attachments_wrapper").replaceWith(e(i.data).fadeIn());e(".wooccm_upload_results").html(wooccm_upload.message.success)}else{e(".wooccm_upload_results").html(i.data)}a(e(".wooccm_order_attachments_wrapper"))}})}})})})(jQuery);
includes/class-wooccm.php CHANGED
@@ -99,6 +99,30 @@ final class WOOCCM {
99
  ));
100
 
101
  wp_register_script('farbtastic', admin_url('js/farbtastic.js'), array('jquery'), false);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
102
  }
103
 
104
  public function clear_session() {
99
  ));
100
 
101
  wp_register_script('farbtastic', admin_url('js/farbtastic.js'), array('jquery'), false);
102
+
103
+ // Admin
104
+ // -------------------------------------------------------------------------
105
+
106
+ wp_register_script('wooccm-order-upload', plugins_url('assets/frontend/js/wooccm-order-upload.js', WOOCCM_PLUGIN_FILE), array(), WOOCCM_PLUGIN_VERSION, true);
107
+
108
+ wp_localize_script('wooccm-order-upload', 'wooccm_upload', array(
109
+ 'ajax_url' => admin_url('admin-ajax.php?metabox=' . is_admin()),
110
+ 'nonce' => wp_create_nonce('wooccm_upload'),
111
+ 'message' => array(
112
+ 'uploading' => esc_html__('Uploading, please wait...', 'woocommerce-checkout-manager'),
113
+ 'saving' => esc_html__('Saving, please wait...', 'woocommerce-checkout-manager'),
114
+ 'success' => esc_html__('Files uploaded successfully.', 'woocommerce-checkout-manager'),
115
+ 'deleted' => esc_html__('Deleted successfully.', 'woocommerce-checkout-manager'),
116
+ ),
117
+ 'icons' => array(
118
+ 'interactive' => site_url('wp-includes/images/media/interactive.png'),
119
+ 'spreadsheet' => site_url('wp-includes/images/media/spreadsheet.png'),
120
+ 'archive' => site_url('wp-includes/images/media/archive.png'),
121
+ 'audio' => site_url('wp-includes/images/media/audio.png'),
122
+ 'text' => site_url('wp-includes/images/media/text.png'),
123
+ 'video' => site_url('wp-includes/images/media/video.png')
124
+ )
125
+ ));
126
  }
127
 
128
  public function clear_session() {
includes/controller/class-wooccm-order.php CHANGED
@@ -15,42 +15,26 @@ class WOOCCM_Order_Controller extends WOOCCM_Upload {
15
  return self::$_instance;
16
  }
17
 
18
- public function enqueue_scripts() {
19
 
20
  WOOCCM()->register_scripts();
21
 
22
- wp_register_script('wooccm-order-upload', plugins_url('assets/frontend/js/wooccm-order-upload.js', WOOCCM_PLUGIN_FILE), array(), WOOCCM_PLUGIN_VERSION, true);
 
 
 
 
 
23
 
24
- wp_localize_script('wooccm-order-upload', 'wooccm_upload', array(
25
- 'ajax_url' => admin_url('admin-ajax.php?metabox=' . is_admin()),
26
- 'nonce' => wp_create_nonce('wooccm_upload'),
27
- 'message' => array(
28
- 'uploading' => esc_html__('Uploading, please wait...', 'woocommerce-checkout-manager'),
29
- 'saving' => esc_html__('Saving, please wait...', 'woocommerce-checkout-manager'),
30
- 'success' => esc_html__('Files uploaded successfully.', 'woocommerce-checkout-manager'),
31
- 'deleted' => esc_html__('Deleted successfully.', 'woocommerce-checkout-manager'),
32
- ),
33
- 'icons' => array(
34
- 'interactive' => site_url('wp-includes/images/media/interactive.png'),
35
- 'spreadsheet' => site_url('wp-includes/images/media/spreadsheet.png'),
36
- 'archive' => site_url('wp-includes/images/media/archive.png'),
37
- 'audio' => site_url('wp-includes/images/media/audio.png'),
38
- 'text' => site_url('wp-includes/images/media/text.png'),
39
- 'video' => site_url('wp-includes/images/media/video.png')
40
- )
41
- ));
42
 
43
  if (is_admin() && $screen = get_current_screen()) {
44
  if (in_array($screen->id, array(/* 'product', 'edit-product', */'shop_order', 'edit-shop_order'))) {
45
  wp_enqueue_script('wooccm-order-upload');
46
  }
47
  }
48
-
49
- if (is_account_page()) {
50
- wp_enqueue_style('wooccm');
51
- wp_enqueue_style('dashicons');
52
- wp_enqueue_script('wooccm-order-upload');
53
- }
54
  }
55
 
56
  public function ajax_order_attachment_upload() {
@@ -175,9 +159,9 @@ class WOOCCM_Order_Controller extends WOOCCM_Upload {
175
  // -------------------------------------------------------------------------
176
 
177
  public function add_metabox() {
178
- add_meta_box('woocommerce-order-files', esc_html__('Order Uploaded Files', 'woocommerce-checkout-manager'), array($this, 'add_metabox_content'), 'shop_order', 'normal', 'default');
179
  }
180
-
181
  // Panel
182
  // ---------------------------------------------------------------------------
183
 
@@ -301,9 +285,8 @@ class WOOCCM_Order_Controller extends WOOCCM_Upload {
301
  }
302
 
303
  function init() {
304
-
305
- add_action('wp_enqueue_scripts', array($this, 'enqueue_scripts'));
306
-
307
  add_action('wp_ajax_wooccm_order_attachment_upload', array($this, 'ajax_order_attachment_upload'));
308
  add_action('wp_ajax_nopriv_wooccm_order_attachment_upload', array($this, 'ajax_order_attachment_upload'));
309
 
15
  return self::$_instance;
16
  }
17
 
18
+ public function frontend_scripts() {
19
 
20
  WOOCCM()->register_scripts();
21
 
22
+ if (is_account_page()) {
23
+ wp_enqueue_style('wooccm');
24
+ wp_enqueue_style('dashicons');
25
+ wp_enqueue_script('wooccm-order-upload');
26
+ }
27
+ }
28
 
29
+ public function admin_scripts() {
30
+
31
+ WOOCCM()->register_scripts();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
 
33
  if (is_admin() && $screen = get_current_screen()) {
34
  if (in_array($screen->id, array(/* 'product', 'edit-product', */'shop_order', 'edit-shop_order'))) {
35
  wp_enqueue_script('wooccm-order-upload');
36
  }
37
  }
 
 
 
 
 
 
38
  }
39
 
40
  public function ajax_order_attachment_upload() {
159
  // -------------------------------------------------------------------------
160
 
161
  public function add_metabox() {
162
+ add_meta_box('wooccm-order-files', esc_html__('Order Files', 'woocommerce-checkout-manager'), array($this, 'add_metabox_content'), 'shop_order', 'normal', 'default');
163
  }
164
+
165
  // Panel
166
  // ---------------------------------------------------------------------------
167
 
285
  }
286
 
287
  function init() {
288
+ add_action('admin_enqueue_scripts', array($this, 'admin_scripts'));
289
+ add_action('wp_enqueue_scripts', array($this, 'frontend_scripts'));
 
290
  add_action('wp_ajax_wooccm_order_attachment_upload', array($this, 'ajax_order_attachment_upload'));
291
  add_action('wp_ajax_nopriv_wooccm_order_attachment_upload', array($this, 'ajax_order_attachment_upload'));
292
 
includes/view/backend/meta-boxes/html-order-uploads.php CHANGED
@@ -1,13 +1,12 @@
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">
@@ -19,9 +18,12 @@
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
@@ -46,16 +48,14 @@
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>
1
+ <div class="wooccm_order_attachments_wrapper" class="wc-metaboxes-wrapper">
2
+ <table cellpadding="0" cellspacing="0" class="wooccm_order_attachments">
3
  <thead>
4
  <tr>
 
5
  <th><?php _e('Image', 'woocommerce-checkout-manager'); ?></th>
6
  <th><?php _e('Filename', 'woocommerce-checkout-manager'); ?></th>
7
  <th><?php _e('Dimensions', 'woocommerce-checkout-manager'); ?></th>
8
  <th><?php _e('Extension', ' woocommerce-checkout-manager'); ?></th>
9
+ <th class="column-actions"></th>
10
  </tr>
11
  </thead>
12
  <tbody class="product_images">
18
  $filename = basename($image_attributes);
19
  $wp_filetype = wp_check_filetype($filename);
20
  ?>
21
+ <tr class="image">
22
+ <td class="thumb">
23
+ <div class="wc-order-item-thumbnail">
24
+ <?php echo wp_get_attachment_link($attachment_id, '', false, false, wp_get_attachment_image($attachment_id, array(38, 38), false)); ?>
25
+ </div>
26
+ </td>
27
  <td><?php echo wp_get_attachment_link($attachment_id, '', false, false, preg_replace('/\.[^.]+$/', '', $filename)); ?></td>
28
  <td>
29
  <?php
48
  <?php endif; ?>
49
  </tbody>
50
  </table>
51
+ <div class="wc-order-data-row wc-order-bulk-actions wc-order-data-row-toggle">
52
+ <input type="hidden" id="delete_attachments_ids" name="delete_attachments_ids" value="<?php echo esc_attr(implode(',', $attachments)); ?>" />
53
+ <input type="hidden" id="all_attachments_ids" name="all_attachments_ids" value="<?php echo esc_attr(implode(',', $attachments)); ?>" />
54
+ <a class="button button-primary fileinput-button">
55
+ <span><?php _e('Upload Files', 'woocommerce-checkout-manager'); ?></span>
 
56
  <input data-order_id="<?php echo esc_attr($order->get_id()); ?>" type="file" name="wooccm_order_attachment_upload" id="wooccm_order_attachment_upload" multiple />
57
  </a>
58
  <input type="button" id="wooccm_order_attachment_update" class="button button-secondary" value="<?php _e('Save Changes', 'woocommerce-checkout-manager'); ?>" disabled="disabled">
59
+ <div class="wooccm_upload_results"></div>
60
  </div>
 
 
61
  </div>
includes/view/frontend/class-wooccm-fields-handler.php CHANGED
@@ -17,9 +17,9 @@ class WOOCCM_Fields_Handler {
17
 
18
  public function posted_data($data) {
19
 
20
- if ($fields = WC()->session->wooccm) {
21
 
22
- foreach ($fields['fields'] as $key => $field) {
23
 
24
  switch ($field['type']) {
25
 
@@ -227,9 +227,7 @@ class WOOCCM_Fields_Handler {
227
  }
228
 
229
  public function init() {
230
-
231
  // Prepare
232
-
233
  add_filter('wooccm_checkout_field_filter', array($this, 'add_field_filter'));
234
 
235
  // Add field classes
17
 
18
  public function posted_data($data) {
19
 
20
+ if (count($fields = WC()->session->wooccm['fields'])) {
21
 
22
+ foreach ($fields as $key => $field) {
23
 
24
  switch ($field['type']) {
25
 
227
  }
228
 
229
  public function init() {
 
230
  // Prepare
 
231
  add_filter('wooccm_checkout_field_filter', array($this, 'add_field_filter'));
232
 
233
  // Add field classes
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.4
7
- Stable tag: 4.6.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -47,8 +47,6 @@ WooCommerce Checkout Manager allows you to customize and manage the fields on yo
47
  * Disable any added field from Checkout details page and Order Receipt.
48
  * **Retain fields information** for customers when they navigate back and forth from checkout.
49
  * Disable Billing Address fields for chosen shipping goods. Which makes them visible only for virtual goods.
50
- * **DatePicker:** Change the default format (dd-mm-yy), Set Minimum Date and Maximum Date, Disable days in the week (Sun - Sat).
51
- * **TimePicker:** Includes restriction of both start and end hours, set the minutes interval and manually input labels.
52
  * Area to insert your own **Custom CSS**.
53
  * Display **Order Time**.
54
  * Set Default State for checkout.
@@ -117,24 +115,32 @@ Example:
117
 
118
  == Screenshots ==
119
 
120
- 1. Customize or add additional fields to your checkout screen.
121
 
122
- 2. New Checkout fields appear in the Order Summary.
123
 
124
- 3. New Checkout fields also appear in the Order Receipt e-mail sent to the customer.
125
 
126
- 4. You can add up to 15 different types of Checkout fields.
127
 
128
- 5. Text fields, Description blocks, Dropdowns, Radio lists, Date & Time Pickers, etc.
129
 
130
- 6. Add Date and Time fields to the Checkout.
131
 
132
- 7. Let you customer fill in forms using dropdown lists at Checkout.
133
 
134
- 8. Customize Checkout fields from the WooCheckout menu item in the WordPress Administration.
 
 
 
 
135
 
136
  == Changelog ==
137
 
 
 
 
 
138
  = 4.6.2 =
139
  * Fix: save additional fields position
140
  * Fix: required notice on first select option
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.4
7
+ Stable tag: 4.6.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
47
  * Disable any added field from Checkout details page and Order Receipt.
48
  * **Retain fields information** for customers when they navigate back and forth from checkout.
49
  * Disable Billing Address fields for chosen shipping goods. Which makes them visible only for virtual goods.
 
 
50
  * Area to insert your own **Custom CSS**.
51
  * Display **Order Time**.
52
  * Set Default State for checkout.
115
 
116
  == Screenshots ==
117
 
118
+ 1. Customize shipping fields, create account, order notes and include custom message in checkout page.
119
 
120
+ 2. Customize or add additional fields to your checkout billing fields.
121
 
122
+ 3. Customize or add additional fields to your checkout shipping fields.
123
 
124
+ 4. Include additional fields to your checkout page.
125
 
126
+ 5. Allow users to upload images in their orders.
127
 
128
+ 6. Include select and radio fields and select default option.
129
 
130
+ 7. Include multiselect and multicheckbox fields and select defaults options.
131
 
132
+ 8. Set conditional relationships easily based on the parent value or parent options.
133
+
134
+ 9. Show or hide fields based on the products selected in the cart.
135
+
136
+ 10. Handle uploaded files in order admin dashboard.
137
 
138
  == Changelog ==
139
 
140
+ = 4.6.3 =
141
+ * Fix: small CSS issues
142
+ * Fix: woocommerce checkout manager upload files in admin panel
143
+
144
  = 4.6.2 =
145
  * Fix: save additional fields position
146
  * Fix: required notice on first select option
templates/order/order-upload-files.php CHANGED
@@ -1,6 +1,5 @@
1
- <h2 class="woocommerce-order-details__title"><?php echo ($title = get_option('wooccm_order_upload_files_title', false)) ? esc_html($title) : esc_html__('Upload files', 'woocommerce-checkout-manager'); ?></h2>
2
-
3
- <div id="wooccm_order_attachment_inner">
4
  <table class="woocommerce_order_items shop_table">
5
  <thead>
6
  <tr>
@@ -21,8 +20,7 @@
21
  $filename = basename($image_attributes);
22
  $wp_filetype = wp_check_filetype($filename);
23
  ?>
24
- <tr class="image wccm_filesli wccmv_<?php echo esc_attr($attachment_id); ?>">
25
- <!--<td><?php echo esc_attr($attachment_id); ?></td>-->
26
  <td><?php echo wp_get_attachment_link($attachment_id, '', false, false, wp_get_attachment_image($attachment_id, array(75, 75), false)); ?></td>
27
  <td><?php echo wp_get_attachment_link($attachment_id, '', false, false, preg_replace('/\.[^.]+$/', '', $filename)); ?></td>
28
  <td>
@@ -50,13 +48,12 @@
50
  </table>
51
  <input type="hidden" id="delete_attachments_ids" name="delete_attachments_ids" value="<?php echo esc_attr(implode(',', $attachments)); ?>" />
52
  <input type="hidden" id="all_attachments_ids" name="all_attachments_ids" value="<?php echo esc_attr(implode(',', $attachments)); ?>" />
53
- <!--<input type="file" id="wooccm_order_attachment_upload" name="wooccm_order_attachment_upload" class="button button-primary" value="<?php _e('Add Order Files', 'woocommerce-checkout-manager'); ?>" multiple />-->
54
  <p class="order-upload">
55
  <a style="float: left; margin: 0 10px 0 0;" class="button alt fileinput-button">
56
- <span><?php _e('Add Order Files', 'woocommerce-checkout-manager'); ?></span>
57
  <input data-order_id="<?php echo esc_attr($order->get_id()); ?>" type="file" name="wooccm_order_attachment_upload" id="wooccm_order_attachment_upload" multiple />
58
  </a>
59
  <input type="button" id="wooccm_order_attachment_update" class="button button-secondary" value="<?php _e('Save Changes', 'woocommerce-checkout-manager'); ?>" disabled="disabled">
60
- <span class="wccm_results"></span>
61
  </p>
62
  </div>
1
+ <div class="wooccm_order_attachments_wrapper">
2
+ <h2 class="woocommerce-order-details__title"><?php echo ($title = get_option('wooccm_order_upload_files_title', false)) ? esc_html($title) : esc_html__('Upload files', 'woocommerce-checkout-manager'); ?></h2>
 
3
  <table class="woocommerce_order_items shop_table">
4
  <thead>
5
  <tr>
20
  $filename = basename($image_attributes);
21
  $wp_filetype = wp_check_filetype($filename);
22
  ?>
23
+ <tr class="image">
 
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>
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
  <p class="order-upload">
52
  <a style="float: left; margin: 0 10px 0 0;" class="button alt fileinput-button">
53
+ <span><?php _e('Upload Files', 'woocommerce-checkout-manager'); ?></span>
54
  <input data-order_id="<?php echo esc_attr($order->get_id()); ?>" type="file" name="wooccm_order_attachment_upload" id="wooccm_order_attachment_upload" multiple />
55
  </a>
56
  <input type="button" id="wooccm_order_attachment_update" class="button button-secondary" value="<?php _e('Save Changes', 'woocommerce-checkout-manager'); ?>" disabled="disabled">
57
+ <span class="wooccm_upload_results"></span>
58
  </p>
59
  </div>
woocommerce-checkout-manager.php CHANGED
@@ -3,7 +3,7 @@
3
  /**
4
  * Plugin Name: WooCommerce Checkout Manager
5
  * Description: Manages WooCommerce Checkout, the advanced way.
6
- * Version: 4.6.2
7
  * Author: QuadLayers
8
  * Author URI: https://www.quadlayers.com
9
  * Copyright: 2019 QuadLayers (https://www.quadlayers.com)
@@ -17,7 +17,7 @@ if (!defined('WOOCCM_PLUGIN_NAME')) {
17
  define('WOOCCM_PLUGIN_NAME', 'WooCommerce Checkout Manager');
18
  }
19
  if (!defined('WOOCCM_PLUGIN_VERSION')) {
20
- define('WOOCCM_PLUGIN_VERSION', '4.6.2');
21
  }
22
  if (!defined('WOOCCM_PLUGIN_FILE')) {
23
  define('WOOCCM_PLUGIN_FILE', __FILE__);
3
  /**
4
  * Plugin Name: WooCommerce Checkout Manager
5
  * Description: Manages WooCommerce Checkout, the advanced way.
6
+ * Version: 4.6.3
7
  * Author: QuadLayers
8
  * Author URI: https://www.quadlayers.com
9
  * Copyright: 2019 QuadLayers (https://www.quadlayers.com)
17
  define('WOOCCM_PLUGIN_NAME', 'WooCommerce Checkout Manager');
18
  }
19
  if (!defined('WOOCCM_PLUGIN_VERSION')) {
20
+ define('WOOCCM_PLUGIN_VERSION', '4.6.3');
21
  }
22
  if (!defined('WOOCCM_PLUGIN_FILE')) {
23
  define('WOOCCM_PLUGIN_FILE', __FILE__);