WooCommerce Checkout Manager - Version 6.3.6

Version Description

Download this release

Release Info

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

Code changes from version 6.3.5 to 6.3.6

build/backend/css/style.css CHANGED
@@ -1 +1 @@
1
- .select2-container{z-index:9999999}.select2-container .select2-selection--single,.select2-container .select2-selection--single .select2-selection__rendered,.select2-container .select2-selection--single .select2-selection__arrow{height:30px !important;line-height:30px !important}.wooccm-premium{opacity:.5;pointer-events:none}.button.fileinput-button{position:relative;overflow:hidden !important}.button.fileinput-button input{position:absolute;top:0;right:0;margin:0;opacity:0;-ms-filter:"alpha(opacity=0)";font-size:200px;direction:ltr;cursor:pointer}table.wc_gateways>tbody>tr>td select{line-height:1 !important}table.wc_gateways>tbody>tr>td.label{font-weight:600}table.wooccm-enhanced-options{border:none;box-shadow:none}table.wooccm-enhanced-options>thead>th .woocommerce-help-tip{margin:-1px 0 0 .25em}table.wooccm-enhanced-options>tbody>tr>td input.label{width:100%}table.wooccm-enhanced-options>tbody>tr>td select.add-price-type{margin:0 0 0 10px}table.wooccm-enhanced-options>tbody>tr>td input.check{margin:0 9px}table.wooccm-enhanced-options>tbody>tr>td.sort .wc-item-reorder-nav{width:auto}#wooccm_modal.processing{pointer-events:none}#wooccm_modal.processing:before{content:"";position:absolute;top:0;bottom:0;left:0;right:0;background-color:#fff;z-index:99999999;opacity:.8}#wooccm_modal select{min-height:30px}#wooccm_modal .form-field .wrap{padding:0}#wooccm_modal .attachment-info .details,#wooccm_modal .attachment-info .settings{width:100%}#wooccm_modal .attachment-info .woocommerce_options_panel label,#wooccm_modal .attachment-info .woocommerce_options_panel legend{width:75px;margin:0 0 0 -90px;font-weight:600}#wooccm_modal .attachment-info .woocommerce_options_panel fieldset.form-field,#wooccm_modal .attachment-info .woocommerce_options_panel p.form-field{padding:0 20px 0 92px !important}#wooccm_modal .attachment-info .woocommerce_options_panel input[type=email],#wooccm_modal .attachment-info .woocommerce_options_panel input[type=number],#wooccm_modal .attachment-info .woocommerce_options_panel input[type=password],#wooccm_modal .attachment-info .woocommerce_options_panel input[type=text],#wooccm_modal .attachment-info .woocommerce_options_panel select,#wooccm_modal .attachment-info .woocommerce_options_panel .select2-container{width:100% !important}#wooccm_modal #woocommerce-product-data .woocommerce_options_panel{width:100%}#wooccm_modal #woocommerce-product-data .woocommerce_options_panel .premium{display:block;clear:both}#wooccm_modal #woocommerce-product-data .woocommerce_options_panel .woocommerce-help-tip{margin:0 0 0 .5em}#wooccm_modal #woocommerce-product-data .woocommerce_options_panel .select2-container{width:50% !important;line-height:16px}#wooccm_modal #woocommerce-product-data .woocommerce_options_panel .select2-container .select2-selection{box-shadow:none;border-radius:3px;padding:0 24px 0 8px}#wooccm_modal #woocommerce-product-data .woocommerce_options_panel .select2-container .select2-selection--multiple{line-height:16px;min-height:30px}@media only screen and (max-width: 1280px){#wooccm_modal #woocommerce-product-data .woocommerce_options_panel .select2-container{width:80% !important}}#wooccm_modal #woocommerce-product-data .woocommerce_options_panel .select2-container--default .select2-selection--multiple .select2-selection__rendered li{margin:3px 3px 0 0}#wooccm_modal #woocommerce-product-data .woocommerce_options_panel .select2-container--default.select2-container--focus .select2-selection--multiple{border-color:#5b9dd9 !important;box-shadow:0 0 2px rgba(30,140,190,.8) !important;outline:2px solid rgba(0,0,0,0) !important}#wooccm-order-files .inside{margin:0;padding:0;background:#fefefe;display:block !important}#wooccm-order-files .handlediv,#wooccm-order-files .hndle{display:none}#wooccm-order-files .wooccm_upload_results{display:inline-block;margin:0 10px}#wooccm-order-files .wooccm_order_attachments_wrapper{margin:0;overflow-x:auto}#wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments{width:100%;background:#fff}#wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments thead th:first-child{padding-left:2em}#wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments thead th.sortable{cursor:pointer}#wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments .item{min-width:200px}#wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments thead th{text-align:left;padding:1em;font-weight:400;color:#999;background:#f8f8f8;user-select:none}#wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments tbody#order_line_items tr:first-child td{border-top:none}#wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments tbody tr:last-child td{border-bottom:1px solid #dfdfdf}#wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments td.thumb{text-align:left;width:38px;padding-bottom:1.5em}#wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments td.thumb .wc-order-item-thumbnail{width:38px;height:38px;border:2px solid #e8e8e8;background:#f8f8f8;color:#ccc;position:relative;font-size:21px;display:block;text-align:center}#wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments tbody th:first-child,#wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments td:first-child{padding-left:2em}#wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments tbody th,#wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments td{padding:1.5em 1em 1em;text-align:left;line-height:1.5em;vertical-align:top;border-bottom:1px solid #f8f8f8}#wooccm-order-files .wc-order-data-row{border-bottom:1px solid #dfdfdf;padding:1.5em 2em;background:#f8f8f8;line-height:2em;text-align:left}
1
+ .select2-container{z-index:9999999}.select2-container .select2-selection--single,.select2-container .select2-selection--single .select2-selection__rendered,.select2-container .select2-selection--single .select2-selection__arrow{height:30px !important;line-height:30px !important}.wooccm-premium{opacity:.5;pointer-events:none}.button.fileinput-button{position:relative;overflow:hidden !important}.button.fileinput-button input{position:absolute;top:0;right:0;margin:0;opacity:0;-ms-filter:"alpha(opacity=0)";font-size:200px;direction:ltr;cursor:pointer}table.wc_gateways>tbody>tr>td select{line-height:1 !important}table.wc_gateways>tbody>tr>td.label{font-weight:600}table.wooccm-enhanced-options{border:none;box-shadow:none}table.wooccm-enhanced-options>thead>th .woocommerce-help-tip{margin:-1px 0 0 .25em}table.wooccm-enhanced-options>tbody>tr>td input.label{width:100%}table.wooccm-enhanced-options>tbody>tr>td select.add-price-type{margin:0 0 0 10px}table.wooccm-enhanced-options>tbody>tr>td input.check{margin:0 9px}table.wooccm-enhanced-options>tbody>tr>td.sort .wc-item-reorder-nav{width:auto}#wooccm_modal.processing{pointer-events:none}#wooccm_modal.processing:before{content:"";position:absolute;top:0;bottom:0;left:0;right:0;background-color:#fff;z-index:99999999;opacity:.8}#wooccm_modal select{min-height:30px}#wooccm_modal .form-field .wrap{padding:0}#wooccm_modal .attachment-info .details,#wooccm_modal .attachment-info .settings{width:100%}#wooccm_modal .attachment-info .woocommerce_options_panel label,#wooccm_modal .attachment-info .woocommerce_options_panel legend{width:75px;margin:0 0 0 -90px;font-weight:600}#wooccm_modal .attachment-info .woocommerce_options_panel fieldset.form-field,#wooccm_modal .attachment-info .woocommerce_options_panel p.form-field{padding:0 20px 0 92px !important}#wooccm_modal .attachment-info .woocommerce_options_panel input[type=email],#wooccm_modal .attachment-info .woocommerce_options_panel input[type=number],#wooccm_modal .attachment-info .woocommerce_options_panel input[type=password],#wooccm_modal .attachment-info .woocommerce_options_panel input[type=text],#wooccm_modal .attachment-info .woocommerce_options_panel select,#wooccm_modal .attachment-info .woocommerce_options_panel .select2-container{width:100% !important}#wooccm_modal #woocommerce-product-data .woocommerce_options_panel{width:100%}#wooccm_modal #woocommerce-product-data .woocommerce_options_panel .premium{display:block;clear:both}#wooccm_modal #woocommerce-product-data .woocommerce_options_panel .woocommerce-help-tip{margin:0 0 0 .5em}#wooccm_modal #woocommerce-product-data .woocommerce_options_panel .select2-container{width:50% !important;line-height:16px}#wooccm_modal #woocommerce-product-data .woocommerce_options_panel .select2-container .select2-selection{box-shadow:none;border-radius:3px;padding:0 24px 0 8px}#wooccm_modal #woocommerce-product-data .woocommerce_options_panel .select2-container .select2-selection--multiple{line-height:16px;min-height:30px}@media only screen and (max-width: 1280px){#wooccm_modal #woocommerce-product-data .woocommerce_options_panel .select2-container{width:80% !important}}#wooccm_modal #woocommerce-product-data .woocommerce_options_panel .select2-container--default .select2-selection--multiple .select2-selection__rendered li{margin:3px 3px 0 0}#wooccm_modal #woocommerce-product-data .woocommerce_options_panel .select2-container--default.select2-container--focus .select2-selection--multiple{border-color:#5b9dd9 !important;box-shadow:0 0 2px rgba(30,140,190,.8) !important;outline:2px solid rgba(0,0,0,0) !important}#wooccm-order-files .inside{margin:0;padding:0;background:#fefefe;display:block !important}#wooccm-order-files .handlediv,#wooccm-order-files .hndle{display:none}#wooccm-order-files .wooccm_upload_results{display:inline-block;margin:0 10px}#wooccm-order-files .wooccm_order_attachments_wrapper{margin:0;overflow-x:auto}#wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments{width:100%;background:#fff}#wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments thead th:first-child{padding-left:2em}#wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments thead th.sortable{cursor:pointer}#wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments .item{min-width:200px}#wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments thead th{text-align:left;padding:1em;font-weight:400;color:#999;background:#f8f8f8;user-select:none}#wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments tbody#order_line_items tr:first-child td{border-top:none}#wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments tbody tr:last-child td{border-bottom:1px solid #dfdfdf}#wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments td.thumb{text-align:left;width:38px;padding-bottom:1.5em}#wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments td.thumb .wc-order-item-thumbnail{width:38px;height:38px;border:2px solid #e8e8e8;background:#f8f8f8;color:#ccc;position:relative;font-size:21px;display:block;text-align:center}#wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments tbody th:first-child,#wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments td:first-child{padding-left:2em}#wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments tbody th,#wooccm-order-files .wooccm_order_attachments_wrapper table.wooccm_order_attachments td{padding:1.5em 1em 1em;text-align:left;line-height:1.5em;vertical-align:top;border-bottom:1px solid #f8f8f8}#wooccm-order-files .wc-order-data-row{border-bottom:1px solid #dfdfdf;padding:1.5em 2em;background:#f8f8f8;line-height:2em;text-align:left}
build/backend/js/index.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('backbone', 'jquery', 'jquery-serializejson', 'jquery-ui-datepicker', 'wp-util'), 'version' => 'f67e0ed96ee9b0e5e761');
1
+ <?php return array('dependencies' => array('backbone', 'jquery', 'jquery-serializejson', 'jquery-ui-datepicker', 'wp-util'), 'version' => 'f67e0ed96ee9b0e5e761');
build/frontend/css/style.css CHANGED
@@ -1 +1 @@
1
- .woocommerce form .wooccm-clearfix:before,.woocommerce form .wooccm-clearfix:after{content:"";display:table}.woocommerce form .wooccm-clearfix:after{clear:both}.woocommerce form .wooccm-conditional-child{display:none !important}.woocommerce form .wooccm-type-hidden{display:none}.woocommerce form .wooccm-type-radio .woocommerce-radio-wrapper label{display:inline-block}.woocommerce form .wooccm-colorpicker-iris .iris-picker{display:none}.woocommerce form .wooccm-colorpicker-iris.active .iris-picker{display:block}.button.fileinput-button{position:relative;overflow:hidden !important}.button.fileinput-button input{position:absolute;top:0;right:0;margin:0;opacity:0;-ms-filter:"alpha(opacity=0)";font-size:200px;direction:ltr;cursor:pointer}.wooccm-file-list{margin:0 -5px;padding:0;display:flex;flex-wrap:wrap;align-items:center;justify-content:start}.wooccm-file-list .wooccm-file-file{display:flex;justify-content:center;align-items:stretch;box-sizing:border-box;padding:10px 5px 0 5px;width:25%;position:relative}.wooccm-file-list .wooccm-file-file .wooccm-file-list-delete{z-index:1;position:absolute;top:2px;right:-3px;width:16px;height:16px;background-color:#222;display:block;line-height:16px;text-align:center;color:#fefefe;font-weight:900;border-radius:50%;font-size:12px;cursor:pointer;font-family:code;text-decoration:none !important}.wooccm-file-list .wooccm-file-file .wooccm-file-list-container{width:100%;overflow:hidden}.wooccm-file-list .wooccm-file-file .wooccm-file-list-image-container{display:flex;justify-content:center;align-items:center;overflow:hidden;width:100%;padding-top:100%;position:relative;background:#eee}.wooccm-file-list .wooccm-file-file .wooccm-file-list-image-container>img{overflow:hidden;object-fit:cover;position:absolute;top:30%;bottom:auto;height:40%;opacity:.8}.wooccm-file-list .wooccm-file-file .wooccm-file-list-image-container>img.image{top:0;bottom:0;left:0;right:0;max-height:100%;max-height:100%;height:100%;width:100%}.wooccm-file-list .ui-timepicker-table a{word-break:normal}.wooccm-file-list .ui-state-disabled,.wooccm-file-list .ui-widget-content .ui-state-disabled,.wooccm-file-list .ui-widget-header .ui-state-disabled{width:100%}
1
+ .woocommerce form .wooccm-clearfix:before,.woocommerce form .wooccm-clearfix:after{content:"";display:table}.woocommerce form .wooccm-clearfix:after{clear:both}.woocommerce form .wooccm-conditional-child{display:none !important}.woocommerce form .wooccm-type-hidden{display:none}.woocommerce form .wooccm-type-radio .woocommerce-radio-wrapper label{display:inline-block}.woocommerce form .wooccm-colorpicker-iris .iris-picker{display:none}.woocommerce form .wooccm-colorpicker-iris.active .iris-picker{display:block}.button.fileinput-button{position:relative;overflow:hidden !important}.button.fileinput-button input{position:absolute;top:0;right:0;margin:0;opacity:0;-ms-filter:"alpha(opacity=0)";font-size:200px;direction:ltr;cursor:pointer}.wooccm-file-list{margin:0 -5px;padding:0;display:flex;flex-wrap:wrap;align-items:center;justify-content:start}.wooccm-file-list .wooccm-file-file{display:flex;justify-content:center;align-items:stretch;box-sizing:border-box;padding:10px 5px 0 5px;width:25%;position:relative}.wooccm-file-list .wooccm-file-file .wooccm-file-list-delete{z-index:1;position:absolute;top:2px;right:-3px;width:16px;height:16px;background-color:#222;display:block;line-height:16px;text-align:center;color:#fefefe;font-weight:900;border-radius:50%;font-size:12px;cursor:pointer;font-family:code;text-decoration:none !important}.wooccm-file-list .wooccm-file-file .wooccm-file-list-container{width:100%;overflow:hidden}.wooccm-file-list .wooccm-file-file .wooccm-file-list-image-container{display:flex;justify-content:center;align-items:center;overflow:hidden;width:100%;padding-top:100%;position:relative;background:#eee}.wooccm-file-list .wooccm-file-file .wooccm-file-list-image-container>img{overflow:hidden;object-fit:cover;position:absolute;top:30%;bottom:auto;height:40%;opacity:.8}.wooccm-file-list .wooccm-file-file .wooccm-file-list-image-container>img.image{top:0;bottom:0;left:0;right:0;max-height:100%;max-height:100%;height:100%;width:100%}.wooccm-file-list .ui-timepicker-table a{word-break:normal}.wooccm-file-list .ui-state-disabled,.wooccm-file-list .ui-widget-content .ui-state-disabled,.wooccm-file-list .ui-widget-header .ui-state-disabled{width:100%}
build/frontend/js/index.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('jquery', 'selectWoo'), 'version' => '482dd2ea7a20556d894b');
1
+ <?php return array('dependencies' => array('jquery', 'selectWoo'), 'version' => '8d35865a20283240242d');
build/frontend/js/index.js CHANGED
@@ -1 +1 @@
1
- !function(){"use strict";window.jQuery,jQuery(document).ready((function(e){e(document).on("click",".wooccm_delete_attachment",(function(t){var o=e(this).closest("tr"),c=e(this).data("attachment_id");o.hide(),e("#wooccm_order_attachment_update").prop("disabled",!1),e("#delete_attachments_ids").val(e("#delete_attachments_ids").val().replace(c,""))})),e(document).on("click","#wooccm_order_attachment_update",(function(t){e.ajax({url:wooccm_upload.ajax_url,type:"POST",cache:!1,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(t){e(".wooccm_upload_results").html(wooccm_upload.message.saving)},success:function(t){t.success?(e(".wooccm_upload_results").html(wooccm_upload.message.deleted),e("#wooccm_order_attachment_update").prop("disabled",!0)):e(".wooccm_upload_results").html(t.data)}})})),e(document).on("change","#wooccm_order_attachment_upload",(function(t){var o=!1,c=e(this).data("order_id");window.FormData&&(o=new FormData);for(var a,i=0,n=this.files.length;i<n;i++)a=this.files[i],o&&o.append("wooccm_order_attachment_upload[]",a);o&&(o.append("action","wooccm_order_attachment_upload"),o.append("nonce",wooccm_upload.nonce),o.append("order_id",c),e.ajax({url:wooccm_upload.ajax_url,type:"POST",cache:!1,data:o,processData:!1,contentType:!1,beforeSend:function(t){var o;e(".wooccm_upload_results").html(wooccm_upload.message.uploading),function(e){return e.is(".processing")||e.parents(".processing").length}(o=e(".wooccm_order_attachments_wrapper"))||o.addClass("processing").block({message:null,overlayCSS:{background:"#fff",opacity:.6}})},success:function(t){t.success?(e(".wooccm_order_attachments_wrapper").fadeOut(),e(".wooccm_order_attachments_wrapper").replaceWith(e(t.data).fadeIn()),e(".wooccm_upload_results").html(wooccm_upload.message.success)):e(".wooccm_upload_results").html(t.data),e(".wooccm_order_attachments_wrapper").removeClass("processing").unblock()}}))}))})),window.window.selectWoo,function(e){var t=function(e){return e.is(".processing")||e.parents(".processing").length};e(document).on("country_to_state_changing",(function(t,o,c){var a=c,i=e.parseJSON(wc_address_i18n_params.locale_fields);e.each(i,(function(e,t){var o=a.find(t),c=o.find("[data-required]").data("required")||o.find(".wooccm-required-field").length;!function(e,t){t?(e.find("label .optional").remove(),e.addClass("validate-required"),0===e.find("label .required").length&&e.find("label").append('<abbr class="required" title="'+wc_address_i18n_params.i18n_required_text+'">*</abbr>'),e.show(),e.find("input[type=hidden]").prop("type","text")):(e.find("label .required").remove(),e.removeClass("validate-required woocommerce-invalid woocommerce-invalid-required-field"),0===e.find("label .optional").length&&e.find("label").append('<span class="optional">('+wc_address_i18n_params.i18n_optional_text+")</span>"))}(o,c)}))}));var o={};if(e(".wooccm-type-file").each((function(t,c){var a=e(c),i=a.find("[type=file]"),n=a.find(".wooccm-file-button"),r=a.find(".wooccm-file-list");o[a.attr("id")]=[],n.on("click",(function(e){e.preventDefault(),i.trigger("click")})),r.on("click",".wooccm-file-list-delete",(function(t){var c=e(this).closest(".wooccm-file-file"),i=e(this).closest("[data-file_id]").data("file_id");o[a.attr("id")]=e.grep(o[a.attr("id")],(function(e,t){return t!=i})),c.remove(),e("#order_review").trigger("wooccm_upload")})),i.on("change",(function(t){var c=e(this)[0].files;c.length&&window.FileReader&&e.each(c,(function(t,c){if(r.find("span[data-file_id]").length+t>=wooccm_upload.limit.max_files)return alert("Exeeds max files limit of "+wooccm_upload.limit.max_files),!1;if(c.size>wooccm_upload.limit.max_file_size)return alert("Exeeds max file size of "+wooccm_upload.limit.max_file_size),!0;var i,n=new FileReader;n.onload=(i=c,function(t){setTimeout((function(){!function(t,o,c,a,i){var n,r=e(t);i.match("image.*")?n="image":i.match("application/ms.*")?(c=wooccm_upload.icons.spreadsheet,n="spreadsheet"):i.match("application/x.*")?(c=wooccm_upload.icons.archive,n="application"):i.match("audio.*")?(c=wooccm_upload.icons.audio,n="audio"):i.match("text.*")?(c=wooccm_upload.icons.text,n="text"):i.match("video.*")?(c=wooccm_upload.icons.video,n="video"):(c=wooccm_upload.icons.interactive,n="interactive");var s='<span data-file_id="'+o+'" title="'+a+'" class="wooccm-file-file">\n <span class="wooccm-file-list-container">\n <a title="'+a+'" class="wooccm-file-list-delete">×</a>\n <span class="wooccm-file-list-image-container">\n <img class="'+n+'" alt="'+a+'" src="'+c+'"/>\n </span>\n </span>\n </span>';r.append(s).fadeIn()}(r,o[a.attr("id")].push(c)-1,t.target.result,i.name,i.type),e("#order_review").trigger("wooccm_upload")}),200)}),n.readAsDataURL(c)}))}))})),e("#order_review").on("ajaxSuccess wooccm_upload",(function(t,o,c){e(t.target);var a=e("#place_order");e(".wooccm-type-file").length?a.addClass("wooccm-upload-process"):a.removeClass("wooccm-upload-process")})),e(document).on("click","#place_order.wooccm-upload-process",(function(c){c.preventDefault();var a,i=e("form.checkout"),n=e(this);e(".wooccm-type-file").length&&window.FormData&&Object.keys(o).length&&(t(i)||(n.html(wooccm_upload.message.uploading),t(a=i)||a.addClass("processing").block({message:null,overlayCSS:{background:"#fff",opacity:.6}})),e.each(o,(function(t,o){var c=e("#"+t).find(".wooccm-file-field"),a=new FormData;e.each(o,(function(e,t){return e>wooccm_upload.limit.max_files?(console.log("Exeeds max files limit of "+wooccm_upload.limit.max_files),!1):t.size>wooccm_upload.limit.max_file_size?(console.log("Exeeds max file size of "+wooccm_upload.limit.max_files),!0):(console.log("We're ready to upload "+t.name),void a.append("wooccm_checkout_attachment_upload[]",t))})),a.append("action","wooccm_checkout_attachment_upload"),a.append("nonce",wooccm_upload.nonce),e.ajax({async:!1,url:wooccm_upload.ajax_url,type:"POST",cache:!1,data:a,processData:!1,contentType:!1,beforeSend:function(e){},success:function(t){t.success?c.val(t.data):e("body").trigger("update_checkout")},complete:function(e){}})})),function(e){e.removeClass("processing").unblock()}(i),n.removeClass("wooccm-upload-process").trigger("click"))})),e(document).on("change",".wooccm-add-price",(function(t){e("body").trigger("update_checkout")})),e(".wooccm-field").each((function(t,o){e(o).find("input,textarea,select").on("change keyup wooccm_change",(function(t){var o=e(t.target).attr("name").replace("[]",""),c=e(t.target).prop("type"),a=e(t.target).val();"checkbox"==c&&(a=-1!==e(t.target).attr("name").indexOf("[]")?e(t.target).closest(".wooccm-field").find("input:checked").map((function(e,t){return t.value})).toArray():e(t.target).is(":checked"));var i=e("*[data-conditional-parent="+o+"]"),n=i.closest(".wooccm-field");i.prop("disabled",!0),n.hide(),i.find("input,textarea,select").prop("disabled",!0),i.each((function(t,o){var c=e(o),i=c&&c.data("conditional-parent-value");if(a==i||e.isArray(a)&&a.indexOf(i)>-1){var n=c.closest(".wooccm-field");c.prop("disabled",!1),c.trigger("change"),n.attr("style","display: block !important"),c.find("input,textarea,select").prop("disabled",!1),c.find("input,textarea,select").trigger("change")}}))}))})),e(".wooccm-conditional-child").each((function(t,o){var c=e(o),a=e("#"+c.find("[data-conditional-parent]").data("conditional-parent")+"_field");a.find("select:first").trigger("wooccm_change"),a.find("textarea:first").trigger("wooccm_change"),a.find("input[type=button]:first").trigger("wooccm_change"),a.find("input[type=radio]:checked:first").trigger("wooccm_change"),a.find("input[type=checkbox]:checked:first").trigger("wooccm_change"),a.find("input[type=color]:first").trigger("wooccm_change"),a.find("input[type=date]:first").trigger("wooccm_change"),a.find("input[type=datetime-local]:first").trigger("wooccm_change"),a.find("input[type=email]:first").trigger("wooccm_change"),a.find("input[type=file]:first").trigger("wooccm_change"),a.find("input[type=hidden]:first").trigger("wooccm_change"),a.find("input[type=image]:first").trigger("wooccm_change"),a.find("input[type=month]:first").trigger("wooccm_change"),a.find("input[type=number]:first").trigger("wooccm_change"),a.find("input[type=password]:first").trigger("wooccm_change"),a.find("input[type=range]:first").trigger("wooccm_change"),a.find("input[type=reset]:first").trigger("wooccm_change"),a.find("input[type=search]:first").trigger("wooccm_change"),a.find("input[type=submit]:first").trigger("wooccm_change"),a.find("input[type=tel]:first").trigger("wooccm_change"),a.find("input[type=text]:first").trigger("wooccm_change"),a.find("input[type=time]:first").trigger("wooccm_change"),a.find("input[type=url]:first").trigger("wooccm_change"),a.find("input[type=week]:first").trigger("wooccm_change")})),e(".wooccm-enhanced-datepicker").each((function(t,o){var c=e(this),a=c.data("disable")||!1;e.isFunction(e.fn.datepicker)&&c.datepicker({dateFormat:c.data("formatdate")||"mm/dd/yy",minDate:c.data("mindate"),maxDate:c.data("maxdate"),beforeShowDay:function(t){var o=null!=t.getDay()&&t.getDay().toString();return a?[-1===e.inArray(o,a)]:[!0]}})})),e(".wooccm-enhanced-timepicker").each((function(t,o){var c=e(this);e.isFunction(e.fn.timepicker)&&(console.log(c.data("format-ampm")),c.timepicker({showPeriodLabels:!!c.data("format-ampm"),showPeriod:!!c.data("format-ampm"),showLeadingZero:!0,hours:c.data("hours")||void 0,minutes:c.data("minutes")||void 0}))})),e(".wooccm-colorpicker-farbtastic").each((function(t,o){var c=e(o),a=c.find("input[type=text]"),i=c.find(".wooccmcolorpicker_container");a.hide(),e.isFunction(e.fn.farbtastic)&&(i.farbtastic("#"+a.attr("id")),i.on("click",(function(e){a.fadeIn()})))})),e(".wooccm-colorpicker-iris").each((function(t,o){var c=e(o),a=c.find("input[type=text]");a.css("background",a.val()),a.on("click",(function(e){c.toggleClass("active")})),a.iris({class:a.attr("id"),palettes:!0,color:"",hide:!1,change:function(e,t){a.css("background",t.color.toString()).fadeIn()}})})),e(document).on("click",(function(t){0===e(t.target).closest(".iris-picker").length&&e(".wooccm-colorpicker-iris").removeClass("active")})),"undefined"==typeof wc_country_select_params)return!1;e().selectWoo&&e("select.wooccm-enhanced-select").each((function(){var t=e.extend({width:"100%",placeholder:e(this).data("placeholder")||"",allowClear:e(this).data("allowclear")||!1,selectOnClose:e(this).data("selectonclose")||!1,closeOnSelect:e(this).data("closeonselect")||!1,minimumResultsForSearch:e(this).data("search")||-1},{language:{errorLoading:function(){return wc_country_select_params.i18n_searching},inputTooLong:function(e){var t=e.input.length-e.maximum;return 1===t?wc_country_select_params.i18n_input_too_long_1:wc_country_select_params.i18n_input_too_long_n.replace("%qty%",t)},inputTooShort:function(e){var t=e.minimum-e.input.length;return 1===t?wc_country_select_params.i18n_input_too_short_1:wc_country_select_params.i18n_input_too_short_n.replace("%qty%",t)},loadingMore:function(){return wc_country_select_params.i18n_load_more},maximumSelected:function(e){return 1===e.maximum?wc_country_select_params.i18n_selection_too_long_1:wc_country_select_params.i18n_selection_too_long_n.replace("%qty%",e.maximum)},noResults:function(){return wc_country_select_params.i18n_no_matches},searching:function(){return wc_country_select_params.i18n_searching}}});e(this).on("select2:select",(function(){e(this).focus()})).selectWoo(t)}))}(jQuery)}();
1
+ !function(){"use strict";window.jQuery,jQuery(document).ready((function(e){e(document).on("click",".wooccm_delete_attachment",(function(t){var c=e(this).closest("tr"),o=e(this).data("attachment_id");c.hide(),e("#wooccm_order_attachment_update").prop("disabled",!1),e("#delete_attachments_ids").val(e("#delete_attachments_ids").val().replace(o,""))})),e(document).on("click","#wooccm_order_attachment_update",(function(t){e.ajax({url:wooccm_upload.ajax_url,type:"POST",cache:!1,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(t){e(".wooccm_upload_results").html(wooccm_upload.message.saving)},success:function(t){t.success?(e(".wooccm_upload_results").html(wooccm_upload.message.deleted),e("#wooccm_order_attachment_update").prop("disabled",!0)):e(".wooccm_upload_results").html(t.data)}})})),e(document).on("change","#wooccm_order_attachment_upload",(function(t){var c=!1,o=e(this).data("order_id");window.FormData&&(c=new FormData);for(var a,n=0,i=this.files.length;n<i;n++)a=this.files[n],c&&c.append("wooccm_order_attachment_upload[]",a);c&&(c.append("action","wooccm_order_attachment_upload"),c.append("nonce",wooccm_upload.nonce),c.append("order_id",o),e.ajax({url:wooccm_upload.ajax_url,type:"POST",cache:!1,data:c,processData:!1,contentType:!1,beforeSend:function(t){var c;e(".wooccm_upload_results").html(wooccm_upload.message.uploading),function(e){return e.is(".processing")||e.parents(".processing").length}(c=e(".wooccm_order_attachments_wrapper"))||c.addClass("processing").block({message:null,overlayCSS:{background:"#fff",opacity:.6}})},success:function(t){t.success?(e(".wooccm_order_attachments_wrapper").fadeOut(),e(".wooccm_order_attachments_wrapper").replaceWith(e(t.data).fadeIn()),e(".wooccm_upload_results").html(wooccm_upload.message.success)):e(".wooccm_upload_results").html(t.data),e(".wooccm_order_attachments_wrapper").removeClass("processing").unblock()}}))}))})),window.window.selectWoo,function(e){var t=function(e){return e.is(".processing")||e.parents(".processing").length};e(document).on("country_to_state_changing",(function(t,c,o){var a=o,n=e.parseJSON(wc_address_i18n_params.locale_fields);e.each(n,(function(e,t){var c=a.find(t),o=c.find("[data-required]").data("required")||c.find(".wooccm-required-field").length;!function(e,t){t?(e.find("label .optional").remove(),e.addClass("validate-required"),0===e.find("label .required").length&&e.find("label").append('<abbr class="required" title="'+wc_address_i18n_params.i18n_required_text+'">*</abbr>'),e.show(),e.find("input[type=hidden]").prop("type","text")):(e.find("label .required").remove(),e.removeClass("validate-required woocommerce-invalid woocommerce-invalid-required-field"),0===e.find("label .optional").length&&e.find("label").append('<span class="optional">('+wc_address_i18n_params.i18n_optional_text+")</span>"))}(c,o)}))}));var c={};if(e(".wooccm-type-file").each((function(t,o){var a=e(o),n=a.find("[type=file]"),i=a.find(".wooccm-file-button"),r=a.find(".wooccm-file-list"),s=a.find(".wooccm-file-field").data("file-limit"),l=a.find(".wooccm-file-field").data("file-types"),d=1024*parseFloat(a.find(".wooccm-file-field").data("file-max-size"));c[a.attr("id")]=[],i.on("click",(function(e){e.preventDefault(),n.trigger("click")})),r.on("click",".wooccm-file-list-delete",(function(t){var o=e(this).closest(".wooccm-file-file"),n=e(this).closest("[data-file_id]").data("file_id");c[a.attr("id")]=e.grep(c[a.attr("id")],(function(e,t){return t!=n})),o.remove(),e("#order_review").trigger("wooccm_upload")})),n.on("change",(function(t){var o=e(this)[0].files;o.length&&window.FileReader&&e.each(o,(function(t,o){if(r.find("span[data-file_id]").length+t>=s)return alert("Exeeds max files limit of "+s),!1;var n,i=new FileReader;i.onload=(n=o,function(t){setTimeout((function(){if(n.size>d)return alert(n.name+" exeeds max file size of "+d/1024+"kb"),!0;const i=function(e,t){if(null==t||!t.length)return!0;const c=function(e){return e.name.match(/\.([^\.]+)$/)[1]}(e);return t.filter((e=>!!e.includes(c)||!(!e.includes("|")||!e.split("|").includes(c))||void 0)).length>0}(n,l);if(!i)return alert(n.name+" is not valid file type"),!0;!function(t,c,o,a,n){var i,r=e(t);n.match("image.*")?i="image":n.match("application/ms.*")?(o=wooccm_upload.icons.spreadsheet,i="spreadsheet"):n.match("application/x.*")?(o=wooccm_upload.icons.archive,i="application"):n.match("audio.*")?(o=wooccm_upload.icons.audio,i="audio"):n.match("text.*")?(o=wooccm_upload.icons.text,i="text"):n.match("video.*")?(o=wooccm_upload.icons.video,i="video"):(o=wooccm_upload.icons.interactive,i="interactive");var s='<span data-file_id="'+c+'" title="'+a+'" class="wooccm-file-file">\n <span class="wooccm-file-list-container">\n <a title="'+a+'" class="wooccm-file-list-delete">×</a>\n <span class="wooccm-file-list-image-container">\n <img class="'+i+'" alt="'+a+'" src="'+o+'"/>\n </span>\n </span>\n </span>';r.append(s).fadeIn()}(r,c[a.attr("id")].push(o)-1,t.target.result,n.name,n.type),e("#order_review").trigger("wooccm_upload")}),200)}),i.readAsDataURL(o)}))}))})),e("#order_review").on("ajaxSuccess wooccm_upload",(function(t,c,o){e(t.target);var a=e("#place_order");e(".wooccm-type-file").length?a.addClass("wooccm-upload-process"):a.removeClass("wooccm-upload-process")})),e(document).on("click","#place_order.wooccm-upload-process",(function(o){o.preventDefault();var a,n=e("form.checkout"),i=e(this);e(".wooccm-type-file").length&&window.FormData&&Object.keys(c).length&&(t(n)||(i.html(wooccm_upload.message.uploading),t(a=n)||a.addClass("processing").block({message:null,overlayCSS:{background:"#fff",opacity:.6}})),e.each(c,(function(t,c){var o=e("#"+t).find(".wooccm-file-field"),a=new FormData;e.each(c,(function(e,t){return e>file_limit?(console.log("Exeeds max files limit of "+file_limit),!1):t.size>file_max_size?(console.log("Exeeds max file size of "+file_limit),!0):(console.log("We're ready to upload "+t.name),void a.append("wooccm_checkout_attachment_upload[]",t))})),a.append("action","wooccm_checkout_attachment_upload"),a.append("nonce",wooccm_upload.nonce),e.ajax({async:!1,url:wooccm_upload.ajax_url,type:"POST",cache:!1,data:a,processData:!1,contentType:!1,beforeSend:function(e){},success:function(t){t.success?o.val(t.data):e("body").trigger("update_checkout")},complete:function(e){}})})),function(e){e.removeClass("processing").unblock()}(n),i.removeClass("wooccm-upload-process").trigger("click"))})),e(document).on("change",".wooccm-add-price",(function(t){e("body").trigger("update_checkout")})),e(".wooccm-field").each((function(t,c){e(c).find("input,textarea,select").on("change keyup wooccm_change",(function(t){var c=e(t.target).attr("name").replace("[]",""),o=e(t.target).prop("type"),a=e(t.target).val();"checkbox"==o&&(a=-1!==e(t.target).attr("name").indexOf("[]")?e(t.target).closest(".wooccm-field").find("input:checked").map((function(e,t){return t.value})).toArray():e(t.target).is(":checked"));var n=e("*[data-conditional-parent="+c+"]"),i=n.closest(".wooccm-field");n.prop("disabled",!0),i.hide(),n.find("input,textarea,select").prop("disabled",!0),n.each((function(t,c){var o=e(c),n=o&&o.data("conditional-parent-value");if(a==n||e.isArray(a)&&a.indexOf(n)>-1){var i=o.closest(".wooccm-field");o.prop("disabled",!1),o.trigger("change"),i.attr("style","display: block !important"),o.find("input,textarea,select").prop("disabled",!1),o.find("input,textarea,select").trigger("change")}}))}))})),e(".wooccm-conditional-child").each((function(t,c){var o=e(c),a=e("#"+o.find("[data-conditional-parent]").data("conditional-parent")+"_field");a.find("select:first").trigger("wooccm_change"),a.find("textarea:first").trigger("wooccm_change"),a.find("input[type=button]:first").trigger("wooccm_change"),a.find("input[type=radio]:checked:first").trigger("wooccm_change"),a.find("input[type=checkbox]:checked:first").trigger("wooccm_change"),a.find("input[type=color]:first").trigger("wooccm_change"),a.find("input[type=date]:first").trigger("wooccm_change"),a.find("input[type=datetime-local]:first").trigger("wooccm_change"),a.find("input[type=email]:first").trigger("wooccm_change"),a.find("input[type=file]:first").trigger("wooccm_change"),a.find("input[type=hidden]:first").trigger("wooccm_change"),a.find("input[type=image]:first").trigger("wooccm_change"),a.find("input[type=month]:first").trigger("wooccm_change"),a.find("input[type=number]:first").trigger("wooccm_change"),a.find("input[type=password]:first").trigger("wooccm_change"),a.find("input[type=range]:first").trigger("wooccm_change"),a.find("input[type=reset]:first").trigger("wooccm_change"),a.find("input[type=search]:first").trigger("wooccm_change"),a.find("input[type=submit]:first").trigger("wooccm_change"),a.find("input[type=tel]:first").trigger("wooccm_change"),a.find("input[type=text]:first").trigger("wooccm_change"),a.find("input[type=time]:first").trigger("wooccm_change"),a.find("input[type=url]:first").trigger("wooccm_change"),a.find("input[type=week]:first").trigger("wooccm_change")})),e(".wooccm-enhanced-datepicker").each((function(t,c){var o=e(this),a=o.data("disable")||!1;e.isFunction(e.fn.datepicker)&&o.datepicker({dateFormat:o.data("formatdate")||"mm/dd/yy",minDate:o.data("mindate"),maxDate:o.data("maxdate"),beforeShowDay:function(t){var c=null!=t.getDay()&&t.getDay().toString();return a?[-1===e.inArray(c,a)]:[!0]}})})),e(".wooccm-enhanced-timepicker").each((function(t,c){var o=e(this);e.isFunction(e.fn.timepicker)&&(console.log(o.data("format-ampm")),o.timepicker({showPeriodLabels:!!o.data("format-ampm"),showPeriod:!!o.data("format-ampm"),showLeadingZero:!0,hours:o.data("hours")||void 0,minutes:o.data("minutes")||void 0}))})),e(".wooccm-colorpicker-farbtastic").each((function(t,c){var o=e(c),a=o.find("input[type=text]"),n=o.find(".wooccmcolorpicker_container");a.hide(),e.isFunction(e.fn.farbtastic)&&(n.farbtastic("#"+a.attr("id")),n.on("click",(function(e){a.fadeIn()})))})),e(".wooccm-colorpicker-iris").each((function(t,c){var o=e(c),a=o.find("input[type=text]");a.css("background",a.val()),a.on("click",(function(e){o.toggleClass("active")})),a.iris({class:a.attr("id"),palettes:!0,color:"",hide:!1,change:function(e,t){a.css("background",t.color.toString()).fadeIn()}})})),e(document).on("click",(function(t){0===e(t.target).closest(".iris-picker").length&&e(".wooccm-colorpicker-iris").removeClass("active")})),"undefined"==typeof wc_country_select_params)return!1;e().selectWoo&&e("select.wooccm-enhanced-select").each((function(){var t=e.extend({width:"100%",placeholder:e(this).data("placeholder")||"",allowClear:e(this).data("allowclear")||!1,selectOnClose:e(this).data("selectonclose")||!1,closeOnSelect:e(this).data("closeonselect")||!1,minimumResultsForSearch:e(this).data("search")||-1},{language:{errorLoading:function(){return wc_country_select_params.i18n_searching},inputTooLong:function(e){var t=e.input.length-e.maximum;return 1===t?wc_country_select_params.i18n_input_too_long_1:wc_country_select_params.i18n_input_too_long_n.replace("%qty%",t)},inputTooShort:function(e){var t=e.minimum-e.input.length;return 1===t?wc_country_select_params.i18n_input_too_short_1:wc_country_select_params.i18n_input_too_short_n.replace("%qty%",t)},loadingMore:function(){return wc_country_select_params.i18n_load_more},maximumSelected:function(e){return 1===e.maximum?wc_country_select_params.i18n_selection_too_long_1:wc_country_select_params.i18n_selection_too_long_n.replace("%qty%",e.maximum)},noResults:function(){return wc_country_select_params.i18n_no_matches},searching:function(){return wc_country_select_params.i18n_searching}}});e(this).on("select2:select",(function(){e(this).focus()})).selectWoo(t)}))}(jQuery)}();
includes/class-wooccm.php CHANGED
@@ -58,13 +58,6 @@ final class WOOCCM {
58
  array(
59
  'ajax_url' => admin_url( 'admin-ajax.php' ),
60
  'nonce' => wp_create_nonce( 'wooccm_upload' ),
61
- 'limit' => array(
62
- 'max_file_size' => wp_max_upload_size(),
63
- 'max_files' => 4,
64
- // 'mime_types' => $this->get_mime_types(),
65
- ),
66
- // 'ajax_url' => admin_url( 'admin-ajax.php?metabox=' . is_admin() ),
67
- // 'nonce' => wp_create_nonce( 'wooccm_upload' ),
68
  'icons' => array(
69
  'interactive' => site_url( 'wp-includes/images/media/interactive.png' ),
70
  'spreadsheet' => site_url( 'wp-includes/images/media/spreadsheet.png' ),
58
  array(
59
  'ajax_url' => admin_url( 'admin-ajax.php' ),
60
  'nonce' => wp_create_nonce( 'wooccm_upload' ),
 
 
 
 
 
 
 
61
  'icons' => array(
62
  'interactive' => site_url( 'wp-includes/images/media/interactive.png' ),
63
  'spreadsheet' => site_url( 'wp-includes/images/media/spreadsheet.png' ),
includes/model/class-wooccm-field.php CHANGED
@@ -215,8 +215,9 @@ class WOOCCM_Field extends WOOCCM_Model {
215
  'select2_search' => false,
216
  // Upload
217
  // -------------------------------------------------------------------
218
- 'file_limit' => 1,
219
  'file_types' => array(),
 
220
  // Color
221
  // -------------------------------------------------------------------
222
  'pickertype' => '',
215
  'select2_search' => false,
216
  // Upload
217
  // -------------------------------------------------------------------
218
+ 'file_limit' => 4,
219
  'file_types' => array(),
220
+ 'file_max_size' => wp_max_upload_size() / 1024,
221
  // Color
222
  // -------------------------------------------------------------------
223
  'pickertype' => '',
includes/view/backend/pages/modals/parts/panel-general.php CHANGED
@@ -1,197 +1,191 @@
1
  <div class="panel woocommerce_options_panel <# if (data.panel != 'general') { #>hidden<# } #>">
2
- <div class="options_group">
3
- <p class="form-field">
4
- <label><?php esc_html_e( 'Name', 'woocommerce-checkout-manager' ); ?></label>
5
- <# if ( _.contains(<?php echo json_encode( $defaults ); ?>, data.name)) { #>
6
- <span class="woocommerce-help-tip" data-tip="<?php esc_html_e( 'You can\'t change the slug of default fields.', 'woocommerce-checkout-manager' ); ?>"></span>
7
- <input class="short" type="text" name="name" placeholder="<?php esc_html_e( 'myfield', 'woocommerce-checkout-manager' ); ?>" value="{{data.name}}" readonly="readonly">
8
- <# } else { #>
9
- <span class="woocommerce-help-tip" data-tip="<?php esc_html_e( 'Currently is not possible to change the name of the fields.', 'woocommerce-checkout-manager' ); ?>
10
- <?php
11
- // esc_html_e('To edit Abbreviations open General > Switches > Editing Of Abbreviation Fields.', 'woocommerce-checkout-manager');
12
- ?>
13
- "></span>
14
- <input class="short" type="text" name="name" placeholder="<?php esc_html_e( 'myfield', 'woocommerce-checkout-manager' ); ?>" value="{{data.name}}" readonly="readonly" <?php /* if (empty($options['checkness']['abbreviation'])) { ?>readonly="readonly"<?php } */ ?>>
15
- <# } #>
16
- </p>
17
- </div>
18
- <div class="options_group">
19
- <p class="form-field">
20
- <label><?php esc_html_e( 'Type', 'woocommerce-checkout-manager' ); ?></label>
21
- <# if ( _.contains(<?php echo json_encode( $defaults ); ?>, data.name)) { #>
22
- <input class="short" type="text" name="type" value="{{data.type}}" readonly="readonly">
23
- <# } else { #>
24
- <select class="media-modal-render-tabs wooccm-enhanced-select" name="type">
25
- <?php if ( $types ) : ?>
26
- <?php foreach ( $types as $type => $name ) : ?>
27
- <option <# if ( data.type=='<?php echo esc_attr( $type ); ?>' ) { #>selected="selected"<# } #>
28
- <# if ( _.contains(<?php echo json_encode( $disabled ); ?>, '<?php echo esc_attr( $type ); ?>' )) { #>disabled="disabled"<# } #> value="<?php echo esc_attr( $type ); ?>"><?php echo esc_html( $name ); ?></option>
29
- <?php endforeach; ?>
30
- <?php endif; ?>
31
- </select>
32
- <# } #>
33
  <span span class="woocommerce-help-tip" data-tip="<?php esc_html_e( 'Type of the checkout field.', 'woocommerce-checkout-manager' ); ?>"></span>
34
- </p>
35
- <# if (data.type=='colorpicker' ) { #>
36
- <p class="form-field">
37
- <label><?php esc_html_e( 'Picker Type', 'woocommerce-checkout-manager' ); ?></label>
38
- <select class="select short" name="pickertype">
39
- <option <# if ( data.pickertype=='farbtastic' ) { #>selected="selected"<# } #> value="farbtastic"><?php esc_html_e( 'Farbtastic', 'woocommerce-checkout-manager' ); ?></option>
40
- <option <# if ( data.pickertype=='iris' ) { #>selected="selected"<# } #> value="iris"><?php esc_html_e( 'Iris', 'woocommerce-checkout-manager' ); ?></option>
41
- </select>
42
- </p>
43
- <# } #>
44
- </div>
45
- <div class="options_group">
46
- <p class="form-field">
47
- <label><?php esc_html_e( 'Label', 'woocommerce-checkout-manager' ); ?></label>
48
- <input class="short " type="text" name="label" placeholder="<?php esc_html_e( 'My Field Name', 'woocommerce-checkout-manager' ); ?>" value="{{data.label}}">
49
- <span span class="woocommerce-help-tip" data-tip="<?php esc_html_e( 'Label text of the checkout field.', 'woocommerce-checkout-manager' ); ?>"></span>
50
- </p>
51
- <# if ( !_.contains(<?php echo json_encode( $template ); ?>, data.type )) { #>
52
- <p class="form-field">
53
- <label><?php esc_html_e( 'Placeholder', 'woocommerce-checkout-manager' ); ?></label>
54
- <input class="short" type="text" name="placeholder" placeholder="<?php esc_html_e( 'This is a placeholder', 'woocommerce-checkout-manager' ); ?>" value="{{data.placeholder}}">
55
- <span span class="woocommerce-help-tip" data-tip="<?php esc_html_e( 'Placeholder text of the checkout field.', 'woocommerce-checkout-manager' ); ?>"></span>
56
- </p>
57
- <# } #>
58
- <# if ( data.type=='file' ) { #>
59
- <p class="form-field">
60
- <label><?php esc_html_e( 'Button', 'woocommerce-checkout-manager' ); ?></label>
61
- <input class="short" type="text" name="placeholder" placeholder="<?php esc_html_e( 'Upload your files', 'woocommerce-checkout-manager' ); ?>" value="{{data.placeholder}}">
62
- <span span class="woocommerce-help-tip" data-tip="<?php esc_html_e( 'Text for the button name.', 'woocommerce-checkout-manager' ); ?>"></span>
63
- </p>
64
- <# } #>
65
- </div>
66
- <# if ( !_.contains(<?php echo json_encode( $template ); ?>, data.type )) { #>
67
  <div class="options_group">
68
- <p class="form-field">
69
- <label><?php esc_html_e( 'Description', 'woocommerce-checkout-manager' ); ?></label>
70
- <textarea class="short" type="text" name="description" placeholder="<?php esc_html_e( 'Description of the checkout field', 'woocommerce-checkout-manager' ); ?>">{{data.description}}</textarea>
71
- <span span class="woocommerce-help-tip" data-tip="<?php esc_html_e( 'Placeholder text of the checkout field.', 'woocommerce-checkout-manager' ); ?>"></span>
72
- </p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
73
  </div>
74
- <# } #>
75
- <# if ( data.type=='message' ) { #>
76
  <div class="options_group">
77
- <p class="form-field">
78
- <label><?php esc_html_e( 'Type', 'woocommerce-checkout-manager' ); ?></label>
79
- <select class="wooccm-enhanced-select" name="message_type">
80
- <option <# if ( 'info'==data.message_type ) { #>selected="selected"<# } #> value="info"><?php esc_html_e( 'Info', 'woocommerce-checkout-manager' ); ?></option>
81
- <option <# if ( 'message'==data.message_type ) { #>selected="selected"<# } #> value="message"><?php esc_html_e( 'Success', 'woocommerce-checkout-manager' ); ?></option>
82
- <option <# if ( 'error'==data.message_type ) { #>selected="selected"<# } #> value="error"><?php esc_html_e( 'Error', 'woocommerce-checkout-manager' ); ?></option>
83
- </select>
84
- <span span class="woocommerce-help-tip" data-tip="<?php esc_html_e( 'Message alert type.', 'woocommerce-checkout-manager' ); ?>"></span>
85
- </p>
86
- <p class="form-field">
87
- <label><?php esc_html_e( 'Message', 'woocommerce-checkout-manager' ); ?></label>
88
- <textarea class="short" name="description" placeholder="<?php esc_html_e( 'Message content', 'woocommerce-checkout-manager' ); ?>">{{data.description}}</textarea>
89
- <span span class="woocommerce-help-tip" data-tip="<?php esc_html_e( 'Message content.', 'woocommerce-checkout-manager' ); ?>"></span>
90
- </p>
91
  </div>
92
- <# } #>
93
-
94
- <# if ( data.type=='button' ) { #>
95
- <div class="options_group">
96
- <p class="form-field">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
97
  <label><?php esc_html_e( 'Type', 'woocommerce-checkout-manager' ); ?></label>
98
  <select class="wooccm-enhanced-select" name="button_type">
99
- <option <# if ( ''==data.button_type ) { #>selected="selected"<# } #> value=""><?php esc_html_e( 'Default', 'woocommerce-checkout-manager' ); ?></option>
100
- <option <# if ( 'alt'==data.button_type ) { #>selected="selected"<# } #> value="alt"><?php esc_html_e( 'Alt', 'woocommerce-checkout-manager' ); ?></option>
101
  </select>
102
  <span span class="woocommerce-help-tip" data-tip="<?php esc_html_e( 'Message alert type.', 'woocommerce-checkout-manager' ); ?>"></span>
103
- </p>
104
- <p class="form-field">
105
  <label><?php esc_html_e( 'Link', 'woocommerce-checkout-manager' ); ?></label>
106
  <input class="short" type="text" name="button_link" placeholder="<?php esc_html_e( 'URL', 'woocommerce-checkout-manager' ); ?>" value="{{data.button_link}}" />
107
  <span span class="woocommerce-help-tip" data-tip="<?php esc_html_e( 'Button URL.', 'woocommerce-checkout-manager' ); ?>"></span>
108
- </p>
109
- </div>
110
- <# } #>
111
-
112
- <# if ( !_.contains(<?php echo json_encode( array_merge( $template, $option ) ); ?>, data.type)) { #>
113
- <div class="options_group">
114
- <p class="form-field">
115
- <label><?php esc_html_e( 'Default', 'woocommerce-checkout-manager' ); ?></label>
116
- <# if (data.type=='checkbox' ) { #>
117
- <select class="wooccm-enhanced-select" name="default">
118
- <option <# if ( 1==data.default ) { #>selected="selected"<# } #> value="1"><?php esc_html_e( 'Yes' ); ?></option>
119
- <option <# if ( 0==data.default ) { #>selected="selected"<# } #> value="0"><?php esc_html_e( 'No' ); ?></option>
120
- </select>
121
- <# } else if (data.type=='number' ) { #>
122
- <input class="short" type="number" name="default" placeholder="<?php esc_html_e( 'Enter a default value (optional)', 'woocommerce-checkout-manager' ); ?>" value="{{data.default}}">
123
- <# } else { #>
124
- <input class="short" type="text" name="default" placeholder="<?php esc_html_e( 'Enter a default value (optional)', 'woocommerce-checkout-manager' ); ?>" value="{{data.default}}">
125
- <# } #>
126
- <span span class="woocommerce-help-tip" data-tip="<?php esc_html_e( 'Default value of the checkout field.', 'woocommerce-checkout-manager' ); ?>"></span>
127
- </p>
128
- </div>
129
- <# } #>
130
-
131
- <# if ( data.type=='number' ) { #>
132
- <p class="form-field dimensions_field">
133
- <label><?php esc_html_e( 'Number', 'woocommerce-checkout-manager' ); ?></label>
134
- <span class="wrap">
135
- <input style="width:48.1%" type="number" pattern="[0-9]+([\.,][0-9]+)?" step="0.01" placeholder="<?php esc_attr_e( 'minimun', 'woocommerce-checkout-manager' ); ?>" class="short" name="min" value="{{data.min}}">
136
- <input style="width:48.1%;margin: 0;" pattern="[0-9]+([\.,][0-9]+)?" step="0.01" type="number" placeholder="<?php esc_attr_e( 'maximun', 'woocommerce-checkout-manager' ); ?>" class="short" name="max" value="{{data.max}}">
137
- </span>
138
- </p>
139
  <# } #>
140
-
141
- <# if ( data.type=='text' || data.type=='textarea' ) { #>
142
- <p class="form-field dimensions_field">
143
- <label><?php esc_html_e( 'Maxlength', 'woocommerce-checkout-manager' ); ?></label>
144
- <input class="short" type="text" name="maxlength" placeholder="<?php esc_html_e( 'Enter a maxlength value (optional)', 'woocommerce-checkout-manager' ); ?>" value="{{data.maxlength}}">
145
- </p>
146
- <# } #>
147
-
148
- <# if (data.type=='file' ) { #>
149
- <!--<div class="options_group">
150
- <p class="form-field">
151
- <label><?php esc_html_e( 'Upload files', 'woocommerce-checkout-manager' ); ?></label>
152
- <input class="short" type="number" placeholder="1" min="0" max="12" name="file_limit" value="{{data.file_limit}}">
153
- </p>
154
- <p class="form-field">
155
- <select class="wooccm-enhanced-select" name="file_types" multiple="multiple" data-placeholder="<?php esc_attr_e( 'Choose the allowed types&hellip;', 'woocommerce-checkout-manager' ); ?>" data-allow_clear="true" >
156
- <?php foreach ( wp_get_mime_types() as $type => $name ) : ?>
157
- <option <# if ( _.contains(data.file_types, '<?php echo esc_attr( $type ); ?>') ) { #>selected="selected"<# } #> value="<?php echo esc_attr( $type ); ?>"><?php echo esc_html( $type ); ?></option>
158
- <?php endforeach; ?>
159
- </select>
160
- </p>
161
- </div>-->
162
- <# } #>
163
-
164
- <# if (data.type=='country' ) { #>
165
- <div class="options_group">
166
- <p class="form-field">
167
- <label><?php esc_html_e( 'Default', 'woocommerce-checkout-manager' ); ?></label>
168
- <select class="wooccm-enhanced-select" name="default" data-placeholder="<?php esc_attr_e( 'Preserve default country&hellip;', 'woocommerce-checkout-manager' ); ?>" data-allow_clear="true">
169
- <option <# if (data.default=='' ) { #>selected="selected"<# } #> value=""></option>
170
- <?php foreach ( WC()->countries->get_countries() as $id => $name ) : ?>
171
- <option <# if (data.default=='<?php echo esc_attr( $id ); ?>' ) { #>selected="selected"<# } #> value="<?php echo esc_attr( $id ); ?>"><?php echo esc_html( $name ); ?></option>
172
- <?php endforeach; ?>
173
- </select>
174
- </p>
175
- </div>
176
- <# } #>
177
-
178
- <# if (data.type=='state' ) { #>
179
- <div class="options_group">
180
- <p class="form-field">
181
- <label><?php esc_html_e( 'Country', 'woocommerce-checkout-manager' ); ?></label>
182
- <select class="wooccm-enhanced-select" name="country" data-placeholder="<?php esc_attr_e( 'Select country&hellip;', 'woocommerce-checkout-manager' ); ?>" data-allow_clear="true">
183
- <?php foreach ( WC()->countries->get_countries() as $id => $name ) : ?>
184
- <option <# if (data.country=='<?php echo esc_attr( $id ); ?>' ) { #>selected="selected"<# } #> value="<?php echo esc_attr( $id ); ?>"><?php echo esc_html( $name ); ?></option>
185
- <?php endforeach; ?>
186
- </select>
187
- </p>
188
- </div>
189
- <# } #>
190
-
191
- <div class="options_group">
192
- <p class="form-field">
193
- <label><?php esc_html_e( 'Extra class', 'woocommerce-checkout-manager' ); ?></label>
194
- <input class="short" type="text" name="extra_class" value="{{data.extra_class}}">
195
- </p>
196
- </div>
197
  </div>
1
  <div class="panel woocommerce_options_panel <# if (data.panel != 'general') { #>hidden<# } #>">
2
+ <div class="options_group">
3
+ <p class="form-field">
4
+ <label><?php esc_html_e( 'Name', 'woocommerce-checkout-manager' ); ?></label>
5
+ <# if ( _.contains(<?php echo json_encode( $defaults ); ?>, data.name)) { #>
6
+ <span class="woocommerce-help-tip" data-tip="<?php esc_html_e( 'You can\'t change the slug of default fields.', 'woocommerce-checkout-manager' ); ?>"></span>
7
+ <input class="short" type="text" name="name" placeholder="<?php esc_html_e( 'myfield', 'woocommerce-checkout-manager' ); ?>" value="{{data.name}}" readonly="readonly">
8
+ <# } else { #>
9
+ <span class="woocommerce-help-tip" data-tip="<?php esc_html_e( 'Currently is not possible to change the name of the fields.', 'woocommerce-checkout-manager' ); ?>"></span>
10
+ <input class="short" type="text" name="name" placeholder="<?php esc_html_e( 'myfield', 'woocommerce-checkout-manager' ); ?>" value="{{data.name}}" readonly="readonly" <?php /* if (empty($options['checkness']['abbreviation'])) { ?>readonly="readonly"<?php } */ ?>>
11
+ <# } #>
12
+ </p>
13
+ </div>
14
+ <div class="options_group">
15
+ <p class="form-field">
16
+ <label><?php esc_html_e( 'Type', 'woocommerce-checkout-manager' ); ?></label>
17
+ <# if ( _.contains(<?php echo json_encode( $defaults ); ?>, data.name)) { #>
18
+ <input class="short" type="text" name="type" value="{{data.type}}" readonly="readonly">
19
+ <# } else { #>
20
+ <select class="media-modal-render-tabs wooccm-enhanced-select" name="type">
21
+ <?php if ( $types ) : ?>
22
+ <?php foreach ( $types as $type => $name ) : ?>
23
+ <option <# if ( data.type=='<?php echo esc_attr( $type ); ?>' ) { #>selected="selected"<# } #>
24
+ <# if ( _.contains(<?php echo json_encode( $disabled ); ?>, '<?php echo esc_attr( $type ); ?>' )) { #>disabled="disabled"<# } #> value="<?php echo esc_attr( $type ); ?>"><?php echo esc_html( $name ); ?></option>
25
+ <?php endforeach; ?>
26
+ <?php endif; ?>
27
+ </select>
28
+ <# } #>
 
 
 
 
29
  <span span class="woocommerce-help-tip" data-tip="<?php esc_html_e( 'Type of the checkout field.', 'woocommerce-checkout-manager' ); ?>"></span>
30
+ </p>
31
+ <# if (data.type=='colorpicker' ) { #>
32
+ <p class="form-field">
33
+ <label><?php esc_html_e( 'Picker Type', 'woocommerce-checkout-manager' ); ?></label>
34
+ <select class="select short" name="pickertype">
35
+ <option <# if ( data.pickertype=='farbtastic' ) { #>selected="selected"<# } #> value="farbtastic"><?php esc_html_e( 'Farbtastic', 'woocommerce-checkout-manager' ); ?></option>
36
+ <option <# if ( data.pickertype=='iris' ) { #>selected="selected"<# } #> value="iris"><?php esc_html_e( 'Iris', 'woocommerce-checkout-manager' ); ?></option>
37
+ </select>
38
+ </p>
39
+ <# } #>
40
+ </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
  <div class="options_group">
42
+ <p class="form-field">
43
+ <label><?php esc_html_e( 'Label', 'woocommerce-checkout-manager' ); ?></label>
44
+ <input class="short " type="text" name="label" placeholder="<?php esc_html_e( 'My Field Name', 'woocommerce-checkout-manager' ); ?>" value="{{data.label}}">
45
+ <span span class="woocommerce-help-tip" data-tip="<?php esc_html_e( 'Label text of the checkout field.', 'woocommerce-checkout-manager' ); ?>"></span>
46
+ </p>
47
+ <# if ( !_.contains(<?php echo json_encode( $template ); ?>, data.type )) { #>
48
+ <p class="form-field">
49
+ <label><?php esc_html_e( 'Placeholder', 'woocommerce-checkout-manager' ); ?></label>
50
+ <input class="short" type="text" name="placeholder" placeholder="<?php esc_html_e( 'This is a placeholder', 'woocommerce-checkout-manager' ); ?>" value="{{data.placeholder}}">
51
+ <span span class="woocommerce-help-tip" data-tip="<?php esc_html_e( 'Placeholder text of the checkout field.', 'woocommerce-checkout-manager' ); ?>"></span>
52
+ </p>
53
+ <# } #>
54
+ <# if ( data.type=='file' ) { #>
55
+ <p class="form-field">
56
+ <label><?php esc_html_e( 'Button', 'woocommerce-checkout-manager' ); ?></label>
57
+ <input class="short" type="text" name="placeholder" placeholder="<?php esc_html_e( 'Upload your files', 'woocommerce-checkout-manager' ); ?>" value="{{data.placeholder}}">
58
+ <span span class="woocommerce-help-tip" data-tip="<?php esc_html_e( 'Text for the button name.', 'woocommerce-checkout-manager' ); ?>"></span>
59
+ </p>
60
+ <p class="form-field wooccm-premium">
61
+ <label><?php esc_html_e( 'File Limit', 'woocommerce-checkout-manager' ); ?></label>
62
+ <input class="short" type="number" min="1" name="file_limit" placeholder="1" value="{{data.file_limit}}">
63
+ <span span class="woocommerce-help-tip" data-tip="<?php esc_html_e( 'Max number of files to upload.', 'woocommerce-checkout-manager' ); ?>"></span>
64
+ <span class="description premium">(<?php esc_html_e( 'This is a premium feature', 'woocommerce-checkout-manager' ); ?>)</span>
65
+ </p>
66
+ <p class="form-field wooccm-premium">
67
+ <label><?php esc_html_e( 'File Max Size (Kb)', 'woocommerce-checkout-manager' ); ?></label>
68
+ <input class="short" type="number" min="1" max="<?php echo esc_attr( wp_max_upload_size() / 1024 ); ?>" name="file_max_size" value="{{data.file_max_size}}">
69
+ <span span class="woocommerce-help-tip" data-tip="<?php printf( esc_html__( 'Max of each file to upload. It can\'t exceed the current WordPress max file size: %s', 'woocommerce-checkout-manager' ), wp_max_upload_size() / 1024 ); ?>"></span>
70
+ <span class="description premium">(<?php esc_html_e( 'This is a premium feature', 'woocommerce-checkout-manager' ); ?>)</span>
71
+ </p>
72
+ <p class="form-field wooccm-premium">
73
+ <label><?php esc_html_e( 'File Types', 'woocommerce-checkout-manager' ); ?></label>
74
+ <select class="wooccm-enhanced-select" name="file_types[]" multiple="multiple" data-placeholder="<?php esc_attr_e( 'Choose the allowed types&hellip;', 'woocommerce-checkout-manager' ); ?>" data-allow_clear="true" >
75
+ <?php foreach ( get_allowed_mime_types() as $type => $name ) : ?>
76
+ <option <# if ( _.contains(data.file_types, '<?php echo esc_attr( $type ); ?>') ) { #>selected="selected"<# } #> value="<?php echo esc_attr( $type ); ?>"><?php echo esc_html( $type ); ?></option>
77
+ <?php endforeach; ?>
78
+ </select>
79
+ <span class="description premium">(<?php esc_html_e( 'This is a premium feature', 'woocommerce-checkout-manager' ); ?>)</span>
80
+ </p>
81
+ <# } #>
82
  </div>
83
+ <# if ( !_.contains(<?php echo json_encode( $template ); ?>, data.type )) { #>
 
84
  <div class="options_group">
85
+ <p class="form-field">
86
+ <label><?php esc_html_e( 'Description', 'woocommerce-checkout-manager' ); ?></label>
87
+ <textarea class="short" type="text" name="description" placeholder="<?php esc_html_e( 'Description of the checkout field', 'woocommerce-checkout-manager' ); ?>">{{data.description}}</textarea>
88
+ <span span class="woocommerce-help-tip" data-tip="<?php esc_html_e( 'Placeholder text of the checkout field.', 'woocommerce-checkout-manager' ); ?>"></span>
89
+ </p>
 
 
 
 
 
 
 
 
 
90
  </div>
91
+ <# } #>
92
+ <# if ( data.type=='message' ) { #>
93
+ <div class="options_group">
94
+ <p class="form-field">
95
+ <label><?php esc_html_e( 'Type', 'woocommerce-checkout-manager' ); ?></label>
96
+ <select class="wooccm-enhanced-select" name="message_type">
97
+ <option <# if ( 'info'==data.message_type ) { #>selected="selected"<# } #> value="info"><?php esc_html_e( 'Info', 'woocommerce-checkout-manager' ); ?></option>
98
+ <option <# if ( 'message'==data.message_type ) { #>selected="selected"<# } #> value="message"><?php esc_html_e( 'Success', 'woocommerce-checkout-manager' ); ?></option>
99
+ <option <# if ( 'error'==data.message_type ) { #>selected="selected"<# } #> value="error"><?php esc_html_e( 'Error', 'woocommerce-checkout-manager' ); ?></option>
100
+ </select>
101
+ <span span class="woocommerce-help-tip" data-tip="<?php esc_html_e( 'Message alert type.', 'woocommerce-checkout-manager' ); ?>"></span>
102
+ </p>
103
+ <p class="form-field">
104
+ <label><?php esc_html_e( 'Message', 'woocommerce-checkout-manager' ); ?></label>
105
+ <textarea class="short" name="description" placeholder="<?php esc_html_e( 'Message content', 'woocommerce-checkout-manager' ); ?>">{{data.description}}</textarea>
106
+ <span span class="woocommerce-help-tip" data-tip="<?php esc_html_e( 'Message content.', 'woocommerce-checkout-manager' ); ?>"></span>
107
+ </p>
108
+ </div>
109
+ <# } #>
110
+ <# if ( data.type=='button' ) { #>
111
+ <div class="options_group">
112
+ <p class="form-field">
113
  <label><?php esc_html_e( 'Type', 'woocommerce-checkout-manager' ); ?></label>
114
  <select class="wooccm-enhanced-select" name="button_type">
115
+ <option <# if ( ''==data.button_type ) { #>selected="selected"<# } #> value=""><?php esc_html_e( 'Default', 'woocommerce-checkout-manager' ); ?></option>
116
+ <option <# if ( 'alt'==data.button_type ) { #>selected="selected"<# } #> value="alt"><?php esc_html_e( 'Alt', 'woocommerce-checkout-manager' ); ?></option>
117
  </select>
118
  <span span class="woocommerce-help-tip" data-tip="<?php esc_html_e( 'Message alert type.', 'woocommerce-checkout-manager' ); ?>"></span>
119
+ </p>
120
+ <p class="form-field">
121
  <label><?php esc_html_e( 'Link', 'woocommerce-checkout-manager' ); ?></label>
122
  <input class="short" type="text" name="button_link" placeholder="<?php esc_html_e( 'URL', 'woocommerce-checkout-manager' ); ?>" value="{{data.button_link}}" />
123
  <span span class="woocommerce-help-tip" data-tip="<?php esc_html_e( 'Button URL.', 'woocommerce-checkout-manager' ); ?>"></span>
124
+ </p>
125
+ </div>
126
+ <# } #>
127
+ <# if ( !_.contains(<?php echo json_encode( array_merge( $template, $option ) ); ?>, data.type)) { #>
128
+ <div class="options_group">
129
+ <p class="form-field">
130
+ <label><?php esc_html_e( 'Default', 'woocommerce-checkout-manager' ); ?></label>
131
+ <# if (data.type=='checkbox' ) { #>
132
+ <select class="wooccm-enhanced-select" name="default">
133
+ <option <# if ( 1==data.default ) { #>selected="selected"<# } #> value="1"><?php esc_html_e( 'Yes' ); ?></option>
134
+ <option <# if ( 0==data.default ) { #>selected="selected"<# } #> value="0"><?php esc_html_e( 'No' ); ?></option>
135
+ </select>
136
+ <# } else if (data.type=='number' ) { #>
137
+ <input class="short" type="number" name="default" placeholder="<?php esc_html_e( 'Enter a default value (optional)', 'woocommerce-checkout-manager' ); ?>" value="{{data.default}}">
138
+ <# } else { #>
139
+ <input class="short" type="text" name="default" placeholder="<?php esc_html_e( 'Enter a default value (optional)', 'woocommerce-checkout-manager' ); ?>" value="{{data.default}}">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
140
  <# } #>
141
+ <span span class="woocommerce-help-tip" data-tip="<?php esc_html_e( 'Default value of the checkout field.', 'woocommerce-checkout-manager' ); ?>"></span>
142
+ </p>
143
+ </div>
144
+ <# } #>
145
+ <# if ( data.type=='number' ) { #>
146
+ <p class="form-field dimensions_field">
147
+ <label><?php esc_html_e( 'Number', 'woocommerce-checkout-manager' ); ?></label>
148
+ <span class="wrap">
149
+ <input style="width:48.1%" type="number" pattern="[0-9]+([\.,][0-9]+)?" step="0.01" placeholder="<?php esc_attr_e( 'minimun', 'woocommerce-checkout-manager' ); ?>" class="short" name="min" value="{{data.min}}">
150
+ <input style="width:48.1%;margin: 0;" pattern="[0-9]+([\.,][0-9]+)?" step="0.01" type="number" placeholder="<?php esc_attr_e( 'maximun', 'woocommerce-checkout-manager' ); ?>" class="short" name="max" value="{{data.max}}">
151
+ </span>
152
+ </p>
153
+ <# } #>
154
+ <# if ( data.type=='text' || data.type=='textarea' ) { #>
155
+ <p class="form-field dimensions_field">
156
+ <label><?php esc_html_e( 'Maxlength', 'woocommerce-checkout-manager' ); ?></label>
157
+ <input class="short" type="text" name="maxlength" placeholder="<?php esc_html_e( 'Enter a maxlength value (optional)', 'woocommerce-checkout-manager' ); ?>" value="{{data.maxlength}}">
158
+ </p>
159
+ <# } #>
160
+ <# if (data.type=='country' ) { #>
161
+ <div class="options_group">
162
+ <p class="form-field">
163
+ <label><?php esc_html_e( 'Default', 'woocommerce-checkout-manager' ); ?></label>
164
+ <select class="wooccm-enhanced-select" name="default" data-placeholder="<?php esc_attr_e( 'Preserve default country&hellip;', 'woocommerce-checkout-manager' ); ?>" data-allow_clear="true">
165
+ <option <# if (data.default=='' ) { #>selected="selected"<# } #> value=""></option>
166
+ <?php foreach ( WC()->countries->get_countries() as $id => $name ) : ?>
167
+ <option <# if (data.default=='<?php echo esc_attr( $id ); ?>' ) { #>selected="selected"<# } #> value="<?php echo esc_attr( $id ); ?>"><?php echo esc_html( $name ); ?></option>
168
+ <?php endforeach; ?>
169
+ </select>
170
+ </p>
171
+ </div>
172
+ <# } #>
173
+ <# if (data.type=='state' ) { #>
174
+ <div class="options_group">
175
+ <p class="form-field">
176
+ <label><?php esc_html_e( 'Country', 'woocommerce-checkout-manager' ); ?></label>
177
+ <select class="wooccm-enhanced-select" name="country" data-placeholder="<?php esc_attr_e( 'Select country&hellip;', 'woocommerce-checkout-manager' ); ?>" data-allow_clear="true">
178
+ <?php foreach ( WC()->countries->get_countries() as $id => $name ) : ?>
179
+ <option <# if (data.country=='<?php echo esc_attr( $id ); ?>' ) { #>selected="selected"<# } #> value="<?php echo esc_attr( $id ); ?>"><?php echo esc_html( $name ); ?></option>
180
+ <?php endforeach; ?>
181
+ </select>
182
+ </p>
183
+ </div>
184
+ <# } #>
185
+ <div class="options_group">
186
+ <p class="form-field">
187
+ <label><?php esc_html_e( 'Extra class', 'woocommerce-checkout-manager' ); ?></label>
188
+ <input class="short" type="text" name="extra_class" value="{{data.extra_class}}">
189
+ </p>
190
+ </div>
 
 
 
 
 
 
 
191
  </div>
includes/view/frontend/class-wooccm-fields-handler.php CHANGED
@@ -203,6 +203,19 @@ class WOOCCM_Fields_Handler {
203
  }
204
  }
205
 
 
 
 
 
 
 
 
 
 
 
 
 
 
206
  return $field;
207
  }
208
 
203
  }
204
  }
205
 
206
+ // File
207
+ if ( $field['type'] == 'file' ) {
208
+ if ( $field['file_limit'] ) {
209
+ $field['custom_attributes']['data-file-limit'] = absint( $field['file_limit'] );
210
+ }
211
+ if ( $field['file_types'] ) {
212
+ $field['custom_attributes']['data-file-types'] = htmlentities( json_encode( $field['file_types'] ) );
213
+ }
214
+ if ( $field['file_max_size'] ) {
215
+ $field['custom_attributes']['data-file-max-size'] = absint( $field['file_max_size'] );
216
+ }
217
+ }
218
+
219
  return $field;
220
  }
221
 
readme.txt CHANGED
@@ -5,9 +5,9 @@ Tags: checkout field editor, woocommerce checkout field editor, checkout manager
5
  Requires at least: 4.9
6
  Tested up to: 6.1
7
  Requires PHP: 5.6
8
- Stable tag: 6.3.5
9
  WC requires at least: 3.1.0
10
- WC tested up to: 7.0
11
  License: GPLv3
12
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
13
 
@@ -149,6 +149,9 @@ Your Order data can be reviewed in each order within the default WooCommerce Ord
149
 
150
  == Changelog ==
151
 
 
 
 
152
  = 6.3.5
153
  * Fix. WordPress Compatibility
154
 
5
  Requires at least: 4.9
6
  Tested up to: 6.1
7
  Requires PHP: 5.6
8
+ Stable tag: 6.3.6
9
  WC requires at least: 3.1.0
10
+ WC tested up to: 7.1
11
  License: GPLv3
12
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
13
 
149
 
150
  == Changelog ==
151
 
152
+ = 6.3.6
153
+ * Fix. Premium Compatibility
154
+
155
  = 6.3.5
156
  * Fix. WordPress Compatibility
157
 
woocommerce-checkout-manager.php CHANGED
@@ -4,20 +4,20 @@
4
  * Plugin Name: Checkout Fields Manager for WooCommerce
5
  * Plugin URI: https://quadlayers.com/portfolio/woocommerce-checkout-manager/
6
  * Description: Manage and customize WooCommerce Checkout fields (Add, Edit, Delete or re-order fields).
7
- * Version: 6.3.5
8
  * Author: QuadLayers
9
  * Author URI: https://quadlayers.com
10
  * License: GPLv3
11
  * Text Domain: woocommerce-checkout-manager
12
  * WC requires at least: 3.1.0
13
- * WC tested up to: 7.0
14
  */
15
  if ( ! defined( 'ABSPATH' ) ) {
16
  die( '-1' );
17
  }
18
 
19
  define( 'WOOCCM_PLUGIN_NAME', 'Checkout Fields Manager for WooCommerce' );
20
- define( 'WOOCCM_PLUGIN_VERSION', '6.3.5' );
21
  define( 'WOOCCM_PLUGIN_FILE', __FILE__ );
22
  define( 'WOOCCM_PLUGIN_DIR', __DIR__ . DIRECTORY_SEPARATOR );
23
  define( 'WOOCCM_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
4
  * Plugin Name: Checkout Fields Manager for WooCommerce
5
  * Plugin URI: https://quadlayers.com/portfolio/woocommerce-checkout-manager/
6
  * Description: Manage and customize WooCommerce Checkout fields (Add, Edit, Delete or re-order fields).
7
+ * Version: 6.3.6
8
  * Author: QuadLayers
9
  * Author URI: https://quadlayers.com
10
  * License: GPLv3
11
  * Text Domain: woocommerce-checkout-manager
12
  * WC requires at least: 3.1.0
13
+ * WC tested up to: 7.1
14
  */
15
  if ( ! defined( 'ABSPATH' ) ) {
16
  die( '-1' );
17
  }
18
 
19
  define( 'WOOCCM_PLUGIN_NAME', 'Checkout Fields Manager for WooCommerce' );
20
+ define( 'WOOCCM_PLUGIN_VERSION', '6.3.6' );
21
  define( 'WOOCCM_PLUGIN_FILE', __FILE__ );
22
  define( 'WOOCCM_PLUGIN_DIR', __DIR__ . DIRECTORY_SEPARATOR );
23
  define( 'WOOCCM_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );