WooCommerce Checkout Manager - Version 4.7.2

Version Description

  • Fix: select2
  • Fix: reorder fields
Download this release

Release Info

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

Code changes from version 4.7.1 to 4.7.2

assets/backend/js/wooccm-admin-field.js CHANGED
@@ -29,6 +29,9 @@
29
 
30
  var FieldView = Backbone.View.extend({
31
  events: {
 
 
 
32
  'click .media-modal-backdrop': 'close',
33
  'click .media-modal-close': 'close',
34
  'click .media-modal-prev': 'edit',
@@ -94,7 +97,6 @@
94
  success: function (response) {
95
  if (response.success) {
96
  modal.model.set(response.data);
97
- console.log(response.data)
98
  modal.render();
99
  } else {
100
  alert(response.data);
@@ -104,14 +106,11 @@
104
  },
105
  edit: function (e) {
106
  e.preventDefault();
107
-
108
  var modal = this,
109
  $button = $(e.target),
110
- field_count = parseInt($('.wc_gateways tr[data-field_id]').length - 1),
111
- field_id = parseInt(modal.model.get('id'));
112
-
113
  count++;
114
-
115
  if (timer) {
116
  clearTimeout(timer);
117
  }
@@ -119,19 +118,16 @@
119
  timer = setTimeout(function () {
120
 
121
  if ($button.hasClass('media-modal-next')) {
122
- field_id = Math.min(field_id + count, field_count);
123
  } else {
124
- field_id = Math.max(field_id - count, 0);
125
  }
126
 
127
  modal.model.set({
128
- id: field_id
129
  });
130
-
131
  count = 0;
132
-
133
  modal.load();
134
-
135
  }, 300);
136
  },
137
  open: function (e) {
@@ -221,6 +217,7 @@
221
  dataType: 'json',
222
  type: 'POST',
223
  beforeSend: function () {
 
224
  $details.addClass('save-waiting');
225
  //block($details);
226
  },
@@ -237,7 +234,6 @@
237
  modal.model.attributes['parent'] = response.data;
238
  modal.model.changed['parent'] = response.data;
239
  modal.render();
240
-
241
  } else {
242
  alert(response.data);
243
  }
@@ -247,6 +243,25 @@
247
  return false;
248
 
249
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
250
  submit: function (e) {
251
  e.preventDefault();
252
 
@@ -265,6 +280,7 @@
265
  dataType: 'json',
266
  type: 'POST',
267
  beforeSend: function () {
 
268
  $details.addClass('save-waiting');
269
  block($modal);
270
  },
@@ -279,12 +295,13 @@
279
  success: function (response) {
280
  if (response.success) {
281
 
282
- if (response.data.id != modal.model.attributes.id) {
283
- location.reload();
284
- return;
285
  }
 
286
  //re-render dont load select2 saved options
287
  modal.model.set(response.data);
 
288
 
289
  } else {
290
  alert(response.data);
29
 
30
  var FieldView = Backbone.View.extend({
31
  events: {
32
+ 'change input': 'enable',
33
+ 'change textarea': 'enable',
34
+ 'change select': 'enable',
35
  'click .media-modal-backdrop': 'close',
36
  'click .media-modal-close': 'close',
37
  'click .media-modal-prev': 'edit',
97
  success: function (response) {
98
  if (response.success) {
99
  modal.model.set(response.data);
 
100
  modal.render();
101
  } else {
102
  alert(response.data);
106
  },
107
  edit: function (e) {
108
  e.preventDefault();
 
109
  var modal = this,
110
  $button = $(e.target),
111
+ field_count = parseInt($('.wc_gateways tr[data-field_id]').length),
112
+ order = parseInt(modal.model.get('order'));
 
113
  count++;
 
114
  if (timer) {
115
  clearTimeout(timer);
116
  }
118
  timer = setTimeout(function () {
119
 
120
  if ($button.hasClass('media-modal-next')) {
121
+ order = Math.min(order + count, field_count);
122
  } else {
123
+ order = Math.max(order - count, 1);
124
  }
125
 
126
  modal.model.set({
127
+ id: parseInt($('.wc_gateways tr[data-field_order=' + order + ']').data('field_id'))
128
  });
 
129
  count = 0;
 
130
  modal.load();
 
131
  }, 300);
132
  },
133
  open: function (e) {
217
  dataType: 'json',
218
  type: 'POST',
219
  beforeSend: function () {
220
+ $('.media-modal-submit').attr('disabled', true);
221
  $details.addClass('save-waiting');
222
  //block($details);
223
  },
234
  modal.model.attributes['parent'] = response.data;
235
  modal.model.changed['parent'] = response.data;
236
  modal.render();
 
237
  } else {
238
  alert(response.data);
239
  }
243
  return false;
244
 
245
  },
246
+ reload: function (e) {
247
+ if (this.$el.find('#wooccm_modal').hasClass('reload')) {
248
+ location.reload();
249
+ return;
250
+ }
251
+ this.remove();
252
+ return;
253
+ },
254
+ close: function (e) {
255
+ e.preventDefault();
256
+ this.undelegateEvents();
257
+ $(document).off('focusin');
258
+ $('body').removeClass('modal-open');
259
+ this.reload(e);
260
+ return;
261
+ },
262
+ enable: function (e) {
263
+ $('.media-modal-submit').removeProp('disabled');
264
+ },
265
  submit: function (e) {
266
  e.preventDefault();
267
 
280
  dataType: 'json',
281
  type: 'POST',
282
  beforeSend: function () {
283
+ $('.media-modal-submit').prop('disabled', true);
284
  $details.addClass('save-waiting');
285
  block($modal);
286
  },
295
  success: function (response) {
296
  if (response.success) {
297
 
298
+ if (modal.model.attributes.id == undefined) {
299
+ modal.close(e);
 
300
  }
301
+
302
  //re-render dont load select2 saved options
303
  modal.model.set(response.data);
304
+ $modal.addClass('reload');
305
 
306
  } else {
307
  alert(response.data);
assets/backend/js/wooccm-admin-field.min.js CHANGED
@@ -1 +1 @@
1
- (function(e){var g=0,b;var d=function(j){return j.is(".processing")||j.parents(".processing").length};var c=function(j){if(!d(j)){j.addClass("processing").block({message:null,overlayCSS:{background:"#fff",opacity:0.6}})}};var f=function(j){j.removeClass("processing").unblock()};var h=Backbone.Model.extend({defaults:wooccm_field.args});var i=Backbone.View.extend({events:{"click .media-modal-backdrop":"close","click .media-modal-close":"close","click .media-modal-prev":"edit","click .media-modal-next":"edit","change .media-modal-change":"change","change .media-modal-parent":"parent","submit .media-modal-form":"submit",},templates:{},initialize:function(){_.bindAll(this,"open","edit","parent","change","load","render","close","submit");this.init();this.open()},init:function(){this.templates.window=wp.template("wooccm-modal-window")},render:function(){var k=this;var j=this.$el.find("ul.wc-tabs li.active a").attr("href");k.$el.html(k.templates.window(k.model.attributes));_.delay(function(){k.$el.trigger("wooccm-enhanced-options");k.$el.trigger("wooccm-enhanced-select");k.$el.trigger("wooccm-tab-panels",j);k.$el.trigger("init_tooltips")},100)},load:function(){var j=this;if(j.model.attributes.id==undefined){j.render();return}e.ajax({url:wooccm_field.ajax_url,data:{action:"wooccm_load_field",nonce:wooccm_field.nonce,field_id:this.model.attributes.id},dataType:"json",type:"POST",beforeSend:function(){},complete:function(){},error:function(){alert("Error!")},success:function(k){if(k.success){j.model.set(k.data);console.log(k.data);j.render()}else{alert(k.data)}}})},edit:function(n){n.preventDefault();var l=this,m=e(n.target),k=parseInt(e(".wc_gateways tr[data-field_id]").length-1),j=parseInt(l.model.get("id"));g++;if(b){clearTimeout(b)}b=setTimeout(function(){if(m.hasClass("media-modal-next")){j=Math.min(j+g,k)}else{j=Math.max(j-g,0)}l.model.set({id:j});g=0;l.load()},300)},open:function(j){this.load();e("body").addClass("modal-open").append(this.$el)},update:function(m){m.preventDefault();var k=e(m.target),j=k.attr("name"),l=k.val();if(m.target.type==="checkbox"){l=k.prop("checked")===true?1:0}this.model.attributes[j]=l;this.model.changed[j]=l},change:function(j){j.preventDefault();this.update(j);this.render()},close:function(j){j.preventDefault();this.undelegateEvents();e(document).off("focusin");e("body").removeClass("modal-open");this.remove()},parent:function(m){m.preventDefault();var l=this,k=l.$el.find("#wooccm_modal"),j=k.find(".attachment-details");this.update(m);e.ajax({url:wooccm_field.ajax_url,data:{action:"wooccm_load_parent",nonce:wooccm_field.nonce,conditional_parent_key:l.model.attributes.conditional_parent_key},dataType:"json",type:"POST",beforeSend:function(){j.addClass("save-waiting")},complete:function(){j.addClass("save-complete");j.removeClass("save-waiting")},error:function(){alert("Error!")},success:function(n){if(n.success){l.model.attributes.parent=n.data;l.model.changed.parent=n.data;l.render()}else{alert(n.data)}}});return false},submit:function(m){m.preventDefault();var l=this,k=l.$el.find("#wooccm_modal"),j=k.find(".attachment-details");e.ajax({url:wooccm_field.ajax_url,data:{action:"wooccm_save_field",nonce:wooccm_field.nonce,field_id:l.model.attributes.id,field_data:e("form",this.$el).serialize()},dataType:"json",type:"POST",beforeSend:function(){j.addClass("save-waiting");c(k)},complete:function(){j.addClass("save-complete");j.removeClass("save-waiting");f(k)},error:function(){alert("Error!")},success:function(n){if(n.success){if(n.data.id!=l.model.attributes.id){location.reload();return}l.model.set(n.data)}else{alert(n.data)}}});return false}});var a=Backbone.View.extend({initialize:function(m){var l=e(m.target),k=l.closest("[data-field_id]").data("field_id");var j=new h();j.set({id:k});new i({model:j})},});e("#wooccm_billing_settings_add, #wooccm_shipping_settings_add, #wooccm_additional_settings_add").on("click",function(j){j.preventDefault();new a(j)});e("#wooccm_billing_settings_reset, #wooccm_shipping_settings_reset, #wooccm_additional_settings_reset").on("click",function(k){k.preventDefault();var j=e(k.target);var l=confirm(wooccm_field.message.reset);if(!l){return false}e.ajax({url:wooccm_field.ajax_url,data:{action:"wooccm_reset_fields",nonce:wooccm_field.nonce},dataType:"json",type:"POST",beforeSend:function(){},complete:function(){},error:function(){alert("Error!")},success:function(m){if(m.success){location.reload()}else{alert(m.data)}}});return false});e(".wooccm_billing_settings_edit, .wooccm_shipping_settings_edit, .wooccm_additional_settings_edit").on("click",function(j){j.preventDefault();new a(j)});e(".wooccm_billing_settings_delete, .wooccm_shipping_settings_delete, .wooccm_additional_settings_delete").on("click",function(m){m.preventDefault();var l=e(m.target),k=l.closest("[data-field_id]"),j=k.data("field_id");var n=confirm(wooccm_field.message.remove);if(!n){return false}e.ajax({url:wooccm_field.ajax_url,data:{action:"wooccm_delete_field",nonce:wooccm_field.nonce,field_id:j,},dataType:"json",type:"POST",beforeSend:function(){},complete:function(){},error:function(){alert("Error!")},success:function(o){if(o.success){k.remove()}else{alert(o.data)}}});return false});e(document).on("click",".wooccm-field-toggle-attribute",function(m){m.preventDefault();var j=e(this),l=j.closest("tr"),k=j.find(".woocommerce-input-toggle");e.ajax({url:wooccm_field.ajax_url,data:{action:"wooccm_toggle_field_attribute",nonce:wooccm_field.nonce,field_attr:e(this).data("field_attr"),field_id:l.data("field_id")},dataType:"json",type:"POST",beforeSend:function(n){k.addClass("woocommerce-input-toggle--loading")},success:function(n){if(true===n.data){k.removeClass("woocommerce-input-toggle--enabled, woocommerce-input-toggle--disabled");k.addClass("woocommerce-input-toggle--enabled");k.removeClass("woocommerce-input-toggle--loading")}else{if(true!==n.data){k.removeClass("woocommerce-input-toggle--enabled, woocommerce-input-toggle--disabled");k.addClass("woocommerce-input-toggle--disabled");k.removeClass("woocommerce-input-toggle--loading")}}}});return false});e(document).on("change",".wooccm-field-change-attribute",function(l){l.preventDefault();var j=e(this),k=j.closest("tr");e.ajax({url:wooccm_field.ajax_url,data:{action:"wooccm_change_field_attribute",nonce:wooccm_field.nonce,field_attr:j.data("field_attr"),field_value:j.val(),field_id:k.data("field_id"),},dataType:"json",type:"POST",beforeSend:function(m){j.prop("disabled",true)},success:function(m){console.log(m.data)},complete:function(m){j.prop("disabled",false)},});return false})})(jQuery);
1
+ (function(e){var g=0,b;var d=function(j){return j.is(".processing")||j.parents(".processing").length};var c=function(j){if(!d(j)){j.addClass("processing").block({message:null,overlayCSS:{background:"#fff",opacity:0.6}})}};var f=function(j){j.removeClass("processing").unblock()};var h=Backbone.Model.extend({defaults:wooccm_field.args});var i=Backbone.View.extend({events:{"change input":"enable","change textarea":"enable","change select":"enable","click .media-modal-backdrop":"close","click .media-modal-close":"close","click .media-modal-prev":"edit","click .media-modal-next":"edit","change .media-modal-change":"change","change .media-modal-parent":"parent","submit .media-modal-form":"submit",},templates:{},initialize:function(){_.bindAll(this,"open","edit","parent","change","load","render","close","submit");this.init();this.open()},init:function(){this.templates.window=wp.template("wooccm-modal-window")},render:function(){var k=this;var j=this.$el.find("ul.wc-tabs li.active a").attr("href");k.$el.html(k.templates.window(k.model.attributes));_.delay(function(){k.$el.trigger("wooccm-enhanced-options");k.$el.trigger("wooccm-enhanced-select");k.$el.trigger("wooccm-tab-panels",j);k.$el.trigger("init_tooltips")},100)},load:function(){var j=this;if(j.model.attributes.id==undefined){j.render();return}e.ajax({url:wooccm_field.ajax_url,data:{action:"wooccm_load_field",nonce:wooccm_field.nonce,field_id:this.model.attributes.id},dataType:"json",type:"POST",beforeSend:function(){},complete:function(){},error:function(){alert("Error!")},success:function(k){if(k.success){j.model.set(k.data);j.render()}else{alert(k.data)}}})},edit:function(n){n.preventDefault();var l=this,m=e(n.target),k=parseInt(e(".wc_gateways tr[data-field_id]").length),j=parseInt(l.model.get("order"));g++;if(b){clearTimeout(b)}b=setTimeout(function(){if(m.hasClass("media-modal-next")){j=Math.min(j+g,k)}else{j=Math.max(j-g,1)}l.model.set({id:parseInt(e(".wc_gateways tr[data-field_order="+j+"]").data("field_id"))});g=0;l.load()},300)},open:function(j){this.load();e("body").addClass("modal-open").append(this.$el)},update:function(m){m.preventDefault();var k=e(m.target),j=k.attr("name"),l=k.val();if(m.target.type==="checkbox"){l=k.prop("checked")===true?1:0}this.model.attributes[j]=l;this.model.changed[j]=l},change:function(j){j.preventDefault();this.update(j);this.render()},close:function(j){j.preventDefault();this.undelegateEvents();e(document).off("focusin");e("body").removeClass("modal-open");this.remove()},parent:function(m){m.preventDefault();var l=this,k=l.$el.find("#wooccm_modal"),j=k.find(".attachment-details");this.update(m);e.ajax({url:wooccm_field.ajax_url,data:{action:"wooccm_load_parent",nonce:wooccm_field.nonce,conditional_parent_key:l.model.attributes.conditional_parent_key},dataType:"json",type:"POST",beforeSend:function(){e(".media-modal-submit").attr("disabled",true);j.addClass("save-waiting")},complete:function(){j.addClass("save-complete");j.removeClass("save-waiting")},error:function(){alert("Error!")},success:function(n){if(n.success){l.model.attributes.parent=n.data;l.model.changed.parent=n.data;l.render()}else{alert(n.data)}}});return false},reload:function(j){if(this.$el.find("#wooccm_modal").hasClass("reload")){location.reload();return}this.remove();return},close:function(j){j.preventDefault();this.undelegateEvents();e(document).off("focusin");e("body").removeClass("modal-open");this.reload(j);return},enable:function(j){e(".media-modal-submit").removeProp("disabled")},submit:function(m){m.preventDefault();var l=this,k=l.$el.find("#wooccm_modal"),j=k.find(".attachment-details");e.ajax({url:wooccm_field.ajax_url,data:{action:"wooccm_save_field",nonce:wooccm_field.nonce,field_id:l.model.attributes.id,field_data:e("form",this.$el).serialize()},dataType:"json",type:"POST",beforeSend:function(){e(".media-modal-submit").prop("disabled",true);j.addClass("save-waiting");c(k)},complete:function(){j.addClass("save-complete");j.removeClass("save-waiting");f(k)},error:function(){alert("Error!")},success:function(n){if(n.success){if(l.model.attributes.id==undefined){l.close(m)}l.model.set(n.data);k.addClass("reload")}else{alert(n.data)}}});return false}});var a=Backbone.View.extend({initialize:function(m){var l=e(m.target),k=l.closest("[data-field_id]").data("field_id");var j=new h();j.set({id:k});new i({model:j})},});e("#wooccm_billing_settings_add, #wooccm_shipping_settings_add, #wooccm_additional_settings_add").on("click",function(j){j.preventDefault();new a(j)});e("#wooccm_billing_settings_reset, #wooccm_shipping_settings_reset, #wooccm_additional_settings_reset").on("click",function(k){k.preventDefault();var j=e(k.target);var l=confirm(wooccm_field.message.reset);if(!l){return false}e.ajax({url:wooccm_field.ajax_url,data:{action:"wooccm_reset_fields",nonce:wooccm_field.nonce},dataType:"json",type:"POST",beforeSend:function(){},complete:function(){},error:function(){alert("Error!")},success:function(m){if(m.success){location.reload()}else{alert(m.data)}}});return false});e(".wooccm_billing_settings_edit, .wooccm_shipping_settings_edit, .wooccm_additional_settings_edit").on("click",function(j){j.preventDefault();new a(j)});e(".wooccm_billing_settings_delete, .wooccm_shipping_settings_delete, .wooccm_additional_settings_delete").on("click",function(m){m.preventDefault();var l=e(m.target),k=l.closest("[data-field_id]"),j=k.data("field_id");var n=confirm(wooccm_field.message.remove);if(!n){return false}e.ajax({url:wooccm_field.ajax_url,data:{action:"wooccm_delete_field",nonce:wooccm_field.nonce,field_id:j,},dataType:"json",type:"POST",beforeSend:function(){},complete:function(){},error:function(){alert("Error!")},success:function(o){if(o.success){k.remove()}else{alert(o.data)}}});return false});e(document).on("click",".wooccm-field-toggle-attribute",function(m){m.preventDefault();var j=e(this),l=j.closest("tr"),k=j.find(".woocommerce-input-toggle");e.ajax({url:wooccm_field.ajax_url,data:{action:"wooccm_toggle_field_attribute",nonce:wooccm_field.nonce,field_attr:e(this).data("field_attr"),field_id:l.data("field_id")},dataType:"json",type:"POST",beforeSend:function(n){k.addClass("woocommerce-input-toggle--loading")},success:function(n){if(true===n.data){k.removeClass("woocommerce-input-toggle--enabled, woocommerce-input-toggle--disabled");k.addClass("woocommerce-input-toggle--enabled");k.removeClass("woocommerce-input-toggle--loading")}else{if(true!==n.data){k.removeClass("woocommerce-input-toggle--enabled, woocommerce-input-toggle--disabled");k.addClass("woocommerce-input-toggle--disabled");k.removeClass("woocommerce-input-toggle--loading")}}}});return false});e(document).on("change",".wooccm-field-change-attribute",function(l){l.preventDefault();var j=e(this),k=j.closest("tr");e.ajax({url:wooccm_field.ajax_url,data:{action:"wooccm_change_field_attribute",nonce:wooccm_field.nonce,field_attr:j.data("field_attr"),field_value:j.val(),field_id:k.data("field_id"),},dataType:"json",type:"POST",beforeSend:function(m){j.prop("disabled",true)},success:function(m){console.log(m.data)},complete:function(m){j.prop("disabled",false)},});return false})})(jQuery);
assets/frontend/js/wooccm-checkout.js CHANGED
@@ -471,7 +471,7 @@
471
  };
472
 
473
  var wooccm_enhanced_select = function () {
474
- $('select.wooccm-enhanced-select:visible').each(function () {
475
  var select2_args = $.extend({
476
  width: '100%',
477
  placeholder: $(this).data('placeholder') || '',
471
  };
472
 
473
  var wooccm_enhanced_select = function () {
474
+ $('select.wooccm-enhanced-select').each(function () {
475
  var select2_args = $.extend({
476
  width: '100%',
477
  placeholder: $(this).data('placeholder') || '',
includes/class-wooccm.php CHANGED
@@ -52,7 +52,7 @@ final class WOOCCM {
52
  // -----------------------------------------------------------------------
53
  wp_register_style('wooccm', plugins_url('assets/frontend/css/wooccm.css', WOOCCM_PLUGIN_FILE), false, WOOCCM_PLUGIN_VERSION, 'all');
54
 
55
- wp_register_script('wooccm-checkout', plugins_url('assets/frontend/js/wooccm-checkout.js', WOOCCM_PLUGIN_FILE), array('jquery'), WOOCCM_PLUGIN_VERSION, true);
56
 
57
  wp_localize_script('wooccm-checkout', 'wooccm_upload', array(
58
  'ajax_url' => admin_url('admin-ajax.php'),
52
  // -----------------------------------------------------------------------
53
  wp_register_style('wooccm', plugins_url('assets/frontend/css/wooccm.css', WOOCCM_PLUGIN_FILE), false, WOOCCM_PLUGIN_VERSION, 'all');
54
 
55
+ wp_register_script('wooccm-checkout', plugins_url('assets/frontend/js/wooccm-checkout.js', WOOCCM_PLUGIN_FILE), array('jquery', 'selectWoo'), WOOCCM_PLUGIN_VERSION, true);
56
 
57
  wp_localize_script('wooccm-checkout', 'wooccm_upload', array(
58
  'ajax_url' => admin_url('admin-ajax.php'),
includes/view/backend/pages/modals/modal-field.php CHANGED
@@ -4,13 +4,13 @@
4
  <form class="media-modal-form" method="POST">
5
  <# if ( data.id != undefined ) { #>
6
  <input type="hidden" name="id" value="{{data.id}}" />
 
7
  <# } #>
8
  <div class="edit-attachment-frame mode-select hide-menu hide-router">
9
  <div class="edit-media-header">
10
  <# if ( data.id != undefined ) { #>
11
- <button type="button" class="media-modal-prev left dashicons <# if ( data.id <= 0 ) { #>disabled<# } #>"><span class="screen-reader-text"><?php esc_html_e('Edit previous media item'); ?></span></button>
12
- <button type="button" class="media-modal-next right dashicons <# if ( data.id >= <?php echo esc_attr(count($fields)) - 1 ?>) { #>disabled<# } #>"><span class="screen-reader-text"><?php esc_html_e('Edit next media item'); ?></span></button>
13
- <# } #>
14
  <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></button>
15
  </div>
16
  <div class="media-frame-title">
@@ -50,7 +50,7 @@
50
  <div class="media-toolbar">
51
  <div class="media-toolbar-secondary"></div>
52
  <div class="media-toolbar-primary search-form">
53
- <button type="submit" class="media-modal-submit button button-primary media-button button-large"><?php esc_html_e('Save'); ?></button>
54
  <button type="button" class="media-modal-close button button-secondary media-button button-large" style="
55
  float: none;
56
  position: inherit;
4
  <form class="media-modal-form" method="POST">
5
  <# if ( data.id != undefined ) { #>
6
  <input type="hidden" name="id" value="{{data.id}}" />
7
+ <input type="hidden" name="order" value="{{data.order}}" />
8
  <# } #>
9
  <div class="edit-attachment-frame mode-select hide-menu hide-router">
10
  <div class="edit-media-header">
11
  <# if ( data.id != undefined ) { #>
12
+ <button type="button" class="media-modal-prev left dashicons <# if ( data.order == 1 ) { #>disabled<# } #>"><span class="screen-reader-text"><?php esc_html_e('Edit previous media item'); ?></span></button>
13
+ <button type="button" class="media-modal-next right dashicons <# if ( data.order == <?php echo esc_attr(count($fields)); ?> ) { #>disabled<# } #>"><span class="screen-reader-text"><?php esc_html_e('Edit next media item'); ?></span></button> <# } #>
 
14
  <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></button>
15
  </div>
16
  <div class="media-frame-title">
50
  <div class="media-toolbar">
51
  <div class="media-toolbar-secondary"></div>
52
  <div class="media-toolbar-primary search-form">
53
+ <button type="submit" class="media-modal-submit button button-primary media-button button-large" disabled="disabled"><?php esc_html_e('Save'); ?></button>
54
  <button type="button" class="media-modal-close button button-secondary media-button button-large" style="
55
  float: none;
56
  position: inherit;
includes/view/backend/pages/parts/loop.php CHANGED
@@ -23,7 +23,7 @@
23
  <tbody class="ui-sortable">
24
  <?php if (count($fields)): ?>
25
  <?php foreach ($fields as $id => $field) : ?>
26
- <tr data-field_id="<?php echo esc_attr($id); ?>">
27
  <td class="sort ui-sortable-handle">
28
  <div class="wc-item-reorder-nav">
29
  <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'), $field['label'])); ?>"><?php esc_html_e('Move up', 'woocommerce-checkout-manager'); ?></button>
23
  <tbody class="ui-sortable">
24
  <?php if (count($fields)): ?>
25
  <?php foreach ($fields as $id => $field) : ?>
26
+ <tr data-field_id="<?php echo esc_attr($field['id']); ?>" data-field_order="<?php echo esc_attr($field['order']); ?>">
27
  <td class="sort ui-sortable-handle">
28
  <div class="wc-item-reorder-nav">
29
  <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'), $field['label'])); ?>"><?php esc_html_e('Move up', 'woocommerce-checkout-manager'); ?></button>
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.7.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -99,6 +99,10 @@ Your Order data can be reviewed in each order within the default WooCommerce Ord
99
 
100
  == Changelog ==
101
 
 
 
 
 
102
  = 4.7.1 =
103
  * Fix: suggestions plugins update
104
 
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.7.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
99
 
100
  == Changelog ==
101
 
102
+ = 4.7.2 =
103
+ * Fix: select2
104
+ * Fix: reorder fields
105
+
106
  = 4.7.1 =
107
  * Fix: suggestions plugins update
108
 
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.7.1
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.7.1');
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.7.2
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.7.2');
21
  }
22
  if (!defined('WOOCCM_PLUGIN_FILE')) {
23
  define('WOOCCM_PLUGIN_FILE', __FILE__);