Version Description
- Improvement: woocommerce checkout manager admin panel rebuilt
- Improvement: woocommerce checkout manager field conditional rebuilt
- Improvement: woocommerce checkout manager field options rebuilt
- Fix: woocommerce multicheckbox default value
Download this release
Release Info
Developer | quadlayers |
Plugin | WooCommerce Checkout Manager |
Version | 4.6.0 |
Comparing to | |
See all releases |
Code changes from version 4.5.6 to 4.6.0
- assets/{css → backend/css}/wooccm-admin.css +57 -0
- assets/backend/css/wooccm-admin.css.map +1 -0
- assets/{img → backend/img}/logo.jpg +0 -0
- assets/{js/wooccm-field.js → backend/js/wooccm-admin-field.js} +75 -28
- assets/backend/js/wooccm-admin-field.min.js +1 -0
- assets/{js → backend/js}/wooccm-admin.js +35 -0
- assets/backend/js/wooccm-admin.min.js +1 -0
- assets/css/wooccm-admin.css.map +0 -1
- assets/css/wooccm.css.map +0 -1
- assets/{css → frontend/css}/wooccm.css +7 -7
- assets/frontend/css/wooccm.css.map +1 -0
- assets/{css → frontend/css}/wooccm.min.css +0 -0
- assets/{js → frontend/js}/wooccm-checkout.js +16 -16
- assets/frontend/js/wooccm-checkout.min.js +1 -0
- assets/{js → frontend/js}/wooccm-order-upload.js +0 -0
- assets/{js → frontend/js}/wooccm-order-upload.min.js +0 -0
- assets/{timepicker → frontend/timepicker}/i18n/i18n.html +0 -0
- assets/{timepicker → frontend/timepicker}/i18n/jquery.ui.timepicker-cs.js +0 -0
- assets/{timepicker → frontend/timepicker}/i18n/jquery.ui.timepicker-de.js +0 -0
- assets/{timepicker → frontend/timepicker}/i18n/jquery.ui.timepicker-es.js +0 -0
- assets/{timepicker → frontend/timepicker}/i18n/jquery.ui.timepicker-fr.js +0 -0
- assets/{timepicker → frontend/timepicker}/i18n/jquery.ui.timepicker-hr.js +0 -0
- assets/{timepicker → frontend/timepicker}/i18n/jquery.ui.timepicker-it.js +0 -0
- assets/{timepicker → frontend/timepicker}/i18n/jquery.ui.timepicker-ja.js +0 -0
- assets/{timepicker → frontend/timepicker}/i18n/jquery.ui.timepicker-nl.js +0 -0
- assets/{timepicker → frontend/timepicker}/i18n/jquery.ui.timepicker-pl.js +0 -0
- assets/{timepicker → frontend/timepicker}/i18n/jquery.ui.timepicker-pt.js +0 -0
- assets/{timepicker → frontend/timepicker}/i18n/jquery.ui.timepicker-sl.js +0 -0
- assets/{timepicker → frontend/timepicker}/i18n/jquery.ui.timepicker-sv.js +0 -0
- assets/{timepicker → frontend/timepicker}/i18n/jquery.ui.timepicker-tr.js +0 -0
- assets/{timepicker → frontend/timepicker}/jquery.ui.timepicker.css +0 -0
- assets/{timepicker → frontend/timepicker}/jquery.ui.timepicker.js +0 -0
- assets/js/wooccm-admin.min.js +0 -1
- assets/js/wooccm-checkout.min.js +0 -1
- assets/js/wooccm-field.min.js +0 -1
- assets/less/wooccm-admin.less +0 -130
- assets/less/wooccm.less +0 -119
- assets/old/backend_css.css +0 -370
- assets/old/billing_script_wccs.js +0 -106
- assets/old/edit-order-uploads-button_style.css +0 -66
- assets/old/edit-order-uploads-file_editing_table.css +0 -144
- assets/old/script_wccs.js +0 -318
- assets/old/shipping_script_wccs.js +0 -106
- assets/old/woocheckout-export.css +0 -72
- changelog.txt +0 -25
- includes/admin.php +0 -1441
- includes/class-wooccm-admin.php +118 -0
- new/model/class-wooccm-field-old.php → includes/class-wooccm-compatibility.php +90 -264
- includes/class-wooccm-install.php +92 -0
- {new → includes}/class-wooccm-notices.php +54 -9
- {new → includes}/class-wooccm.php +39 -37
- includes/classes/import.php +0 -187
- includes/classes/main.php +0 -472
- new/controller/class-wooccm-checkout-advanced-controller.php → includes/controller/class-wooccm-checkout-advanced.php +13 -10
- new/controller/class-wooccm-checkout-controller.php → includes/controller/class-wooccm-checkout.php +13 -10
- {new → includes}/controller/class-wooccm-field-upload.php +18 -19
- new/controller/class-wooccm-field-controller.php → includes/controller/class-wooccm-field.php +188 -117
- includes/controller/class-wooccm-order.php +340 -0
- includes/export.php +0 -961
- includes/formatting.php +0 -24
- includes/functions.php +0 -14
- includes/install.php +0 -249
- {new → includes}/model/class-wooccm-field-additional.php +3 -3
- {new → includes}/model/class-wooccm-field-billing.php +4 -3
- {new → includes}/model/class-wooccm-field-shipping.php +2 -2
- includes/model/class-wooccm-field.php +466 -0
- includes/templates/admin/clean/woocheckout-billing-clone.php +0 -159
- includes/templates/admin/clean/woocheckout-billing-tbody.php +0 -273
- includes/templates/admin/clean/woocheckout-billing-thead.php +0 -131
- includes/templates/admin/woocheckout-additional-clone.php +0 -167
- includes/templates/admin/woocheckout-additional-tbody.php +0 -285
- includes/templates/admin/woocheckout-additional-thead.php +0 -154
- includes/templates/admin/woocheckout-additional.php +0 -65
- includes/templates/admin/woocheckout-billing-clone.php +0 -160
- includes/templates/admin/woocheckout-billing-tbody.php +0 -272
- includes/templates/admin/woocheckout-billing-thead.php +0 -130
- includes/templates/admin/woocheckout-billing.php +0 -75
- includes/templates/admin/woocheckout-general-address-fields.php +0 -16
- includes/templates/admin/woocheckout-general-advanced.php +0 -29
- includes/templates/admin/woocheckout-general-checkout-notices.php +0 -82
- includes/templates/admin/woocheckout-general-custom-css.php +0 -28
- includes/templates/admin/woocheckout-general-order-notes.php +0 -150
- includes/templates/admin/woocheckout-general-switches.php +0 -186
- includes/templates/admin/woocheckout-general-uploads.php +0 -153
- includes/templates/admin/woocheckout-general.php +0 -57
- includes/templates/admin/woocheckout-shipping-clone.php +0 -160
- includes/templates/admin/woocheckout-shipping-tbody.php +0 -272
- includes/templates/admin/woocheckout-shipping-thead.php +0 -128
- includes/templates/admin/woocheckout-shipping.php +0 -73
- {new → includes}/view/backend/meta-boxes/html-order-uploads.php +0 -0
- {new → includes}/view/backend/pages/additional.php +4 -4
- {new → includes}/view/backend/pages/advanced.php +6 -6
- {new → includes}/view/backend/pages/billing.php +4 -5
- {new → includes}/view/backend/pages/checkout.php +1 -1
- new/view/backend/pages/modals/edit.php → includes/view/backend/pages/modals/modal-field.php +19 -11
- includes/view/backend/pages/modals/parts/field-info.php +74 -0
- includes/view/backend/pages/modals/parts/field-tabs.php +37 -0
- {new → includes}/view/backend/pages/modals/parts/panel-advanced.php +4 -4
- {new → includes}/view/backend/pages/modals/parts/panel-datepicker.php +2 -2
- {new → includes}/view/backend/pages/modals/parts/panel-display.php +8 -12
- {new → includes}/view/backend/pages/modals/parts/panel-general.php +18 -17
- includes/view/backend/pages/modals/parts/panel-options.php +63 -0
- includes/view/backend/pages/modals/parts/panel-price.php +38 -0
- {new → includes}/view/backend/pages/modals/parts/panel-suggestions.php +1 -1
- {new → includes}/view/backend/pages/modals/parts/panel-timepicker.php +1 -5
- {new → includes}/view/backend/pages/order.php +1 -1
- {new → includes}/view/backend/pages/parts/actions.php +0 -0
- {new → includes}/view/backend/pages/parts/header.php +2 -7
- {new → includes}/view/backend/pages/parts/loop.php +9 -11
- {new → includes}/view/backend/pages/shipping.php +4 -4
- includes/view/frontend/class-wooccm-fields-additional.php +132 -0
- includes/view/frontend/class-wooccm-fields-conditional.php +63 -0
- includes/view/frontend/class-wooccm-fields-display.php +188 -0
- includes/view/frontend/class-wooccm-fields-filters.php +305 -0
- includes/view/frontend/class-wooccm-fields-handler.php +277 -0
- includes/view/frontend/class-wooccm-fields-register.php +59 -0
- new/class-wooccm-admin.php +0 -127
- new/class-wooccm-install.php +0 -19
- new/controller/class-wooccm-order-controller.php +0 -342
- new/install.php +0 -147
- new/model/class-wooccm-field.php +0 -229
- new/view/backend/pages/modals/parts/edit-info.php +0 -45
- new/view/backend/pages/modals/parts/edit-info_1.php +0 -77
- new/view/backend/pages/modals/parts/edit-tabs.php +0 -30
- new/view/backend/pages/modals/parts/panel-amount.php +0 -38
- new/view/backend/pages/modals/parts/panel-conditional.php +0 -24
- new/view/frontend/class-wooccm-fields-additional.php +0 -135
- new/view/frontend/class-wooccm-fields-conditional.php +0 -59
- new/view/frontend/class-wooccm-fields-display.php +0 -197
- new/view/frontend/class-wooccm-fields-handler.php +0 -148
- new/view/frontend/class-wooccm-fields-register.php +0 -213
- new/view/frontend/filters.php +0 -269
- readme.txt +11 -2
- templates/order/order-custom-fields.php +25 -24
- templates/order/order-upload-files.php +1 -1
- woocommerce-checkout-manager.php +8 -5
assets/{css → backend/css}/wooccm-admin.css
RENAMED
@@ -1,3 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
.woocommerce_options_panel .woocommerce-help-tip {
|
2 |
margin: 0 0 0 0.5em;
|
3 |
}
|
@@ -5,11 +51,22 @@
|
|
5 |
width: 50%!important;
|
6 |
line-height: 16px;
|
7 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
.woocommerce_options_panel .select2-container .select2-selection--multiple {
|
9 |
line-height: 16px;
|
10 |
min-height: 30px;
|
11 |
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.07);
|
12 |
}
|
|
|
|
|
|
|
|
|
|
|
13 |
.woocommerce_options_panel .select2-container--default .select2-selection--multiple .select2-selection__rendered li {
|
14 |
margin: 3px 3px 0 0;
|
15 |
}
|
1 |
+
table.wc_gateways > tbody > tr > td.label {
|
2 |
+
font-weight: 600;
|
3 |
+
}
|
4 |
+
table.wooccm-enhanced-options {
|
5 |
+
border: none;
|
6 |
+
box-shadow: none;
|
7 |
+
}
|
8 |
+
table.wooccm-enhanced-options > tbody > tr > td input.label {
|
9 |
+
width: 100%;
|
10 |
+
}
|
11 |
+
table.wooccm-enhanced-options > tbody > tr > td select.add-price-type {
|
12 |
+
margin: 0 0 0 10px;
|
13 |
+
}
|
14 |
+
table.wooccm-enhanced-options > tbody > tr > td input.check {
|
15 |
+
margin: 0 9px;
|
16 |
+
}
|
17 |
+
table.wooccm-enhanced-options > tbody > tr > td.sort .wc-item-reorder-nav {
|
18 |
+
width: auto;
|
19 |
+
}
|
20 |
+
.attachment-info .details,
|
21 |
+
.attachment-info .settings {
|
22 |
+
width: 100%;
|
23 |
+
}
|
24 |
+
.attachment-info .woocommerce_options_panel label,
|
25 |
+
.attachment-info .woocommerce_options_panel legend {
|
26 |
+
width: 75px;
|
27 |
+
margin: 0 0 0 -90px;
|
28 |
+
font-weight: 600;
|
29 |
+
}
|
30 |
+
.attachment-info .woocommerce_options_panel fieldset.form-field,
|
31 |
+
.attachment-info .woocommerce_options_panel p.form-field {
|
32 |
+
padding: 0 20px 0 92px!important;
|
33 |
+
}
|
34 |
+
.attachment-info .woocommerce_options_panel input[type=email],
|
35 |
+
.attachment-info .woocommerce_options_panel input[type=number],
|
36 |
+
.attachment-info .woocommerce_options_panel input[type=password],
|
37 |
+
.attachment-info .woocommerce_options_panel input[type=text],
|
38 |
+
.attachment-info .woocommerce_options_panel select,
|
39 |
+
.attachment-info .woocommerce_options_panel .select2-container {
|
40 |
+
width: 100%!important;
|
41 |
+
}
|
42 |
+
.woocommerce_options_panel input,
|
43 |
+
.woocommerce_options_panel select,
|
44 |
+
.woocommerce_options_panel textarea {
|
45 |
+
margin: 0;
|
46 |
+
}
|
47 |
.woocommerce_options_panel .woocommerce-help-tip {
|
48 |
margin: 0 0 0 0.5em;
|
49 |
}
|
51 |
width: 50%!important;
|
52 |
line-height: 16px;
|
53 |
}
|
54 |
+
.woocommerce_options_panel .select2-container span {
|
55 |
+
width: auto;
|
56 |
+
float: none;
|
57 |
+
margin: auto;
|
58 |
+
padding: auto;
|
59 |
+
}
|
60 |
.woocommerce_options_panel .select2-container .select2-selection--multiple {
|
61 |
line-height: 16px;
|
62 |
min-height: 30px;
|
63 |
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.07);
|
64 |
}
|
65 |
+
@media only screen and (max-width: 1280px) {
|
66 |
+
.woocommerce_options_panel .select2-container {
|
67 |
+
width: 80%!important;
|
68 |
+
}
|
69 |
+
}
|
70 |
.woocommerce_options_panel .select2-container--default .select2-selection--multiple .select2-selection__rendered li {
|
71 |
margin: 3px 3px 0 0;
|
72 |
}
|
assets/backend/css/wooccm-admin.css.map
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
{"version":3,"sources":["../../less/wooccm-admin.less"],"names":[],"mappings":"AASU,KAPP,YAEC,QAEE,KACE,KAEG;EACC,gBAAA;;AAQV,KAAC;EACC,YAAA;EACA,gBAAA;;AAFF,KAAC,wBAIC,QACE,KACE,KACE,MAAK;EACH,WAAA;;AARV,KAAC,wBAIC,QACE,KACE,KAIE,OAAM;EACJ,kBAAA;;AAXV,KAAC,wBAIC,QACE,KACE,KAOE,MAAK;EACH,aAAA;;AAGF,KAjBP,wBAIC,QACE,KACE,KAWG,KAAM;EACL,WAAA;;AASZ,gBACE;AADF,gBAEE;EACE,WAAA;;AAHJ,gBAME,2BAA2B;AAN7B,gBAOE,2BAA2B;EACzB,WAAA;EACA,mBAAA;EACA,gBAAA;;AAVJ,gBAaE,2BAA2B,SAAQ;AAbrC,gBAcE,2BAA2B,EAAC;EAC1B,gCAAA;;AAfJ,gBAkBE,2BAA2B,MAAK;AAlBlC,gBAmBE,2BAA2B,MAAK;AAnBlC,gBAoBE,2BAA2B,MAAK;AApBlC,gBAqBE,2BAA2B,MAAK;AArBlC,gBAsBE,2BAA2B;AAtB7B,gBAuBE,2BAA2B;EACzB,qBAAA;;AAKJ,0BAEE;AAFF,0BAGE;AAHF,0BAIE;EACE,SAAA;;AALJ,0BAQE;EACE,mBAAA;;AATJ,0BAYE;EACE,oBAAA;EACA,iBAAA;;AAdJ,0BAYE,mBAIE;EACE,WAAA;EACA,WAAA;EACA,YAAA;EACA,aAAA;;AApBN,0BAYE,mBAWE;EACE,iBAAA;EACA,gBAAA;EACA,+CAAA;;AAGF,wBAA2C;EAyH9C,0BA1IC;IAkBI,oBAAA;;;AA9BN,0BAkCE,4BAEE,6BAA6B,6BAA6B;EACxD,mBAAA;;AAGF,0BANF,4BAMG,yBAA0B;EACzB,+BAAA;EACA,2CAAA;EACA,wCAAA;;AAMN,kCAAkC,mBAAmB,iEAAkE;AAAmC,kCAAkC,mBAAmB,mEAAoE;AACnR,kCAAkC,mBAAmB,mEAAoE;EACvH,kBAAA;;AAGF,kCAAkC,mBAAoB,kCAAkC,IAAG;EACzF,YAAA;EACA,SAAA;EACA,mBAAA;EACA,mBAAA;EACA,sBAAA;EACA,cAAA;;AAGF,kCAAkC,mBAAoB,kCAAkC;EACtF,mBAAA;EACA,qBAAA;EACA,aAAA;EACA,gBAAA;EACA,iBAAA;;AAGF,CAAC,mBAAmB;EAClB,sBAAA;EACA,WAAA;EACA,gBAAA;EACA,oBAAA;EACA,oBAAA;EACA,cAAA;EACA,mCAAA;EACA,SAAS,GAAT;EACA,qBAAA;EACA,gBAAA;;AAGF,kCAAkC,mBAAmB,iEAAkE,kCAAkC,sCAAsC,EAAC;EAC9L,qBAAA;EACA,gBAAA;EACA,kBAAA;EACA,SAAA;;AAGF,kCAAkC,mBAAmB;EACnD,YAAA;EACA,0BAAA;EACA,6BAAA;;AAGF,kCAAkC,mBAAoB,kCAAkC,sCAAsC;EAC5H,qBAAA;EACA,kBAAA;EACA,QAAA;EACA,WAAA;EACA,gBAAA;;AAEF,CAAC;EACC,YAAA;EACA,gBAAA;EACA,WAAA;;AAGF,kCAAkC,mBAAoB;EACpD,wBAAA;EACA,+BAAA;EACA,uBAAA;EACA,oBAAA;EACA,qBAAA;EACA,aAAA;EACA,4BAAA;EACA,6BAAA;EACA,8BAAA;EACA,sBAAA;EACA,kBAAA;;AAGF,kCAAkC,mBAAoB,kCAAkC,0CAA0C;EAChI,SAAA;;AAGF,kCAAkC,mBAAmB,iEAAkE,kCAAkC,0CAA0C;EACjM,UAAA;EACA,gBAAA;;AAGF,kCAAkC,mBAAoB,kCAAkC,0CAA0C;EAChI,SAAA;EACA,eAAA;EACA,WAAA;;AAGF,mBAAqC;EAEnC,kCAAkC,mBAAoB;IACpD,yBAAA;IACA,2BAAA;IACA,mBAAA;IACA,8BAAA;IACA,6BAAA;IACA,2BAAA;IACA,mBAAA","file":"wooccm-admin.css"}
|
assets/{img → backend/img}/logo.jpg
RENAMED
File without changes
|
assets/{js/wooccm-field.js → backend/js/wooccm-admin-field.js}
RENAMED
@@ -28,24 +28,18 @@
|
|
28 |
});
|
29 |
|
30 |
var FieldView = Backbone.View.extend({
|
31 |
-
//id: 'wooccm_modal_js',
|
32 |
events: {
|
33 |
'click .media-modal-backdrop': 'close',
|
34 |
'click .media-modal-close': 'close',
|
35 |
-
//'click .media-modal-delete': 'delete',
|
36 |
'click .media-modal-prev': 'edit',
|
37 |
'click .media-modal-next': 'edit',
|
38 |
-
|
39 |
-
'change
|
40 |
-
'
|
41 |
-
'change select': 'change',
|
42 |
-
//render before change and update model
|
43 |
-
'change .media-modal-change': 'render',
|
44 |
-
'submit .media-modal-form': 'save',
|
45 |
},
|
46 |
templates: {},
|
47 |
initialize: function () {
|
48 |
-
_.bindAll(this, 'open', 'edit', 'change', 'load', 'render', 'close', '
|
49 |
this.init();
|
50 |
this.open();
|
51 |
},
|
@@ -63,6 +57,7 @@
|
|
63 |
|
64 |
_.delay(function () {
|
65 |
|
|
|
66 |
modal.$el.trigger('wooccm-enhanced-select');
|
67 |
modal.$el.trigger('wooccm-tab-panels', tab);
|
68 |
modal.$el.trigger('init_tooltips');
|
@@ -98,9 +93,8 @@
|
|
98 |
},
|
99 |
success: function (response) {
|
100 |
if (response.success) {
|
101 |
-
console.log(response.data);
|
102 |
-
//console.log(this.model.attributes);
|
103 |
modal.model.set(response.data);
|
|
|
104 |
modal.render();
|
105 |
} else {
|
106 |
alert(response.data);
|
@@ -149,8 +143,6 @@
|
|
149 |
/*tab: function (e) {
|
150 |
e.preventDefault();
|
151 |
|
152 |
-
//console.log(e);
|
153 |
-
|
154 |
var $modal = this.$el,
|
155 |
$tab = $(e.target),
|
156 |
$tabs = $modal.find('ul.wc-tabs'),
|
@@ -166,7 +158,7 @@
|
|
166 |
$panel.show();
|
167 |
|
168 |
},*/
|
169 |
-
|
170 |
|
171 |
e.preventDefault();
|
172 |
|
@@ -178,13 +170,31 @@
|
|
178 |
value = $field.prop('checked') === true ? 1 : 0;
|
179 |
}
|
180 |
|
181 |
-
//alert(value);
|
182 |
-
|
183 |
this.model.attributes[name] = value;
|
184 |
this.model.changed[name] = value;
|
185 |
|
186 |
-
//this.render();
|
187 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
188 |
close: function (e) {
|
189 |
e.preventDefault();
|
190 |
this.undelegateEvents();
|
@@ -192,17 +202,57 @@
|
|
192 |
$('body').removeClass('modal-open');
|
193 |
this.remove();
|
194 |
},
|
195 |
-
|
196 |
e.preventDefault();
|
197 |
|
198 |
var modal = this,
|
199 |
-
//$form = $(e.target),
|
200 |
$modal = modal.$el.find('#wooccm_modal'),
|
201 |
$details = $modal.find('.attachment-details');
|
202 |
|
203 |
-
|
204 |
-
|
205 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
206 |
|
207 |
$.ajax({
|
208 |
url: wooccm_field.ajax_url,
|
@@ -210,7 +260,7 @@
|
|
210 |
action: 'wooccm_save_field',
|
211 |
nonce: wooccm_field.nonce,
|
212 |
field_id: modal.model.attributes.id,
|
213 |
-
field_data:
|
214 |
},
|
215 |
dataType: 'json',
|
216 |
type: 'POST',
|
@@ -228,16 +278,13 @@
|
|
228 |
},
|
229 |
success: function (response) {
|
230 |
if (response.success) {
|
231 |
-
//console.log(response.data);
|
232 |
|
233 |
if (response.data.id != modal.model.attributes.id) {
|
234 |
location.reload();
|
235 |
return;
|
236 |
}
|
237 |
-
|
238 |
//re-render dont load select2 saved options
|
239 |
-
|
240 |
-
//modal.render();
|
241 |
|
242 |
} else {
|
243 |
alert(response.data);
|
28 |
});
|
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',
|
35 |
'click .media-modal-next': 'edit',
|
36 |
+
'change .media-modal-change': 'change',
|
37 |
+
'change .media-modal-parent': 'parent',
|
38 |
+
'submit .media-modal-form': 'submit',
|
|
|
|
|
|
|
|
|
39 |
},
|
40 |
templates: {},
|
41 |
initialize: function () {
|
42 |
+
_.bindAll(this, 'open', 'edit', 'parent', 'change', 'load', 'render', 'close', 'submit');
|
43 |
this.init();
|
44 |
this.open();
|
45 |
},
|
57 |
|
58 |
_.delay(function () {
|
59 |
|
60 |
+
modal.$el.trigger('wooccm-enhanced-options');
|
61 |
modal.$el.trigger('wooccm-enhanced-select');
|
62 |
modal.$el.trigger('wooccm-tab-panels', tab);
|
63 |
modal.$el.trigger('init_tooltips');
|
93 |
},
|
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);
|
143 |
/*tab: function (e) {
|
144 |
e.preventDefault();
|
145 |
|
|
|
|
|
146 |
var $modal = this.$el,
|
147 |
$tab = $(e.target),
|
148 |
$tabs = $modal.find('ul.wc-tabs'),
|
158 |
$panel.show();
|
159 |
|
160 |
},*/
|
161 |
+
update: function (e) {
|
162 |
|
163 |
e.preventDefault();
|
164 |
|
170 |
value = $field.prop('checked') === true ? 1 : 0;
|
171 |
}
|
172 |
|
|
|
|
|
173 |
this.model.attributes[name] = value;
|
174 |
this.model.changed[name] = value;
|
175 |
|
|
|
176 |
},
|
177 |
+
change: function (e) {
|
178 |
+
e.preventDefault();
|
179 |
+
|
180 |
+
this.update(e);
|
181 |
+
this.render();
|
182 |
+
|
183 |
+
},
|
184 |
+
// table: function (e) {
|
185 |
+
// e.preventDefault();
|
186 |
+
//
|
187 |
+
// var $field = $(e.target),
|
188 |
+
// name = $field.attr('name'),
|
189 |
+
// value = $field.val();
|
190 |
+
//
|
191 |
+
// if (e.target.type === 'checkbox') {
|
192 |
+
// value = $field.prop('checked') === true ? 1 : 0;
|
193 |
+
// }
|
194 |
+
//
|
195 |
+
// //$('tr[data-field_id="' + this.model.attributes.id + '"]').find('td.' + name).html(value);
|
196 |
+
//
|
197 |
+
// },
|
198 |
close: function (e) {
|
199 |
e.preventDefault();
|
200 |
this.undelegateEvents();
|
202 |
$('body').removeClass('modal-open');
|
203 |
this.remove();
|
204 |
},
|
205 |
+
parent: function (e) {
|
206 |
e.preventDefault();
|
207 |
|
208 |
var modal = this,
|
|
|
209 |
$modal = modal.$el.find('#wooccm_modal'),
|
210 |
$details = $modal.find('.attachment-details');
|
211 |
|
212 |
+
this.update(e);
|
213 |
+
|
214 |
+
$.ajax({
|
215 |
+
url: wooccm_field.ajax_url,
|
216 |
+
data: {
|
217 |
+
action: 'wooccm_load_parent',
|
218 |
+
nonce: wooccm_field.nonce,
|
219 |
+
conditional_parent_key: modal.model.attributes.conditional_parent_key
|
220 |
+
},
|
221 |
+
dataType: 'json',
|
222 |
+
type: 'POST',
|
223 |
+
beforeSend: function () {
|
224 |
+
$details.addClass('save-waiting');
|
225 |
+
//block($details);
|
226 |
+
},
|
227 |
+
complete: function () {
|
228 |
+
$details.addClass('save-complete');
|
229 |
+
$details.removeClass('save-waiting');
|
230 |
+
//unblock($details);
|
231 |
+
},
|
232 |
+
error: function () {
|
233 |
+
alert('Error!');
|
234 |
+
},
|
235 |
+
success: function (response) {
|
236 |
+
if (response.success) {
|
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 |
+
}
|
244 |
+
}
|
245 |
+
});
|
246 |
+
|
247 |
+
return false;
|
248 |
+
|
249 |
+
},
|
250 |
+
submit: function (e) {
|
251 |
+
e.preventDefault();
|
252 |
+
|
253 |
+
var modal = this,
|
254 |
+
$modal = modal.$el.find('#wooccm_modal'),
|
255 |
+
$details = $modal.find('.attachment-details');
|
256 |
|
257 |
$.ajax({
|
258 |
url: wooccm_field.ajax_url,
|
260 |
action: 'wooccm_save_field',
|
261 |
nonce: wooccm_field.nonce,
|
262 |
field_id: modal.model.attributes.id,
|
263 |
+
field_data: $('form', this.$el).serialize()
|
264 |
},
|
265 |
dataType: 'json',
|
266 |
type: 'POST',
|
278 |
},
|
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);
|
assets/backend/js/wooccm-admin-field.min.js
ADDED
@@ -0,0 +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);
|
assets/{js → backend/js}/wooccm-admin.js
RENAMED
@@ -128,6 +128,41 @@
|
|
128 |
|
129 |
});
|
130 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
131 |
$(document).on('wooccm-enhanced-select', function (e) {
|
132 |
|
133 |
$('.wooccm-enhanced-select').filter(':not(.enhanced)').each(function () {
|
128 |
|
129 |
});
|
130 |
|
131 |
+
$(document).on('wooccm-enhanced-options', function (e) {
|
132 |
+
|
133 |
+
$('.wooccm-enhanced-options').each(function () {
|
134 |
+
|
135 |
+
var $table = $(this),
|
136 |
+
$add = $table.find('.add-option'),
|
137 |
+
$remove = $table.find('.remove-options');
|
138 |
+
|
139 |
+
$add.on('click', function (e) {
|
140 |
+
|
141 |
+
var $tr = $table.find('tbody > tr'),
|
142 |
+
id = $tr.length,
|
143 |
+
tr = $tr.first().clone().html().replace(/options\[([0-9]+)\]/g, 'options[' + id + ']').replace('disabled="disabled"', '').replace('checked="checked"', '').replace('<input value="0"', '<input value="' + id + '"');
|
144 |
+
|
145 |
+
$tr.last().after($('<tr class="row">' + tr + '</tr>'));
|
146 |
+
|
147 |
+
$remove.removeProp('disabled');
|
148 |
+
|
149 |
+
});
|
150 |
+
|
151 |
+
$remove.on('click', function (e) {
|
152 |
+
|
153 |
+
$table.find('tr > td.check-column input:checked').closest('tr').remove();
|
154 |
+
|
155 |
+
var $tr = $table.find('tbody > tr');
|
156 |
+
|
157 |
+
if ($tr.length < 2) {
|
158 |
+
$(this).prop('disabled', true);
|
159 |
+
}
|
160 |
+
});
|
161 |
+
|
162 |
+
});
|
163 |
+
|
164 |
+
});
|
165 |
+
|
166 |
$(document).on('wooccm-enhanced-select', function (e) {
|
167 |
|
168 |
$('.wooccm-enhanced-select').filter(':not(.enhanced)').each(function () {
|
assets/backend/js/wooccm-admin.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(function(b){b.fn.serializeArrayAll=function(){var f={};var e=this.serializeArray();b.each(e,function(){if(f[this.name]!==undefined){if(!f[this.name].push){f[this.name]=[f[this.name]]}f[this.name].push(this.value||"")}else{f[this.name]=this.value||""}});var d=b("input[type=radio],input[type=checkbox]",this);b.each(d,function(){if(!f.hasOwnProperty(this.name)){f[this.name]=""}});return f};function c(f){var e=b(f).next().is(".hasDatepicker")?"minDate":"maxDate",g="minDate"===e?b(f).next():b(f).prev(),d=b(f).datepicker("getDate");b(g).datepicker("option",e,d);b(f).change()}function a(){return{language:{errorLoading:function(){return wc_enhanced_select_params.i18n_searching},inputTooLong:function(d){var e=d.input.length-d.maximum;if(1===e){return wc_enhanced_select_params.i18n_input_too_long_1}return wc_enhanced_select_params.i18n_input_too_long_n.replace("%qty%",e)},inputTooShort:function(d){var e=d.minimum-d.input.length;if(1===e){return wc_enhanced_select_params.i18n_input_too_short_1}return wc_enhanced_select_params.i18n_input_too_short_n.replace("%qty%",e)},loadingMore:function(){return wc_enhanced_select_params.i18n_load_more},maximumSelected:function(d){if(d.maximum===1){return wc_enhanced_select_params.i18n_selection_too_long_1}return wc_enhanced_select_params.i18n_selection_too_long_n.replace("%qty%",d.maximum)},noResults:function(){return wc_enhanced_select_params.i18n_no_matches},searching:function(){return wc_enhanced_select_params.i18n_searching}}}}b(document).on("wooccm-tab-panels",function(i,h){var g=b(i.target),f=g.find("ul.wc-tabs"),d=f.find('a[href="'+h+'"]');f.show();f.find("a").click(function(k){k.preventDefault();var j=b(this).closest("div.panel-wrap");f.find("li",j).removeClass("active");b(this).parent().addClass("active");b("div.panel",j).hide();b(b(this).attr("href")).show()});if(d.length&&b(d.attr("href")).length){d.click()}else{f.find("li.active").find("a").click()}});b(document).on("wooccm-enhanced-select",function(d){b(".wooccm-enhanced-between-dates").filter(":not(.enhanced)").each(function(){b(this).find("input").datepicker({defaultDate:"",dateFormat:"yy-mm-dd",numberOfMonths:1,showButtonPanel:true,onSelect:function(){c(b(this))}});b(this).find("input").each(function(){c(b(this))})})});b(document).on("wooccm-enhanced-options",function(d){b(".wooccm-enhanced-options").each(function(){var f=b(this),g=f.find(".add-option"),e=f.find(".remove-options");g.on("click",function(j){var h=f.find("tbody > tr"),k=h.length,i=h.first().clone().html().replace(/options\[([0-9]+)\]/g,"options["+k+"]").replace('disabled="disabled"',"").replace('checked="checked"',"").replace('<input value="0"','<input value="'+k+'"');h.last().after(b('<tr class="row">'+i+"</tr>"));e.removeProp("disabled")});e.on("click",function(i){f.find("tr > td.check-column input:checked").closest("tr").remove();var h=f.find("tbody > tr");if(h.length<2){b(this).prop("disabled",true)}})})});b(document).on("wooccm-enhanced-select",function(d){b(".wooccm-enhanced-select").filter(":not(.enhanced)").each(function(){var e=b.extend({minimumResultsForSearch:10,allowClear:b(this).data("allow_clear")?true:false,placeholder:b(this).data("placeholder")},a());b(this).selectWoo(e).addClass("enhanced")});b(".wooccm-product-search").filter(":not(.enhanced)").each(function(){var g={allowClear:b(this).data("allow_clear")?true:false,placeholder:b(this).data("placeholder"),minimumInputLength:b(this).data("minimum_input_length")?b(this).data("minimum_input_length"):"3",escapeMarkup:function(h){return h},ajax:{url:wc_enhanced_select_params.ajax_url,dataType:"json",delay:250,data:function(h){return{term:h.term,action:b(this).data("action")||"wooccm_select_search_products",security:wc_enhanced_select_params.search_products_nonce,selected:b(this).select2("val")||0,exclude:b(this).data("exclude"),include:b(this).data("include"),limit:b(this).data("limit"),display_stock:b(this).data("display_stock")}},processResults:function(i){var h=[];if(i){b.each(i,function(k,j){h.push({id:k,text:j})})}return{results:h}},cache:true}};g=b.extend(g,a());b(this).selectWoo(g).addClass("enhanced");if(b(this).data("sortable")){var f=b(this);var e=b(this).next(".select2-container").find("ul.select2-selection__rendered");e.sortable({placeholder:"ui-state-highlight select2-selection__choice",forcePlaceholderSize:true,items:"li:not(.select2-search__field)",tolerance:"pointer",stop:function(){b(e.find(".select2-selection__choice").get().reverse()).each(function(){var i=b(this).data("data").id;var h=f.find('option[value="'+i+'"]')[0];f.prepend(h)})}})}else{if(b(this).prop("multiple")){b(this).on("change",function(){var h=b(this).children();h.sort(function(j,i){var l=j.text.toLowerCase();var k=i.text.toLowerCase();if(l>k){return 1}if(l<k){return -1}return 0});b(this).html(h)})}}})})})(jQuery);
|
assets/css/wooccm-admin.css.map
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
{"version":3,"sources":["../less/wooccm-admin.less"],"names":[],"mappings":"AAAA,0BAEE;EACE,mBAAA;;AAHJ,0BAME;EACE,oBAAA;EACA,iBAAA;;AARJ,0BAME,mBAKE;EACE,iBAAA;EACA,gBAAA;EACA,+CAAA;;AAdN,0BAkBE,4BAA4B,6BAA6B,6BAA6B;EACpF,mBAAA;;AAnBJ,0BAqBE,4BAA2B,yBAA0B;EACnD,+BAAA;EACA,2CAAA;EACA,wCAAA;;AAIJ,kCAAkC,mBAAmB,iEAAkE;AAAmC,kCAAkC,mBAAmB,mEAAoE;AACnR,kCAAkC,mBAAmB,mEAAoE;EACvH,kBAAA;;AAGF,kCAAkC,mBAAoB,kCAAkC,IAAG;EACzF,YAAA;EACA,SAAA;EACA,mBAAA;EACA,mBAAA;EACA,sBAAA;EACA,cAAA;;AAGF,kCAAkC,mBAAoB,kCAAkC;EACtF,mBAAA;EACA,qBAAA;EACA,aAAA;EACA,gBAAA;EACA,iBAAA;;AAGF,CAAC,mBAAmB;EAClB,sBAAA;EACA,WAAA;EACA,gBAAA;EACA,oBAAA;EACA,oBAAA;EACA,cAAA;EACA,mCAAA;EACA,SAAS,GAAT;EACA,qBAAA;EACA,gBAAA;;AAGF,kCAAkC,mBAAmB,iEAAkE,kCAAkC,sCAAsC,EAAC;EAC9L,qBAAA;EACA,gBAAA;EACA,kBAAA;EACA,SAAA;;AAGF,kCAAkC,mBAAmB;EACnD,YAAA;EACA,0BAAA;EACA,6BAAA;;AAGF,kCAAkC,mBAAoB,kCAAkC,sCAAsC;EAC5H,qBAAA;EACA,kBAAA;EACA,QAAA;EACA,WAAA;EACA,gBAAA;;AAEF,CAAC;EACC,YAAA;EACA,gBAAA;EACA,WAAA;;AAGF,kCAAkC,mBAAoB;EACpD,wBAAA;EACA,+BAAA;EACA,uBAAA;EACA,oBAAA;EACA,qBAAA;EACA,aAAA;EACA,4BAAA;EACA,6BAAA;EACA,8BAAA;EACA,sBAAA;EACA,kBAAA;;AAGF,kCAAkC,mBAAoB,kCAAkC,0CAA0C;EAChI,SAAA;;AAGF,kCAAkC,mBAAmB,iEAAkE,kCAAkC,0CAA0C;EACjM,UAAA;EACA,gBAAA;;AAGF,kCAAkC,mBAAoB,kCAAkC,0CAA0C;EAChI,SAAA;EACA,eAAA;EACA,WAAA;;AAGF,mBAAqC;EAEnC,kCAAkC,mBAAoB;IACpD,yBAAA;IACA,2BAAA;IACA,mBAAA;IACA,8BAAA;IACA,6BAAA;IACA,2BAAA;IACA,mBAAA","file":"wooccm-admin.css"}
|
|
assets/css/wooccm.css.map
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
{"version":3,"sources":["../less/wooccm.less"],"names":[],"mappings":"AAKI,YALS,KAEX,iBAGG;AACC,YANO,KAEX,iBAIK;EACD,SAAQ,EAAR;EACA,cAAA;;AAEF,YAVS,KAEX,iBAQG;EACC,WAAA;;AAXN,YAAa,KAeX;EACE,aAAA;;AAMF,OAAC;EACC,kBAAA;EACA,0BAAA;;AAFF,OAAC,iBAIC;EACE,kBAAA;EACA,MAAA;EACA,QAAA;EACA,SAAA;EACA,UAAA;EACA,YAAW,kBAAX;EACA,gBAAA;EACA,cAAA;EACA,eAAA;;AAMN;EACE,cAAA;EACA,UAAA;EACA,aAAA;EACA,eAAA;EACA,mBAAA;EACA,sBAAA;;AANF,kBAQE;EACE,aAAA;EACA,uBAAA;EACA,oBAAA;EACA,sBAAA;EACA,uBAAA;EACA,UAAA;EAEA,kBAAA;;AAhBJ,kBAQE,mBAWE;EACE,UAAA;EACA,kBAAA;EACA,QAAA;EACA,WAAA;EACA,WAAA;EACA,YAAA;EACA,sBAAA;EACA,cAAA;EACA,iBAAA;EACA,kBAAA;EACA,cAAA;EACA,gBAAA;EACA,kBAAA;EACA,eAAA;EACA,eAAA;EACA,iBAAA;;AAnCN,kBAQE,mBA8BE;EACE,WAAA;EACA,gBAAA;;AAxCN,kBAQE,mBAmCE;EACE,aAAA;EACA,uBAAA;EACA,mBAAA;EACA,gBAAA;EACA,WAAA;EACA,iBAAA;EACA,kBAAA;EACA,gBAAA;;AAnDN,kBAQE,mBAmCE,mCAUE;EACE,gBAAA;EACA,iBAAA;EACA,kBAAA;EACA,QAAA;EACA,YAAA;EACA,WAAA;EACA,YAAA;;AAEA,kBAtDN,mBAmCE,mCAUE,MASG;EACC,MAAA;EACA,SAAA;EACA,OAAA;EACA,QAAA;EAEA,gBAAA;EACA,YAAA;EACA,WAAA","file":"wooccm.css"}
|
|
assets/{css → frontend/css}/wooccm.css
RENAMED
@@ -24,7 +24,7 @@
|
|
24 |
direction: ltr;
|
25 |
cursor: pointer;
|
26 |
}
|
27 |
-
.
|
28 |
margin: 0 -5px;
|
29 |
padding: 0;
|
30 |
display: flex;
|
@@ -32,7 +32,7 @@
|
|
32 |
align-items: center;
|
33 |
justify-content: start;
|
34 |
}
|
35 |
-
.
|
36 |
display: flex;
|
37 |
justify-content: center;
|
38 |
align-items: stretch;
|
@@ -41,7 +41,7 @@
|
|
41 |
width: 25%;
|
42 |
position: relative;
|
43 |
}
|
44 |
-
.
|
45 |
z-index: 1;
|
46 |
position: absolute;
|
47 |
top: 2px;
|
@@ -59,11 +59,11 @@
|
|
59 |
cursor: pointer;
|
60 |
font-family: code;
|
61 |
}
|
62 |
-
.
|
63 |
width: 100%;
|
64 |
overflow: hidden;
|
65 |
}
|
66 |
-
.
|
67 |
display: flex;
|
68 |
justify-content: center;
|
69 |
align-items: center;
|
@@ -73,7 +73,7 @@
|
|
73 |
position: relative;
|
74 |
background: #eee;
|
75 |
}
|
76 |
-
.
|
77 |
overflow: hidden;
|
78 |
object-fit: cover;
|
79 |
position: absolute;
|
@@ -82,7 +82,7 @@
|
|
82 |
height: 40%;
|
83 |
opacity: 0.8;
|
84 |
}
|
85 |
-
.
|
86 |
top: 0;
|
87 |
bottom: 0;
|
88 |
left: 0;
|
24 |
direction: ltr;
|
25 |
cursor: pointer;
|
26 |
}
|
27 |
+
.wooccm-file-list {
|
28 |
margin: 0 -5px;
|
29 |
padding: 0;
|
30 |
display: flex;
|
32 |
align-items: center;
|
33 |
justify-content: start;
|
34 |
}
|
35 |
+
.wooccm-file-list .wooccm-file-file {
|
36 |
display: flex;
|
37 |
justify-content: center;
|
38 |
align-items: stretch;
|
41 |
width: 25%;
|
42 |
position: relative;
|
43 |
}
|
44 |
+
.wooccm-file-list .wooccm-file-file .wooccm-file-list-delete {
|
45 |
z-index: 1;
|
46 |
position: absolute;
|
47 |
top: 2px;
|
59 |
cursor: pointer;
|
60 |
font-family: code;
|
61 |
}
|
62 |
+
.wooccm-file-list .wooccm-file-file .wooccm-file-list-container {
|
63 |
width: 100%;
|
64 |
overflow: hidden;
|
65 |
}
|
66 |
+
.wooccm-file-list .wooccm-file-file .wooccm-file-list-image-container {
|
67 |
display: flex;
|
68 |
justify-content: center;
|
69 |
align-items: center;
|
73 |
position: relative;
|
74 |
background: #eee;
|
75 |
}
|
76 |
+
.wooccm-file-list .wooccm-file-file .wooccm-file-list-image-container > img {
|
77 |
overflow: hidden;
|
78 |
object-fit: cover;
|
79 |
position: absolute;
|
82 |
height: 40%;
|
83 |
opacity: 0.8;
|
84 |
}
|
85 |
+
.wooccm-file-list .wooccm-file-file .wooccm-file-list-image-container > img.image {
|
86 |
top: 0;
|
87 |
bottom: 0;
|
88 |
left: 0;
|
assets/frontend/css/wooccm.css.map
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
{"version":3,"sources":["../../less/wooccm.less"],"names":[],"mappings":"AAKI,YALS,KAEX,iBAGG;AACC,YANO,KAEX,iBAIK;EACD,SAAQ,EAAR;EACA,cAAA;;AAEF,YAVS,KAEX,iBAQG;EACC,WAAA;;AAXN,YAAa,KAeX;EACE,aAAA;;AAMF,OAAC;EACC,kBAAA;EACA,0BAAA;;AAFF,OAAC,iBAIC;EACE,kBAAA;EACA,MAAA;EACA,QAAA;EACA,SAAA;EACA,UAAA;EACA,YAAW,kBAAX;EACA,gBAAA;EACA,cAAA;EACA,eAAA;;AAMN;EACE,cAAA;EACA,UAAA;EACA,aAAA;EACA,eAAA;EACA,mBAAA;EACA,sBAAA;;AANF,iBAQE;EACE,aAAA;EACA,uBAAA;EACA,oBAAA;EACA,sBAAA;EACA,uBAAA;EACA,UAAA;EAEA,kBAAA;;AAhBJ,iBAQE,kBAWE;EACE,UAAA;EACA,kBAAA;EACA,QAAA;EACA,WAAA;EACA,WAAA;EACA,YAAA;EACA,sBAAA;EACA,cAAA;EACA,iBAAA;EACA,kBAAA;EACA,cAAA;EACA,gBAAA;EACA,kBAAA;EACA,eAAA;EACA,eAAA;EACA,iBAAA;;AAnCN,iBAQE,kBA8BE;EACE,WAAA;EACA,gBAAA;;AAxCN,iBAQE,kBAmCE;EACE,aAAA;EACA,uBAAA;EACA,mBAAA;EACA,gBAAA;EACA,WAAA;EACA,iBAAA;EACA,kBAAA;EACA,gBAAA;;AAnDN,iBAQE,kBAmCE,kCAUE;EACE,gBAAA;EACA,iBAAA;EACA,kBAAA;EACA,QAAA;EACA,YAAA;EACA,WAAA;EACA,YAAA;;AAEA,iBAtDN,kBAmCE,kCAUE,MASG;EACC,MAAA;EACA,SAAA;EACA,OAAA;EACA,QAAA;EAEA,gBAAA;EACA,YAAA;EACA,WAAA","file":"wooccm.css"}
|
assets/{css → frontend/css}/wooccm.min.css
RENAMED
File without changes
|
assets/{js → frontend/js}/wooccm-checkout.js
RENAMED
@@ -47,10 +47,10 @@
|
|
47 |
}
|
48 |
|
49 |
|
50 |
-
var html = '<span data-file_id="' + i + '" title="' + name + '" class="
|
51 |
-
<span class="
|
52 |
-
<a title="' + name + '" class="
|
53 |
-
<span class="
|
54 |
<img class="' + source_class + '" alt="' + name + '" src="' + source + '"/>\n\
|
55 |
</span>\n\
|
56 |
</span>\n\
|
@@ -101,12 +101,12 @@
|
|
101 |
// ---------------------------------------------------------------------------
|
102 |
|
103 |
var fileList = [];
|
104 |
-
$('.
|
105 |
|
106 |
var $field = $(field),
|
107 |
$button_file = $field.find('[type=file]'),
|
108 |
-
$button_click = $field.find('.
|
109 |
-
$field_list = $field.find('.
|
110 |
fileList[$field.attr('id')] = [];
|
111 |
// Simulate click
|
112 |
// -------------------------------------------------------------------------
|
@@ -118,8 +118,8 @@
|
|
118 |
// Delete images
|
119 |
// ---------------------------------------------------------------------------
|
120 |
|
121 |
-
$field_list.on('click', '.
|
122 |
-
$(this).closest('.
|
123 |
});
|
124 |
// Append images
|
125 |
// -------------------------------------------------------------------------
|
@@ -167,7 +167,7 @@
|
|
167 |
|
168 |
var $order_review = $(e.target),
|
169 |
$place_order = $order_review.find('#place_order'),
|
170 |
-
$fields = $('.
|
171 |
fields = $fields.length;
|
172 |
if (fields) {
|
173 |
$place_order.addClass('wooccm-upload-process');
|
@@ -183,13 +183,13 @@
|
|
183 |
var $form = $('form.checkout'),
|
184 |
$place_order = $(this),
|
185 |
//$results = $('#wooccm_checkout_attachment_results'),
|
186 |
-
$fields = $('.
|
187 |
fields = $fields.length;
|
188 |
$fields.each(function (i, field) {
|
189 |
|
190 |
var $field = $(field),
|
191 |
-
$attachment_ids = $field.find('.
|
192 |
-
$field_list = $field.find('.
|
193 |
|
194 |
if (window.FormData && fileList[$field.attr('id')].length) {
|
195 |
|
@@ -238,7 +238,7 @@
|
|
238 |
success: function (response) {
|
239 |
//$results.removeClass('woocommerce-message');
|
240 |
if (response.success) {
|
241 |
-
//
|
242 |
$attachment_ids.val(response.data);
|
243 |
} else {
|
244 |
$('body').trigger('update_checkout');
|
@@ -272,7 +272,7 @@
|
|
272 |
// Update checkout fees
|
273 |
// ---------------------------------------------------------------------------
|
274 |
|
275 |
-
$(document).on('change', '.wooccm-add-
|
276 |
$('body').trigger('update_checkout');
|
277 |
});
|
278 |
|
@@ -283,7 +283,7 @@
|
|
283 |
|
284 |
var $field = $(field),
|
285 |
$parent = $('#' + $field.find('[data-conditional-parent]').data('conditional-parent') + '_field'),
|
286 |
-
show_if_value = $field.find('[data-conditional-parent-value]').data('conditional-parent-value');
|
287 |
|
288 |
if ($parent.length) {
|
289 |
|
47 |
}
|
48 |
|
49 |
|
50 |
+
var html = '<span data-file_id="' + i + '" title="' + name + '" class="wooccm-file-file">\n\
|
51 |
+
<span class="wooccm-file-list-container">\n\
|
52 |
+
<a title="' + name + '" class="wooccm-file-list-delete">×</a>\n\
|
53 |
+
<span class="wooccm-file-list-image-container">\n\
|
54 |
<img class="' + source_class + '" alt="' + name + '" src="' + source + '"/>\n\
|
55 |
</span>\n\
|
56 |
</span>\n\
|
101 |
// ---------------------------------------------------------------------------
|
102 |
|
103 |
var fileList = [];
|
104 |
+
$('.wooccm-type-file').each(function (i, field) {
|
105 |
|
106 |
var $field = $(field),
|
107 |
$button_file = $field.find('[type=file]'),
|
108 |
+
$button_click = $field.find('.wooccm-file-button'),
|
109 |
+
$field_list = $field.find('.wooccm-file-list');
|
110 |
fileList[$field.attr('id')] = [];
|
111 |
// Simulate click
|
112 |
// -------------------------------------------------------------------------
|
118 |
// Delete images
|
119 |
// ---------------------------------------------------------------------------
|
120 |
|
121 |
+
$field_list.on('click', '.wooccm-file-list-delete', function (e) {
|
122 |
+
$(this).closest('.wooccm-file-file').remove();
|
123 |
});
|
124 |
// Append images
|
125 |
// -------------------------------------------------------------------------
|
167 |
|
168 |
var $order_review = $(e.target),
|
169 |
$place_order = $order_review.find('#place_order'),
|
170 |
+
$fields = $('.wooccm-type-file'),
|
171 |
fields = $fields.length;
|
172 |
if (fields) {
|
173 |
$place_order.addClass('wooccm-upload-process');
|
183 |
var $form = $('form.checkout'),
|
184 |
$place_order = $(this),
|
185 |
//$results = $('#wooccm_checkout_attachment_results'),
|
186 |
+
$fields = $('.wooccm-type-file'),
|
187 |
fields = $fields.length;
|
188 |
$fields.each(function (i, field) {
|
189 |
|
190 |
var $field = $(field),
|
191 |
+
$attachment_ids = $field.find('.wooccm-file-field'),
|
192 |
+
$field_list = $field.find('.wooccm-file-list'); //,
|
193 |
|
194 |
if (window.FormData && fileList[$field.attr('id')].length) {
|
195 |
|
238 |
success: function (response) {
|
239 |
//$results.removeClass('woocommerce-message');
|
240 |
if (response.success) {
|
241 |
+
//alert(response.data);
|
242 |
$attachment_ids.val(response.data);
|
243 |
} else {
|
244 |
$('body').trigger('update_checkout');
|
272 |
// Update checkout fees
|
273 |
// ---------------------------------------------------------------------------
|
274 |
|
275 |
+
$(document).on('change', '.wooccm-add-price', function (e) {
|
276 |
$('body').trigger('update_checkout');
|
277 |
});
|
278 |
|
283 |
|
284 |
var $field = $(field),
|
285 |
$parent = $('#' + $field.find('[data-conditional-parent]').data('conditional-parent') + '_field'),
|
286 |
+
show_if_value = $field.find('[data-conditional-parent-value]').data('conditional-parent-value').toString();
|
287 |
|
288 |
if ($parent.length) {
|
289 |
|
assets/frontend/js/wooccm-checkout.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(function(e){var f=function(h){return h.is(".processing")||h.parents(".processing").length};var g=function(h){if(!f(h)){h.addClass("processing").block({message:null,overlayCSS:{background:"#fff",opacity:0.6}})}};var a=function(h){h.removeClass("processing").unblock()};var d=function(n,l,m,h,k){var o=e(n),p;if(k.match("image.*")){p="image"}else{if(k.match("application/ms.*")){m=wooccm_upload.icons.spreadsheet;p="spreadsheet"}else{if(k.match("application/x.*")){m=wooccm_upload.icons.archive;p="application"}else{if(k.match("audio.*")){m=wooccm_upload.icons.audio;p="audio"}else{if(k.match("text.*")){m=wooccm_upload.icons.text;p="text"}else{if(k.match("video.*")){m=wooccm_upload.icons.video;p="video"}else{m=wooccm_upload.icons.interactive;p="interactive"}}}}}}var j='<span data-file_id="'+l+'" title="'+h+'" class="wooccm-file-file">\n <span class="wooccm-file-list-container">\n <a title="'+h+'" class="wooccm-file-list-delete">×</a>\n <span class="wooccm-file-list-image-container">\n <img class="'+p+'" alt="'+h+'" src="'+m+'"/>\n </span>\n </span>\n </span>';o.append(j).fadeIn()};function b(i,h){if(h){i.find("label .optional").remove();i.addClass("validate-required");if(i.find("label .required").length===0){i.find("label").append(' <abbr class="required" title="'+wc_address_i18n_params.i18n_required_text+'">*</abbr>')}}else{i.find("label .required").remove();i.removeClass("validate-required woocommerce-invalid woocommerce-invalid-required-field");if(i.find("label .optional").length===0){i.find("label").append(' <span class="optional">('+wc_address_i18n_params.i18n_optional_text+")</span>")}}}e(document).on("country_to_state_changing",function(i,k,m){var j=m,h;var l=e.parseJSON(wc_address_i18n_params.locale_fields);e.each(l,function(n,o){var p=j.find(o),q=p.find("[data-required]").data("required")||0;b(p,q)})});var c=[];e(".wooccm-type-file").each(function(j,m){var k=e(m),l=k.find("[type=file]"),h=k.find(".wooccm-file-button"),n=k.find(".wooccm-file-list");c[k.attr("id")]=[];h.on("click",function(i){i.preventDefault();l.trigger("click")});n.on("click",".wooccm-file-list-delete",function(i){e(this).closest(".wooccm-file-file").remove()});l.on("change",function(o){var i=e(this)[0].files;if(i.length){if(window.FileReader){e.each(i,function(q,p){var r=n.find("span[data-file_id]").length+q;if(r>=wooccm_upload.limit.max_files){alert("Exeeds max files limit of "+wooccm_upload.limit.max_files);return false}if(p.size>wooccm_upload.limit.max_file_size){alert("Exeeds max file size of "+wooccm_upload.limit.max_file_size);return true}reader=new FileReader();reader.onload=(function(s){return function(t){setTimeout(function(){d(n,c[k.attr("id")].push(p)-1,t.target.result,s.name,s.type)},200)}})(p);console.log(p.name);reader.readAsDataURL(p)})}}})});e("#order_review").on("ajaxSuccess",function(l){var k=e(l.target),j=k.find("#place_order"),i=e(".wooccm-type-file"),h=i.length;if(h){j.addClass("wooccm-upload-process")}});e(document).on("click","#place_order.wooccm-upload-process",function(l){l.preventDefault();var i=e("form.checkout"),k=e(this),j=e(".wooccm-type-file"),h=j.length;j.each(function(m,p){var n=e(p),r=n.find(".wooccm-file-field"),q=n.find(".wooccm-file-list");if(window.FormData&&c[n.attr("id")].length){if(!f(i)){k.html(wooccm_upload.message.uploading);g(i)}var o=new FormData();q.find("span[data-file_id]").each(function(t,s){var u=e(s).data("file_id");if(t>wooccm_upload.limit.max_files){console.log("Exeeds max files limit of "+wooccm_upload.limit.max_files);return false}if(c[n.attr("id")][u]===undefined){console.log("Undefined "+u);return true}if(c[n.attr("id")][u].size>wooccm_upload.limit.max_file_size){console.log("Exeeds max file size of "+wooccm_upload.limit.max_files);return true}console.log("We're ready to upload "+c[n.attr("id")][u].name);o.append("wooccm_checkout_attachment_upload[]",c[n.attr("id")][u])});o.append("action","wooccm_checkout_attachment_upload");o.append("nonce",wooccm_upload.nonce);e.ajax({async:false,url:wooccm_upload.ajaxurl,type:"POST",cache:false,data:o,processData:false,contentType:false,beforeSend:function(s){},success:function(s){if(s.success){r.val(s.data)}else{e("body").trigger("update_checkout")}},complete:function(s){h=h-1}})}else{h=h-1}if(h==0){a(i);k.removeClass("wooccm-upload-process").trigger("click")}})});e(document).on("change",".wooccm-add-price",function(h){e("body").trigger("update_checkout")});e(".wooccm-conditional-child").each(function(h,m){var j=e(m),l=e("#"+j.find("[data-conditional-parent]").data("conditional-parent")+"_field"),k=j.find("[data-conditional-parent-value]").data("conditional-parent-value").toString();if(l.length){l.on("wooccm_change change keyup",function(o){var n=e(o.target),i=n.val();if(n.hasClass("select2-selection")){return}if(n.prop("type")=="checkbox"){i=n.is(":checked")}if(k==i||(e.isArray(i)&&i.indexOf(k)>-1)){j.fadeIn()}else{j.fadeOut()}n.off("wooccm_change");n.off("change");n.off("keyup")});l.find("select:first").trigger("wooccm_change");l.find("textarea:first").trigger("wooccm_change");l.find("input[type=button]:first").trigger("wooccm_change");l.find("input[type=radio]:checked:first").trigger("wooccm_change");l.find("input[type=checkbox]:checked:first").trigger("wooccm_change");l.find("input[type=color]:first").trigger("wooccm_change");l.find("input[type=date]:first").trigger("wooccm_change");l.find("input[type=datetime-local]:first").trigger("wooccm_change");l.find("input[type=email]:first").trigger("wooccm_change");l.find("input[type=file]:first").trigger("wooccm_change");l.find("input[type=hidden]:first").trigger("wooccm_change");l.find("input[type=image]:first").trigger("wooccm_change");l.find("input[type=month]:first").trigger("wooccm_change");l.find("input[type=number]:first").trigger("wooccm_change");l.find("input[type=password]:first").trigger("wooccm_change");l.find("input[type=range]:first").trigger("wooccm_change");l.find("input[type=reset]:first").trigger("wooccm_change");l.find("input[type=search]:first").trigger("wooccm_change");l.find("input[type=submit]:first").trigger("wooccm_change");l.find("input[type=tel]:first").trigger("wooccm_change");l.find("input[type=text]:first").trigger("wooccm_change");l.find("input[type=time]:first").trigger("wooccm_change");l.find("input[type=url]:first").trigger("wooccm_change");l.find("input[type=week]:first").trigger("wooccm_change")}else{j.show()}});e(".wooccm-type-datepicker").each(function(h,k){var j=e(k),l=j.find("input[type=text]");if(e.isFunction(e.fn.datepicker)){l.datepicker({dateFormat:l.data("formatdate")||"dd-mm-yy",minDate:l.data("mindate")||undefined,maxDate:l.data("maxdate")||undefined,beforeShowDay:function(n){var i=n.getDay(),m=l.data("disable")||false;if(!m){return[true]}else{return[m[i]!==undefined]}}})}});e(".wooccm-type-timepicker").each(function(h,k){var j=e(k),l=j.find("input[type=text]");if(e.isFunction(e.fn.timepicker)){l.timepicker({showPeriod:true,showLeadingZero:true,hours:l.data("hours")||undefined,minutes:l.data("minutes")||undefined,})}});e(".wooccm-colorpicker-farbtastic").each(function(h,k){var j=e(k),m=j.find("input[type=text]"),l=j.find(".wooccmcolorpicker_container");m.hide();if(e.isFunction(e.fn.farbtastic)){l.farbtastic("#"+m.attr("id"));l.on("click",function(i){m.fadeIn()})}});e(".wooccm-colorpicker-iris").each(function(h,k){var j=e(k),l=j.find("input[type=text]");l.css("color","#fff").css("background",l.val()).hide();l.iris({wccmclass:l.attr("id"),palettes:true,color:"",hide:false,change:function(i,m){l.css("color","#000").css("background",m.color.toString()).fadeIn()}})})})(jQuery);
|
assets/{js → frontend/js}/wooccm-order-upload.js
RENAMED
File without changes
|
assets/{js → frontend/js}/wooccm-order-upload.min.js
RENAMED
File without changes
|
assets/{timepicker → frontend/timepicker}/i18n/i18n.html
RENAMED
File without changes
|
assets/{timepicker → frontend/timepicker}/i18n/jquery.ui.timepicker-cs.js
RENAMED
File without changes
|
assets/{timepicker → frontend/timepicker}/i18n/jquery.ui.timepicker-de.js
RENAMED
File without changes
|
assets/{timepicker → frontend/timepicker}/i18n/jquery.ui.timepicker-es.js
RENAMED
File without changes
|
assets/{timepicker → frontend/timepicker}/i18n/jquery.ui.timepicker-fr.js
RENAMED
File without changes
|
assets/{timepicker → frontend/timepicker}/i18n/jquery.ui.timepicker-hr.js
RENAMED
File without changes
|
assets/{timepicker → frontend/timepicker}/i18n/jquery.ui.timepicker-it.js
RENAMED
File without changes
|
assets/{timepicker → frontend/timepicker}/i18n/jquery.ui.timepicker-ja.js
RENAMED
File without changes
|
assets/{timepicker → frontend/timepicker}/i18n/jquery.ui.timepicker-nl.js
RENAMED
File without changes
|
assets/{timepicker → frontend/timepicker}/i18n/jquery.ui.timepicker-pl.js
RENAMED
File without changes
|
assets/{timepicker → frontend/timepicker}/i18n/jquery.ui.timepicker-pt.js
RENAMED
File without changes
|
assets/{timepicker → frontend/timepicker}/i18n/jquery.ui.timepicker-sl.js
RENAMED
File without changes
|
assets/{timepicker → frontend/timepicker}/i18n/jquery.ui.timepicker-sv.js
RENAMED
File without changes
|
assets/{timepicker → frontend/timepicker}/i18n/jquery.ui.timepicker-tr.js
RENAMED
File without changes
|
assets/{timepicker → frontend/timepicker}/jquery.ui.timepicker.css
RENAMED
File without changes
|
assets/{timepicker → frontend/timepicker}/jquery.ui.timepicker.js
RENAMED
File without changes
|
assets/js/wooccm-admin.min.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
(function(b){b.fn.serializeArrayAll=function(){var f={};var e=this.serializeArray();b.each(e,function(){if(f[this.name]!==undefined){if(!f[this.name].push){f[this.name]=[f[this.name]]}f[this.name].push(this.value||"")}else{f[this.name]=this.value||""}});var d=b("input[type=radio],input[type=checkbox]",this);b.each(d,function(){if(!f.hasOwnProperty(this.name)){f[this.name]=""}});return f};function c(f){var e=b(f).next().is(".hasDatepicker")?"minDate":"maxDate",g="minDate"===e?b(f).next():b(f).prev(),d=b(f).datepicker("getDate");b(g).datepicker("option",e,d);b(f).change()}function a(){return{language:{errorLoading:function(){return wc_enhanced_select_params.i18n_searching},inputTooLong:function(d){var e=d.input.length-d.maximum;if(1===e){return wc_enhanced_select_params.i18n_input_too_long_1}return wc_enhanced_select_params.i18n_input_too_long_n.replace("%qty%",e)},inputTooShort:function(d){var e=d.minimum-d.input.length;if(1===e){return wc_enhanced_select_params.i18n_input_too_short_1}return wc_enhanced_select_params.i18n_input_too_short_n.replace("%qty%",e)},loadingMore:function(){return wc_enhanced_select_params.i18n_load_more},maximumSelected:function(d){if(d.maximum===1){return wc_enhanced_select_params.i18n_selection_too_long_1}return wc_enhanced_select_params.i18n_selection_too_long_n.replace("%qty%",d.maximum)},noResults:function(){return wc_enhanced_select_params.i18n_no_matches},searching:function(){return wc_enhanced_select_params.i18n_searching}}}}b(document).on("wooccm-tab-panels",function(i,h){var g=b(i.target),f=g.find("ul.wc-tabs"),d=f.find('a[href="'+h+'"]');f.show();f.find("a").click(function(k){k.preventDefault();var j=b(this).closest("div.panel-wrap");f.find("li",j).removeClass("active");b(this).parent().addClass("active");b("div.panel",j).hide();b(b(this).attr("href")).show()});if(d.length&&b(d.attr("href")).length){d.click()}else{f.find("li.active").find("a").click()}});b(document).on("wooccm-enhanced-select",function(d){b(".wooccm-enhanced-between-dates").filter(":not(.enhanced)").each(function(){b(this).find("input").datepicker({defaultDate:"",dateFormat:"yy-mm-dd",numberOfMonths:1,showButtonPanel:true,onSelect:function(){c(b(this))}});b(this).find("input").each(function(){c(b(this))})})});b(document).on("wooccm-enhanced-select",function(d){b(".wooccm-enhanced-select").filter(":not(.enhanced)").each(function(){var e=b.extend({minimumResultsForSearch:10,allowClear:b(this).data("allow_clear")?true:false,placeholder:b(this).data("placeholder")},a());b(this).selectWoo(e).addClass("enhanced")});b(".wooccm-product-search").filter(":not(.enhanced)").each(function(){var g={allowClear:b(this).data("allow_clear")?true:false,placeholder:b(this).data("placeholder"),minimumInputLength:b(this).data("minimum_input_length")?b(this).data("minimum_input_length"):"3",escapeMarkup:function(h){return h},ajax:{url:wc_enhanced_select_params.ajax_url,dataType:"json",delay:250,data:function(h){return{term:h.term,action:b(this).data("action")||"wooccm_select_search_products",security:wc_enhanced_select_params.search_products_nonce,selected:b(this).select2("val")||0,exclude:b(this).data("exclude"),include:b(this).data("include"),limit:b(this).data("limit"),display_stock:b(this).data("display_stock")}},processResults:function(i){var h=[];if(i){b.each(i,function(k,j){h.push({id:k,text:j})})}return{results:h}},cache:true}};g=b.extend(g,a());b(this).selectWoo(g).addClass("enhanced");if(b(this).data("sortable")){var f=b(this);var e=b(this).next(".select2-container").find("ul.select2-selection__rendered");e.sortable({placeholder:"ui-state-highlight select2-selection__choice",forcePlaceholderSize:true,items:"li:not(.select2-search__field)",tolerance:"pointer",stop:function(){b(e.find(".select2-selection__choice").get().reverse()).each(function(){var i=b(this).data("data").id;var h=f.find('option[value="'+i+'"]')[0];f.prepend(h)})}})}else{if(b(this).prop("multiple")){b(this).on("change",function(){var h=b(this).children();h.sort(function(j,i){var l=j.text.toLowerCase();var k=i.text.toLowerCase();if(l>k){return 1}if(l<k){return -1}return 0});b(this).html(h)})}}})})})(jQuery);
|
|
assets/js/wooccm-checkout.min.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
(function(e){var f=function(h){return h.is(".processing")||h.parents(".processing").length};var g=function(h){if(!f(h)){h.addClass("processing").block({message:null,overlayCSS:{background:"#fff",opacity:0.6}})}};var a=function(h){h.removeClass("processing").unblock()};var d=function(n,l,m,h,k){var o=e(n),p;if(k.match("image.*")){p="image"}else{if(k.match("application/ms.*")){m=wooccm_upload.icons.spreadsheet;p="spreadsheet"}else{if(k.match("application/x.*")){m=wooccm_upload.icons.archive;p="application"}else{if(k.match("audio.*")){m=wooccm_upload.icons.audio;p="audio"}else{if(k.match("text.*")){m=wooccm_upload.icons.text;p="text"}else{if(k.match("video.*")){m=wooccm_upload.icons.video;p="video"}else{m=wooccm_upload.icons.interactive;p="interactive"}}}}}}var j='<span data-file_id="'+l+'" title="'+h+'" class="wooccmupload_file">\n <span class="wooccmupload_file_container">\n <a title="'+h+'" class="wooccmupload_file_delete" class="wooccm_dele wooccm-btn wooccm-btn-danger">×</a>\n <span class="wooccmupload_file_image_container">\n <img class="'+p+'" alt="'+h+'" src="'+m+'"/>\n </span>\n </span>\n </span>';o.append(j).fadeIn()};function b(i,h){if(h){i.find("label .optional").remove();i.addClass("validate-required");if(i.find("label .required").length===0){i.find("label").append(' <abbr class="required" title="'+wc_address_i18n_params.i18n_required_text+'">*</abbr>')}}else{i.find("label .required").remove();i.removeClass("validate-required woocommerce-invalid woocommerce-invalid-required-field");if(i.find("label .optional").length===0){i.find("label").append(' <span class="optional">('+wc_address_i18n_params.i18n_optional_text+")</span>")}}}e(document).on("country_to_state_changing",function(i,k,m){var j=m,h;var l=e.parseJSON(wc_address_i18n_params.locale_fields);e.each(l,function(n,o){var p=j.find(o),q=p.find("[data-required]").data("required")||0;b(p,q)})});var c=[];e(".wooccmupload-field").each(function(j,m){var k=e(m),l=k.find("[type=file]"),h=k.find(".wooccmupload_button"),n=k.find(".wooccmupload_list");c[k.attr("id")]=[];h.on("click",function(i){i.preventDefault();l.trigger("click")});n.on("click",".wooccmupload_file_delete",function(i){e(this).closest(".wooccmupload_file").remove()});l.on("change",function(o){var i=e(this)[0].files;if(i.length){if(window.FileReader){e.each(i,function(q,p){var r=n.find("span[data-file_id]").length+q;if(r>=wooccm_upload.limit.max_files){alert("Exeeds max files limit of "+wooccm_upload.limit.max_files);return false}if(p.size>wooccm_upload.limit.max_file_size){alert("Exeeds max file size of "+wooccm_upload.limit.max_file_size);return true}reader=new FileReader();reader.onload=(function(s){return function(t){setTimeout(function(){d(n,c[k.attr("id")].push(p)-1,t.target.result,s.name,s.type)},200)}})(p);console.log(p.name);reader.readAsDataURL(p)})}}})});e("#order_review").on("ajaxSuccess",function(l){var k=e(l.target),j=k.find("#place_order"),i=e(".wooccmupload-field"),h=i.length;if(h){j.addClass("wooccm-upload-process")}});e(document).on("click","#place_order.wooccm-upload-process",function(l){l.preventDefault();var i=e("form.checkout"),k=e(this),j=e(".wooccmupload-field"),h=j.length;j.each(function(m,p){var n=e(p),r=n.find(".wooccmupload_field"),q=n.find(".wooccmupload_list");if(window.FormData&&c[n.attr("id")].length){if(!f(i)){k.html(wooccm_upload.message.uploading);g(i)}var o=new FormData();q.find("span[data-file_id]").each(function(t,s){var u=e(s).data("file_id");if(t>wooccm_upload.limit.max_files){console.log("Exeeds max files limit of "+wooccm_upload.limit.max_files);return false}if(c[n.attr("id")][u]===undefined){console.log("Undefined "+u);return true}if(c[n.attr("id")][u].size>wooccm_upload.limit.max_file_size){console.log("Exeeds max file size of "+wooccm_upload.limit.max_files);return true}console.log("We're ready to upload "+c[n.attr("id")][u].name);o.append("wooccm_checkout_attachment_upload[]",c[n.attr("id")][u])});o.append("action","wooccm_checkout_attachment_upload");o.append("nonce",wooccm_upload.nonce);e.ajax({async:false,url:wooccm_upload.ajaxurl,type:"POST",cache:false,data:o,processData:false,contentType:false,beforeSend:function(s){},success:function(s){if(s.success){r.val(s.data)}else{e("body").trigger("update_checkout")}},complete:function(s){h=h-1}})}else{h=h-1}if(h==0){a(i);k.removeClass("wooccm-upload-process").trigger("click")}})});e(document).on("change",".wooccm-add-checkout-fees",function(h){e("body").trigger("update_checkout")});e(".wooccm-conditional-child").each(function(h,m){var j=e(m),l=e("#"+j.find("[data-conditional-parent]").data("conditional-parent")+"_field"),k=j.find("[data-conditional-parent-value]").data("conditional-parent-value");if(l.length){l.on("wooccm_change change keyup",function(o){var n=e(o.target),i=n.val();if(n.hasClass("select2-selection")){return}if(n.prop("type")=="checkbox"){i=n.is(":checked")}if(k==i||(e.isArray(i)&&i.indexOf(k)>-1)){j.fadeIn()}else{j.fadeOut()}n.off("wooccm_change");n.off("change");n.off("keyup")});l.find("select:first").trigger("wooccm_change");l.find("textarea:first").trigger("wooccm_change");l.find("input[type=button]:first").trigger("wooccm_change");l.find("input[type=radio]:checked:first").trigger("wooccm_change");l.find("input[type=checkbox]:checked:first").trigger("wooccm_change");l.find("input[type=color]:first").trigger("wooccm_change");l.find("input[type=date]:first").trigger("wooccm_change");l.find("input[type=datetime-local]:first").trigger("wooccm_change");l.find("input[type=email]:first").trigger("wooccm_change");l.find("input[type=file]:first").trigger("wooccm_change");l.find("input[type=hidden]:first").trigger("wooccm_change");l.find("input[type=image]:first").trigger("wooccm_change");l.find("input[type=month]:first").trigger("wooccm_change");l.find("input[type=number]:first").trigger("wooccm_change");l.find("input[type=password]:first").trigger("wooccm_change");l.find("input[type=range]:first").trigger("wooccm_change");l.find("input[type=reset]:first").trigger("wooccm_change");l.find("input[type=search]:first").trigger("wooccm_change");l.find("input[type=submit]:first").trigger("wooccm_change");l.find("input[type=tel]:first").trigger("wooccm_change");l.find("input[type=text]:first").trigger("wooccm_change");l.find("input[type=time]:first").trigger("wooccm_change");l.find("input[type=url]:first").trigger("wooccm_change");l.find("input[type=week]:first").trigger("wooccm_change")}else{j.show()}});e(".wooccm-type-datepicker").each(function(h,k){var j=e(k),l=j.find("input[type=text]");if(e.isFunction(e.fn.datepicker)){l.datepicker({dateFormat:l.data("formatdate")||"dd-mm-yy",minDate:l.data("mindate")||undefined,maxDate:l.data("maxdate")||undefined,beforeShowDay:function(n){var i=n.getDay(),m=l.data("disable")||false;if(!m){return[true]}else{return[m[i]!==undefined]}}})}});e(".wooccm-type-timepicker").each(function(h,k){var j=e(k),l=j.find("input[type=text]");if(e.isFunction(e.fn.timepicker)){l.timepicker({showPeriod:true,showLeadingZero:true,hours:l.data("hours")||undefined,minutes:l.data("minutes")||undefined,})}});e(".wooccm-colorpicker-farbtastic").each(function(h,k){var j=e(k),m=j.find("input[type=text]"),l=j.find(".wooccmcolorpicker_container");m.hide();if(e.isFunction(e.fn.farbtastic)){l.farbtastic("#"+m.attr("id"));l.on("click",function(i){m.fadeIn()})}});e(".wooccm-colorpicker-iris").each(function(h,k){var j=e(k),l=j.find("input[type=text]");l.css("color","#fff").css("background",l.val()).hide();l.iris({wccmclass:l.attr("id"),palettes:true,color:"",hide:false,change:function(i,m){l.css("color","#000").css("background",m.color.toString()).fadeIn()}})})})(jQuery);
|
|
assets/js/wooccm-field.min.js
DELETED
@@ -1 +0,0 @@
|
|
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 input":"change","change textarea":"change","change select":"change","change .media-modal-change":"render","submit .media-modal-form":"save",},templates:{},initialize:function(){_.bindAll(this,"open","edit","change","load","render","close","save");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-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){console.log(k.data);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-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)},change: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},close:function(j){j.preventDefault();this.undelegateEvents();e(document).off("focusin");e("body").removeClass("modal-open");this.remove()},save:function(m){m.preventDefault();var l=this,k=l.$el.find("#wooccm_modal"),j=k.find(".attachment-details");console.log(l.model.attributes);e.ajax({url:wooccm_field.ajax_url,data:{action:"wooccm_save_field",nonce:wooccm_field.nonce,field_id:l.model.attributes.id,field_data:l.model.attributes},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}}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/less/wooccm-admin.less
DELETED
@@ -1,130 +0,0 @@
|
|
1 |
-
.woocommerce_options_panel {
|
2 |
-
|
3 |
-
.woocommerce-help-tip {
|
4 |
-
margin: 0 0 0 0.5em;
|
5 |
-
}
|
6 |
-
|
7 |
-
.select2-container {
|
8 |
-
width: 50%!important;
|
9 |
-
line-height: 16px;
|
10 |
-
//box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.07);
|
11 |
-
|
12 |
-
.select2-selection--multiple {
|
13 |
-
line-height: 16px;
|
14 |
-
min-height: 30px;
|
15 |
-
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.07);
|
16 |
-
}
|
17 |
-
}
|
18 |
-
|
19 |
-
.select2-container--default .select2-selection--multiple .select2-selection__rendered li {
|
20 |
-
margin: 3px 3px 0 0;
|
21 |
-
}
|
22 |
-
.select2-container--default.select2-container--focus .select2-selection--multiple {
|
23 |
-
border-color: #5b9dd9!important;
|
24 |
-
box-shadow: 0 0 2px rgba(30, 140, 190, 0.8)!important;
|
25 |
-
outline: 2px solid transparent!important;
|
26 |
-
}
|
27 |
-
}
|
28 |
-
|
29 |
-
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context=product-edit-meta-tab-body] .marketplace-suggestion-container, .marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context=product-edit-meta-tab-footer] .marketplace-suggestion-container,
|
30 |
-
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context=product-edit-meta-tab-header] .marketplace-suggestion-container{
|
31 |
-
padding: 1em 1.5em;
|
32 |
-
}
|
33 |
-
|
34 |
-
.marketplace-suggestions-container.showing-suggestion .marketplace-suggestion-container img.marketplace-suggestion-icon {
|
35 |
-
height: 40px;
|
36 |
-
margin: 0;
|
37 |
-
margin-right: 1.5em;
|
38 |
-
-webkit-box-flex: 0;
|
39 |
-
-webkit-flex: 0 0 40px;
|
40 |
-
flex: 0 0 40px;
|
41 |
-
}
|
42 |
-
|
43 |
-
.marketplace-suggestions-container.showing-suggestion .marketplace-suggestion-container .marketplace-suggestion-container-cta {
|
44 |
-
-webkit-box-flex: 1;
|
45 |
-
-webkit-flex: 1 1 30%;
|
46 |
-
flex: 1 1 30%;
|
47 |
-
min-width: 160px;
|
48 |
-
text-align: right;
|
49 |
-
}
|
50 |
-
|
51 |
-
a.suggestion-dismiss::before {
|
52 |
-
font-family: Dashicons;
|
53 |
-
speak: none;
|
54 |
-
font-weight: 400;
|
55 |
-
font-variant: normal;
|
56 |
-
text-transform: none;
|
57 |
-
line-height: 1;
|
58 |
-
-webkit-font-smoothing: antialiased;
|
59 |
-
content: "";
|
60 |
-
text-decoration: none;
|
61 |
-
font-size: 1.5em;
|
62 |
-
}
|
63 |
-
|
64 |
-
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context=product-edit-meta-tab-body] .marketplace-suggestion-container .marketplace-suggestion-container-cta a.button {
|
65 |
-
display: inline-block;
|
66 |
-
min-width: 120px;
|
67 |
-
text-align: center;
|
68 |
-
margin: 0;
|
69 |
-
}
|
70 |
-
|
71 |
-
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context=product-edit-meta-tab-body] {
|
72 |
-
border: none;
|
73 |
-
border-top: 1px solid #eee;
|
74 |
-
border-bottom: 1px solid #eee;
|
75 |
-
}
|
76 |
-
|
77 |
-
.marketplace-suggestions-container.showing-suggestion .marketplace-suggestion-container .marketplace-suggestion-container-cta .suggestion-dismiss {
|
78 |
-
text-decoration: none;
|
79 |
-
position: relative;
|
80 |
-
top: 5px;
|
81 |
-
right: auto;
|
82 |
-
margin-left: 1em;
|
83 |
-
}
|
84 |
-
a.suggestion-dismiss {
|
85 |
-
border: none;
|
86 |
-
box-shadow: none;
|
87 |
-
color: #ddd;
|
88 |
-
}
|
89 |
-
|
90 |
-
.marketplace-suggestions-container.showing-suggestion .marketplace-suggestion-container {
|
91 |
-
-webkit-box-align: start;
|
92 |
-
-webkit-align-items: flex-start;
|
93 |
-
align-items: flex-start;
|
94 |
-
display: -webkit-box;
|
95 |
-
display: -webkit-flex;
|
96 |
-
display: flex;
|
97 |
-
-webkit-box-orient: vertical;
|
98 |
-
-webkit-box-direction: normal;
|
99 |
-
-webkit-flex-direction: column;
|
100 |
-
flex-direction: column;
|
101 |
-
position: relative;
|
102 |
-
}
|
103 |
-
|
104 |
-
.marketplace-suggestions-container.showing-suggestion .marketplace-suggestion-container .marketplace-suggestion-container-content h4 {
|
105 |
-
margin: 0;
|
106 |
-
}
|
107 |
-
|
108 |
-
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context=product-edit-meta-tab-body] .marketplace-suggestion-container .marketplace-suggestion-container-content p {
|
109 |
-
padding: 0;
|
110 |
-
line-height: 1.5;
|
111 |
-
}
|
112 |
-
|
113 |
-
.marketplace-suggestions-container.showing-suggestion .marketplace-suggestion-container .marketplace-suggestion-container-content p {
|
114 |
-
margin: 0;
|
115 |
-
margin-top: 4px;
|
116 |
-
color: #444;
|
117 |
-
}
|
118 |
-
|
119 |
-
@media screen and (min-width: 600px) {
|
120 |
-
|
121 |
-
.marketplace-suggestions-container.showing-suggestion .marketplace-suggestion-container {
|
122 |
-
-webkit-box-align: center;
|
123 |
-
-webkit-align-items: center;
|
124 |
-
align-items: center;
|
125 |
-
-webkit-box-orient: horizontal;
|
126 |
-
-webkit-box-direction: normal;
|
127 |
-
-webkit-flex-direction: row;
|
128 |
-
flex-direction: row;
|
129 |
-
}
|
130 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/less/wooccm.less
DELETED
@@ -1,119 +0,0 @@
|
|
1 |
-
.woocommerce form {
|
2 |
-
|
3 |
-
.wooccm-clearfix {
|
4 |
-
//float: none;
|
5 |
-
//clear:both;
|
6 |
-
&:before,
|
7 |
-
&:after{
|
8 |
-
content:'';
|
9 |
-
display:table;
|
10 |
-
}
|
11 |
-
&:after{
|
12 |
-
clear: both;
|
13 |
-
}
|
14 |
-
}
|
15 |
-
|
16 |
-
.wooccm-conditional-child {
|
17 |
-
display: none;
|
18 |
-
}
|
19 |
-
|
20 |
-
}
|
21 |
-
|
22 |
-
.button {
|
23 |
-
&.fileinput-button {
|
24 |
-
position: relative;
|
25 |
-
overflow: hidden!important;
|
26 |
-
|
27 |
-
input {
|
28 |
-
position: absolute;
|
29 |
-
top: 0;
|
30 |
-
right: 0;
|
31 |
-
margin: 0;
|
32 |
-
opacity: 0;
|
33 |
-
-ms-filter:'alpha(opacity=0)';
|
34 |
-
font-size: 200px;
|
35 |
-
direction: ltr;
|
36 |
-
cursor: pointer;
|
37 |
-
}
|
38 |
-
|
39 |
-
}
|
40 |
-
}
|
41 |
-
|
42 |
-
.wooccmupload_list {
|
43 |
-
margin: 0 -5px;
|
44 |
-
padding: 0;
|
45 |
-
display: flex;
|
46 |
-
flex-wrap: wrap;
|
47 |
-
align-items: center;
|
48 |
-
justify-content: start;
|
49 |
-
|
50 |
-
.wooccmupload_file {
|
51 |
-
display: flex;
|
52 |
-
justify-content: center;
|
53 |
-
align-items: stretch;
|
54 |
-
box-sizing: border-box;
|
55 |
-
padding: 10px 5px 0 5px;
|
56 |
-
width: 25%;
|
57 |
-
//max-height: 90px;
|
58 |
-
position: relative;
|
59 |
-
|
60 |
-
|
61 |
-
.wooccmupload_file_delete {
|
62 |
-
z-index: 1;
|
63 |
-
position: absolute;
|
64 |
-
top: 2px;
|
65 |
-
right: -3px;
|
66 |
-
width: 16px;
|
67 |
-
height: 16px;
|
68 |
-
background-color: #222;
|
69 |
-
display: block;
|
70 |
-
line-height: 16px;
|
71 |
-
text-align: center;
|
72 |
-
color: #fefefe;
|
73 |
-
font-weight: 900;
|
74 |
-
border-radius: 50%;
|
75 |
-
font-size: 12px;
|
76 |
-
cursor: pointer;
|
77 |
-
font-family: code;
|
78 |
-
}
|
79 |
-
|
80 |
-
.wooccmupload_file_container {
|
81 |
-
width: 100%;
|
82 |
-
overflow: hidden;
|
83 |
-
}
|
84 |
-
|
85 |
-
.wooccmupload_file_image_container {
|
86 |
-
display: flex;
|
87 |
-
justify-content: center;
|
88 |
-
align-items: center;
|
89 |
-
overflow: hidden;
|
90 |
-
width: 100%;
|
91 |
-
padding-top: 100%;
|
92 |
-
position: relative;
|
93 |
-
background: #eee;
|
94 |
-
|
95 |
-
> img {
|
96 |
-
overflow: hidden;
|
97 |
-
object-fit: cover;
|
98 |
-
position: absolute;
|
99 |
-
top: 30%;
|
100 |
-
bottom: auto;
|
101 |
-
height: 40%;
|
102 |
-
opacity: 0.8;
|
103 |
-
|
104 |
-
&.image {
|
105 |
-
top: 0;
|
106 |
-
bottom: 0;
|
107 |
-
left: 0;
|
108 |
-
right: 0;
|
109 |
-
max-height: 100%;
|
110 |
-
max-height: 100%;
|
111 |
-
height: 100%;
|
112 |
-
width: 100%;
|
113 |
-
}
|
114 |
-
|
115 |
-
}
|
116 |
-
}
|
117 |
-
}
|
118 |
-
|
119 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/old/backend_css.css
DELETED
@@ -1,370 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
.refreshwooccm {
|
3 |
-
border-top: 10px solid #222;
|
4 |
-
margin-right: 20px;
|
5 |
-
}
|
6 |
-
*/
|
7 |
-
.button.button-hero {
|
8 |
-
padding: 0px 16px;
|
9 |
-
}
|
10 |
-
td.wccs-remove {
|
11 |
-
text-align: center;
|
12 |
-
}
|
13 |
-
td.billing-wccs-remove {
|
14 |
-
text-align: center;
|
15 |
-
}
|
16 |
-
select[readonly] {
|
17 |
-
background-color: #eee;
|
18 |
-
color: #333;
|
19 |
-
}
|
20 |
-
a.billing-wccs-remove-button,
|
21 |
-
a.shipping-wccs-remove-button,
|
22 |
-
a.wccs-remove-button {
|
23 |
-
font-size: 22px;
|
24 |
-
text-align: center;
|
25 |
-
vertical-align: middle;
|
26 |
-
}
|
27 |
-
#general-semi-nav {
|
28 |
-
display: block;
|
29 |
-
clear: both;
|
30 |
-
background-color: #f1f1f1;
|
31 |
-
}
|
32 |
-
#main-nav-left {
|
33 |
-
float: left;
|
34 |
-
position: relative;
|
35 |
-
}
|
36 |
-
#main-nav-left li {
|
37 |
-
margin-bottom: 0;
|
38 |
-
-moz-box-shadow: inset 0 1px 0 #f9f9f9;
|
39 |
-
-webkit-box-shadow: inset 0 1px 0 #f9f9f9;
|
40 |
-
box-shadow: inset 0 1px 0 #f9f9f9;
|
41 |
-
margin-right: 1px;
|
42 |
-
border-bottom: 1px solid #d8d8d8;
|
43 |
-
cursor: pointer;
|
44 |
-
}
|
45 |
-
#main-nav-left li.current {
|
46 |
-
margin-right: 0;
|
47 |
-
}
|
48 |
-
#main-nav-left li a,
|
49 |
-
#main-nav-left ul li a:link,
|
50 |
-
#main-nav-left ul li a:visited {
|
51 |
-
display: block;
|
52 |
-
padding: 10px 10px 10px 10px;
|
53 |
-
background-repeat: no-repeat;
|
54 |
-
background-position: 13px 10px;
|
55 |
-
font-weight: bold;
|
56 |
-
font-size: 12px;
|
57 |
-
text-decoration: none;
|
58 |
-
color: #555;
|
59 |
-
opacity: 0.5;
|
60 |
-
outline: none;
|
61 |
-
}
|
62 |
-
#main-nav-left ul li.current a {
|
63 |
-
background-color: #fcfcfc;
|
64 |
-
color: #646464;
|
65 |
-
opacity: 1;
|
66 |
-
}
|
67 |
-
#content-nav-right h3.heading.address {
|
68 |
-
border-bottom: 0;
|
69 |
-
}
|
70 |
-
#content-nav-right .option.allow {
|
71 |
-
border-bottom: 0;
|
72 |
-
}
|
73 |
-
#content-nav-right .option input,
|
74 |
-
#content-nav-right .option select,
|
75 |
-
#content-nav-right .option textarea {
|
76 |
-
margin-bottom: 9px;
|
77 |
-
/*
|
78 |
-
background-color: #f1f1f1;
|
79 |
-
border: 1px solid;
|
80 |
-
border-color: #ccc #e6e6e6 #e6e6e6 #ccc;
|
81 |
-
padding: 4px;
|
82 |
-
*/
|
83 |
-
width: 340px;
|
84 |
-
font-family: "Lucida Grande", "Lucida Sans Unicode", Arial, Verdana, sans-serif;
|
85 |
-
font-size: inherit;
|
86 |
-
}
|
87 |
-
#content-nav-right .option .full-width {
|
88 |
-
width: 100%;
|
89 |
-
}
|
90 |
-
#content-nav-right .section h3.heading.checkbox {
|
91 |
-
border-bottom: 0;
|
92 |
-
}
|
93 |
-
.option {
|
94 |
-
padding: 10px;
|
95 |
-
border-width: 1px 0;
|
96 |
-
border-style: solid;
|
97 |
-
border-top-color: #fff;
|
98 |
-
border-bottom-color: #dfdfdf;
|
99 |
-
background-color: #f5f5f5;
|
100 |
-
}
|
101 |
-
#content-nav-right .option input[type="radio"] {
|
102 |
-
width: 1%;
|
103 |
-
float:left;
|
104 |
-
margin-right: 14px;
|
105 |
-
}
|
106 |
-
#content-nav-right .option input[type="checkbox"] {
|
107 |
-
width: 10px;
|
108 |
-
float:left;
|
109 |
-
margin-right: 14px;
|
110 |
-
}
|
111 |
-
.info-of {
|
112 |
-
color: #666;
|
113 |
-
font-size: 12px;
|
114 |
-
font-weight: 600;
|
115 |
-
margin-top: -5px;
|
116 |
-
}
|
117 |
-
#content-nav-right.general-vibe {
|
118 |
-
float: left;
|
119 |
-
margin-top: 1px;
|
120 |
-
margin-left: -1px;
|
121 |
-
padding: 0 14px;
|
122 |
-
padding-bottom: 14px;
|
123 |
-
font-family: "Lucida Grande", Sans-serif;
|
124 |
-
background-color: #FCFCFC;
|
125 |
-
border-left: 1px solid #d8d8d8;
|
126 |
-
-moz-box-shadow: inset 0 1px 0 #fff;
|
127 |
-
-webkit-box-shadow: inset 0 1px 0 #fff;
|
128 |
-
box-shadow: inset 0 1px 0 #fff;
|
129 |
-
}
|
130 |
-
#content-nav-right h3.heading {
|
131 |
-
font-family: Arial, Helvetica, sans-serif;
|
132 |
-
margin: 10px 0 10px 0;
|
133 |
-
padding: 7px 0px;
|
134 |
-
border-bottom: 1px solid #e7e7e7;
|
135 |
-
font-size: 13px;
|
136 |
-
font-weight: bold;
|
137 |
-
}
|
138 |
-
#main-nav-left ul {
|
139 |
-
margin-top: 1px;
|
140 |
-
}
|
141 |
-
th.wccm_title {
|
142 |
-
text-align: center;
|
143 |
-
font-weight: bold;
|
144 |
-
font-size: 18px;
|
145 |
-
}
|
146 |
-
.nav-tab {
|
147 |
-
cursor: pointer;
|
148 |
-
}
|
149 |
-
table.widefat.general-semi thead:first-child {
|
150 |
-
border-left: 5px solid #278ab7;
|
151 |
-
}
|
152 |
-
th.hide_stuff_color.daoo,
|
153 |
-
th.add_amount,
|
154 |
-
th.apply_tick {
|
155 |
-
background: #38B3E4;
|
156 |
-
cursor: pointer;
|
157 |
-
}
|
158 |
-
.hide_stuff_color.daoo.current_opener,
|
159 |
-
th.add_amount.current_opener,
|
160 |
-
th.apply_tick.current_opener {
|
161 |
-
background: #FF2876;
|
162 |
-
color: #fff;
|
163 |
-
}
|
164 |
-
th.hide_stuff_days {
|
165 |
-
text-align:center;
|
166 |
-
}
|
167 |
-
input.wccs_submit_button {
|
168 |
-
float: left;
|
169 |
-
margin-bottom: 10px;
|
170 |
-
margin-left: 15px;
|
171 |
-
}
|
172 |
-
.reset_form {
|
173 |
-
float: left;
|
174 |
-
}
|
175 |
-
.import_form,
|
176 |
-
.reset_form {
|
177 |
-
margin-top:10px;
|
178 |
-
}
|
179 |
-
.import_form {
|
180 |
-
float: left;
|
181 |
-
margin-left: 15px;
|
182 |
-
}
|
183 |
-
.wccm_importer {
|
184 |
-
font-size:16px;
|
185 |
-
}
|
186 |
-
#wccs_import_submit {
|
187 |
-
float: left;
|
188 |
-
margin-right:15px;
|
189 |
-
}
|
190 |
-
#wccs_reset_submit {
|
191 |
-
float: left;
|
192 |
-
margin-bottom: 10px;
|
193 |
-
width: inherit;
|
194 |
-
}
|
195 |
-
span.heading_smalla {
|
196 |
-
font-weight:600;
|
197 |
-
float: left;
|
198 |
-
padding-left: 12px;
|
199 |
-
padding-right: 12px;
|
200 |
-
margin-bottom:0.2em;
|
201 |
-
}
|
202 |
-
.updated.jellow p {
|
203 |
-
margin:1em 0;
|
204 |
-
padding-top: 0;
|
205 |
-
}
|
206 |
-
.updated.jellow {
|
207 |
-
border-left: none;
|
208 |
-
text-align: center;
|
209 |
-
padding: 5px;
|
210 |
-
}
|
211 |
-
.button-primary.wccm_importer_submit {
|
212 |
-
margin-top:0.4em;
|
213 |
-
margin-left:12px;
|
214 |
-
display:block;
|
215 |
-
}
|
216 |
-
|
217 |
-
td.shipping-wccs-order.ui-sortable-handle,
|
218 |
-
td.billing-wccs-order.ui-sortable-handle,
|
219 |
-
td.wccs-order.ui-sortable-handle {
|
220 |
-
width: 3%;
|
221 |
-
color: #aaa;
|
222 |
-
text-align: center;
|
223 |
-
vertical-align: middle;
|
224 |
-
}
|
225 |
-
|
226 |
-
td.wccs-remove a:hover,
|
227 |
-
td.billing-wccs-remove a:hover,
|
228 |
-
td.shipping-wccs-remove a:hover {
|
229 |
-
color:red;
|
230 |
-
}
|
231 |
-
td.wccs-remove a,
|
232 |
-
td.billing-wccs-remove a,
|
233 |
-
td.shipping-wccs-remove a {
|
234 |
-
font-size: 20px;
|
235 |
-
font-weight: 700;
|
236 |
-
}
|
237 |
-
.wccs-clone,
|
238 |
-
.billing-wccs-clone,
|
239 |
-
.shipping-wccs-clone {
|
240 |
-
display:none;
|
241 |
-
}
|
242 |
-
#floatright_set .widefat input {
|
243 |
-
float:right;
|
244 |
-
}
|
245 |
-
.wccs_replace {
|
246 |
-
width: 20%;
|
247 |
-
}
|
248 |
-
td.wccs-order,
|
249 |
-
td.billing-wccs-order,
|
250 |
-
td.shipping-wccs-order {
|
251 |
-
cursor:move;
|
252 |
-
}
|
253 |
-
.wccs-table > tbody > tr > td,
|
254 |
-
.billing-wccs-table > tbody > tr > td,
|
255 |
-
.shipping-wccs-table > tbody > tr > td {
|
256 |
-
background: #fff;
|
257 |
-
border: none;
|
258 |
-
padding: 8px;
|
259 |
-
position: relative;
|
260 |
-
vertical-align: middle;
|
261 |
-
text-align: center;
|
262 |
-
}
|
263 |
-
|
264 |
-
table.widefat {
|
265 |
-
background: #FCFCFC;
|
266 |
-
}
|
267 |
-
|
268 |
-
.wccs-table > tbody > tr:last-child td,
|
269 |
-
.billing-wccs-table > tbody > tr:last-child td,
|
270 |
-
.shipping-wccs-table > tbody > tr:last-child td {
|
271 |
-
border-bottom: 0 none;
|
272 |
-
}
|
273 |
-
.wccs-table > tbody > tr td:last-child,
|
274 |
-
.billing-wccs-table > tbody > tr td:last-child,
|
275 |
-
.shipping-wccs-table > tbody > tr td:last-child {
|
276 |
-
border-right: 0 none;
|
277 |
-
}
|
278 |
-
.wccs-table > thead > tr > th,
|
279 |
-
.billing-wccs-table > thead > tr > th,
|
280 |
-
.shipping-wccs-table > thead > tr > th {
|
281 |
-
border: none;
|
282 |
-
text-align: center;
|
283 |
-
}
|
284 |
-
.wccs-table > thead > tr > th:last-child,
|
285 |
-
.billing-wccs-table > thead > tr > th:last-child ,
|
286 |
-
.shipping-wccs-table > thead > tr > th:last-child {
|
287 |
-
border-right: 0 none;
|
288 |
-
}
|
289 |
-
|
290 |
-
.wccs-table tr td.wccs-order,
|
291 |
-
.wccs-table tr td.billing-wccs-order,
|
292 |
-
.wccs-table tr th.billing-wccs-order,
|
293 |
-
.wccs-table tr td.shipping-wccs-order,
|
294 |
-
.wccs-table tr th.shipping-wccs-order {
|
295 |
-
width: 16px;
|
296 |
-
text-align: center;
|
297 |
-
vertical-align: middle;
|
298 |
-
color: #aaa;
|
299 |
-
text-shadow: #fff 0 1px 0;
|
300 |
-
}
|
301 |
-
|
302 |
-
.wccs-table .wccs-remove,
|
303 |
-
.billing-wccs-table .wccs-remove,
|
304 |
-
.shipping-wccs-table .wccs-remove {
|
305 |
-
width: 16px;
|
306 |
-
vertical-align: middle;
|
307 |
-
}
|
308 |
-
.wccs-table input[type="text"],
|
309 |
-
.billing-wccs-table input[type="text"],
|
310 |
-
.shipping-wccs-table input[type="text"] {
|
311 |
-
width: 100%;
|
312 |
-
}
|
313 |
-
.wccs-table tr td.more_toggler1c,
|
314 |
-
.billing-wccs-table tr td.more_toggler1c,
|
315 |
-
.shipping-wccs-table tr td.more_toggler1c {
|
316 |
-
cursor: pointer;
|
317 |
-
}
|
318 |
-
|
319 |
-
.wccs-table-footer,
|
320 |
-
.billing-wccs-table-footer,
|
321 |
-
.shipping-wccs-table-footer {
|
322 |
-
position: relative;
|
323 |
-
overflow: hidden;
|
324 |
-
margin-top: 10px;
|
325 |
-
padding: 8px 0;
|
326 |
-
}
|
327 |
-
.toggle_shower {
|
328 |
-
color: #278ab7;
|
329 |
-
font-weight: 700;
|
330 |
-
}
|
331 |
-
.current_opener {
|
332 |
-
color: red;
|
333 |
-
font-weight: 700;
|
334 |
-
}
|
335 |
-
.spongagge {
|
336 |
-
float: left;
|
337 |
-
position: relative;
|
338 |
-
-moz-transform: rotate(270deg); /* FF3.5+ */
|
339 |
-
-o-transform: rotate(270deg); /* Opera 10.5 */
|
340 |
-
-webkit-transform: rotate(270deg); /* Saf3.1+, Chrome */
|
341 |
-
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3); /* IE6,IE7 */
|
342 |
-
-ms-filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3); /* IE8 */
|
343 |
-
margin-top: -25%;
|
344 |
-
}
|
345 |
-
a.nav-tab.star {
|
346 |
-
background: #fff;
|
347 |
-
}
|
348 |
-
div#star-five img {
|
349 |
-
margin-bottom: -5px;
|
350 |
-
}
|
351 |
-
|
352 |
-
@media screen and (max-width: 680px) {
|
353 |
-
#main-nav-left {
|
354 |
-
width: 24%;
|
355 |
-
min-width:135px;
|
356 |
-
}
|
357 |
-
#content-nav-right {
|
358 |
-
width: 70%;
|
359 |
-
}
|
360 |
-
}
|
361 |
-
|
362 |
-
@media screen and (min-width: 681px) {
|
363 |
-
#main-nav-left {
|
364 |
-
width: 16%;
|
365 |
-
min-width:135px;
|
366 |
-
}
|
367 |
-
#content-nav-right {
|
368 |
-
width: 76%;
|
369 |
-
}
|
370 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/old/billing_script_wccs.js
DELETED
@@ -1,106 +0,0 @@
|
|
1 |
-
// Javascript for adding new field
|
2 |
-
jQuery(document).ready( function() {
|
3 |
-
|
4 |
-
/**
|
5 |
-
* Credits to the Advanced Custom Fields plugin for this code
|
6 |
-
*/
|
7 |
-
|
8 |
-
// Update Order Numbers
|
9 |
-
function billing_update_order_numbers(div) {
|
10 |
-
|
11 |
-
count = parseInt(jQuery('.billing-wccs-table').children('tbody').children('tr.billing-wccs-row').length);
|
12 |
-
div.children('tbody').children('tr.billing-wccs-row').each(function(i) {
|
13 |
-
|
14 |
-
jQuery(this).children('td.billing-wccs-order').html(i+1);
|
15 |
-
|
16 |
-
for( var x = 0; x < count; x++ ) {
|
17 |
-
jQuery(this).children('td.more_toggler1,td.billing-wccs-order-hidden').find('[name]').each(function(){
|
18 |
-
var billing_name = jQuery(this).attr('name').replace('['+x+']','[' + i + ']');
|
19 |
-
jQuery(this).attr('name', billing_name);
|
20 |
-
});
|
21 |
-
jQuery(this).children('td.billing-wccs-order-hidden').find('[value]').each(function(){
|
22 |
-
var billing_name = jQuery(this).attr('value').replace(jQuery(this).val(), i+1);
|
23 |
-
jQuery(this).attr('value', billing_name);
|
24 |
-
});
|
25 |
-
}
|
26 |
-
|
27 |
-
});
|
28 |
-
|
29 |
-
}
|
30 |
-
|
31 |
-
// Make Sortable
|
32 |
-
function billing_make_sortable(div){
|
33 |
-
|
34 |
-
var billing_fixHelper = function(e, ui) {
|
35 |
-
ui.children().each(function() {
|
36 |
-
jQuery(this).width(jQuery(this).width());
|
37 |
-
});
|
38 |
-
return ui;
|
39 |
-
};
|
40 |
-
|
41 |
-
div.children('tbody').unbind('sortable').sortable({
|
42 |
-
update: function(event, ui){
|
43 |
-
billing_update_order_numbers(div);
|
44 |
-
},
|
45 |
-
handle: 'td.billing-wccs-order',
|
46 |
-
helper: billing_fixHelper
|
47 |
-
});
|
48 |
-
}
|
49 |
-
|
50 |
-
var billingdiv = jQuery('.billing-wccs-table'),
|
51 |
-
billing_row_count = billingdiv.children('tbody').children('tr.billing-wccs-row').length;
|
52 |
-
|
53 |
-
// Make the table sortable
|
54 |
-
billing_make_sortable(billingdiv);
|
55 |
-
|
56 |
-
// Add button
|
57 |
-
jQuery('#billing-wccs-add-button').live('click', function(){
|
58 |
-
|
59 |
-
var billingdiv = jQuery('.billing-wccs-table'),
|
60 |
-
billing_row_count = billingdiv.children('tbody').children('tr.billing-wccs-row').length,
|
61 |
-
billing_new_field = billingdiv.children('tbody').children('tr.billing-wccs-clone').clone(false); // Create and add the new field
|
62 |
-
|
63 |
-
billing_new_field.attr( 'class', 'billing-wccs-row' );
|
64 |
-
|
65 |
-
// Update names
|
66 |
-
billing_new_field.find('[name]').each(function(){
|
67 |
-
var billing_count = parseInt(billing_row_count);
|
68 |
-
var billing_name = jQuery(this).attr('name').replace('[999]','[' + billing_count + ']');
|
69 |
-
jQuery(this).attr('name', billing_name);
|
70 |
-
});
|
71 |
-
|
72 |
-
billing_new_field.find('[value]').each(function(){
|
73 |
-
var billing_count = parseInt(billing_row_count);
|
74 |
-
var billing_name = jQuery(this).attr('value').replace('999', billing_count + 1);
|
75 |
-
jQuery(this).attr('value', billing_name);
|
76 |
-
});
|
77 |
-
|
78 |
-
// Add row
|
79 |
-
billingdiv.children('tbody').append(billing_new_field);
|
80 |
-
billing_update_order_numbers(billingdiv);
|
81 |
-
|
82 |
-
// There is now 1 more row
|
83 |
-
billing_row_count ++;
|
84 |
-
|
85 |
-
return false;
|
86 |
-
|
87 |
-
});
|
88 |
-
|
89 |
-
// Remove button
|
90 |
-
jQuery('.billing-wccs-table .billing-wccs-remove-button').live('click', function(e){
|
91 |
-
|
92 |
-
var billingdiv = jQuery('.billing-wccs-table'),
|
93 |
-
tr = jQuery(this).closest('tr');
|
94 |
-
e.preventDefault();
|
95 |
-
var choice = confirm( 'Are you sure you want to delete this Checkout field?' );
|
96 |
-
if( choice ) {
|
97 |
-
tr.animate({'left' : '50px', 'opacity' : 0}, 250, function(){
|
98 |
-
tr.remove();
|
99 |
-
billing_update_order_numbers(billingdiv);
|
100 |
-
});
|
101 |
-
return false;
|
102 |
-
}
|
103 |
-
|
104 |
-
});
|
105 |
-
|
106 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/old/edit-order-uploads-button_style.css
DELETED
@@ -1,66 +0,0 @@
|
|
1 |
-
#files-listing-wccm img {
|
2 |
-
width: 64px;
|
3 |
-
height: 64px;
|
4 |
-
float:left;
|
5 |
-
margin-right: 8px;
|
6 |
-
margin-top: 4px;
|
7 |
-
}
|
8 |
-
#files-listing-wccm {
|
9 |
-
list-style: none;
|
10 |
-
}
|
11 |
-
#wccm_uploader_select {
|
12 |
-
float:left;
|
13 |
-
margin-top: 10px;
|
14 |
-
margin-left: 20px;
|
15 |
-
}
|
16 |
-
#response_wccm {
|
17 |
-
float: right;
|
18 |
-
clear: left;
|
19 |
-
margin-top: -25px;
|
20 |
-
}
|
21 |
-
#wccm_make_smaller {
|
22 |
-
font-size: 80%;
|
23 |
-
}
|
24 |
-
#wccm_save_order_submit {
|
25 |
-
margin-bottom: 30px;
|
26 |
-
}
|
27 |
-
|
28 |
-
.file_upload_delete:before{
|
29 |
-
content: "\f182";
|
30 |
-
font-family: dashicons;
|
31 |
-
margin-right: 5px;
|
32 |
-
}
|
33 |
-
.file_upload_account:before{
|
34 |
-
content: "\f317";
|
35 |
-
font-family: dashicons;
|
36 |
-
margin-right: 5px;
|
37 |
-
}
|
38 |
-
.wooccm-btn{
|
39 |
-
display: inline-block;
|
40 |
-
padding: 6px 12px;
|
41 |
-
margin-bottom: 0;
|
42 |
-
font-size: 14px;
|
43 |
-
font-weight: 400;
|
44 |
-
line-height: 1.42857143;
|
45 |
-
text-align: center;
|
46 |
-
white-space: nowrap;
|
47 |
-
vertical-align: middle;
|
48 |
-
cursor: pointer;
|
49 |
-
-webkit-user-select: none;
|
50 |
-
-moz-user-select: none;
|
51 |
-
-ms-user-select: none;
|
52 |
-
user-select: none;
|
53 |
-
background-image: none;
|
54 |
-
border: 1px solid transparent;
|
55 |
-
border-radius: 4px;
|
56 |
-
}
|
57 |
-
.wooccm-btn-primary {
|
58 |
-
color: #fff;
|
59 |
-
background-color: #428bca;
|
60 |
-
border-color: #357ebd;
|
61 |
-
}
|
62 |
-
.wooccm-btn-danger {
|
63 |
-
color: #fff;
|
64 |
-
background-color: #d9534f;
|
65 |
-
border-color: #d43f3a;
|
66 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/old/edit-order-uploads-file_editing_table.css
DELETED
@@ -1,144 +0,0 @@
|
|
1 |
-
/*Copied from bootstrap */
|
2 |
-
|
3 |
-
.woocommerce_order_items.front_end tbody td {
|
4 |
-
text-align: center;
|
5 |
-
}
|
6 |
-
.woocommerce_order_items.back_end {
|
7 |
-
width:100%;
|
8 |
-
}
|
9 |
-
.woocommerce_order_items.back_end th,
|
10 |
-
.woocommerce_order_items.back_end td {
|
11 |
-
text-align:left;
|
12 |
-
line-height:26px;
|
13 |
-
}
|
14 |
-
.woocommerce_order_items.back_end th.column-actions {
|
15 |
-
padding: .75em 1em;
|
16 |
-
}
|
17 |
-
.woocommerce_order_items.back_end td.column-actions {
|
18 |
-
padding-right:1em;
|
19 |
-
}
|
20 |
-
.woocommerce_order_items.back_end .column-actions {
|
21 |
-
text-align:right;
|
22 |
-
}
|
23 |
-
|
24 |
-
.btn {
|
25 |
-
display: inline-block;
|
26 |
-
padding: 6px 12px;
|
27 |
-
margin-bottom: 0;
|
28 |
-
font-size: 14px;
|
29 |
-
font-weight: normal;
|
30 |
-
line-height: 1.42857143;
|
31 |
-
text-align: center;
|
32 |
-
white-space: nowrap;
|
33 |
-
vertical-align: middle;
|
34 |
-
cursor: pointer;
|
35 |
-
-webkit-user-select: none;
|
36 |
-
-moz-user-select: none;
|
37 |
-
-ms-user-select: none;
|
38 |
-
user-select: none;
|
39 |
-
background-image: none;
|
40 |
-
border: 1px solid transparent;
|
41 |
-
border-radius: 4px;
|
42 |
-
}
|
43 |
-
/*Also */
|
44 |
-
.btn-success {
|
45 |
-
color: #fff;
|
46 |
-
background-color: #5cb85c;
|
47 |
-
border-color: #4cae4c;
|
48 |
-
}
|
49 |
-
/* This is copied from https://github.com/blueimp/jQuery-File-Upload/blob/master/css/jquery.fileupload.css */
|
50 |
-
.fileinput-button {
|
51 |
-
position: relative;
|
52 |
-
overflow: hidden;
|
53 |
-
}
|
54 |
-
/*Also*/
|
55 |
-
.fileinput-button input {
|
56 |
-
position: absolute;
|
57 |
-
top: 0;
|
58 |
-
right: 0;
|
59 |
-
margin: 0;
|
60 |
-
opacity: 0;
|
61 |
-
-ms-filter:'alpha(opacity=0)';
|
62 |
-
font-size: 200px;
|
63 |
-
direction: ltr;
|
64 |
-
cursor: pointer;
|
65 |
-
}
|
66 |
-
|
67 |
-
.image.wccm_filesli span {
|
68 |
-
text-align: center;
|
69 |
-
word-wrap: break-word;
|
70 |
-
}
|
71 |
-
|
72 |
-
.file_size_wccm {
|
73 |
-
display: inline-block;
|
74 |
-
width: 15%;
|
75 |
-
float: left;
|
76 |
-
}
|
77 |
-
|
78 |
-
.product_images.ui-sortable .image {
|
79 |
-
clear: both;
|
80 |
-
text-align: center;
|
81 |
-
}
|
82 |
-
.product_images.ui-sortable .image img {
|
83 |
-
width: 75px;
|
84 |
-
height: 75px;
|
85 |
-
}
|
86 |
-
.image.wccm_filesli li {
|
87 |
-
margin-left: 0;
|
88 |
-
}
|
89 |
-
.image.wccm_filesli {
|
90 |
-
clear: both;
|
91 |
-
margin-left: 0;
|
92 |
-
}
|
93 |
-
|
94 |
-
#wccm_name {
|
95 |
-
float: right;
|
96 |
-
}
|
97 |
-
.tips.wccm_delete {
|
98 |
-
cursor: pointer;
|
99 |
-
}
|
100 |
-
.add_product_images .button {
|
101 |
-
float: left;
|
102 |
-
margin: 10px 10px 0 0;
|
103 |
-
}
|
104 |
-
#wccm_align_right_file {
|
105 |
-
float:left;
|
106 |
-
}
|
107 |
-
#wccm_save_order_submit {
|
108 |
-
float: left;
|
109 |
-
margin-left: 10px;
|
110 |
-
margin-top: 10px;
|
111 |
-
}
|
112 |
-
.wccm_results {
|
113 |
-
float: left;
|
114 |
-
margin-left: 20px;
|
115 |
-
font-weight: bold;
|
116 |
-
margin-top: 13px;
|
117 |
-
}
|
118 |
-
.product_images.front_end {
|
119 |
-
margin: 0;
|
120 |
-
list-style: none;
|
121 |
-
}
|
122 |
-
.delete_action_wccm ul {
|
123 |
-
list-style: none;
|
124 |
-
margin: 0;
|
125 |
-
}
|
126 |
-
#wccm_save_order_submit.front_end {
|
127 |
-
clear: both;
|
128 |
-
margin-bottom: 20px;
|
129 |
-
}
|
130 |
-
.woocommerce_order_items_wrapper.front_end table.woocommerce_order_items thead th {
|
131 |
-
background: #f5f5f5;
|
132 |
-
padding: 8px;
|
133 |
-
font-size: 11px;
|
134 |
-
text-align: center;
|
135 |
-
font-weight: bold;
|
136 |
-
}
|
137 |
-
.woocommerce_order_items.front_end {
|
138 |
-
border-collapse: separate;
|
139 |
-
border-spacing: 2px;
|
140 |
-
border-color: gray;
|
141 |
-
}
|
142 |
-
#woocommerce-order-files tbody.product_images td {
|
143 |
-
border-top:0;
|
144 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/old/script_wccs.js
DELETED
@@ -1,318 +0,0 @@
|
|
1 |
-
jQuery(document).ready(function() {
|
2 |
-
|
3 |
-
jQuery(function () {
|
4 |
-
|
5 |
-
jQuery(".show_hide2").click(function() {
|
6 |
-
jQuery('.widefat th div span',this).toggleClass('current_opener');
|
7 |
-
jQuery(this).next().toggle();
|
8 |
-
if( jQuery('.slidingDiv2').length > 1) {
|
9 |
-
jQuery('.slidingDiv2 :vissible').hide();
|
10 |
-
jQuery(this).next().show();
|
11 |
-
}
|
12 |
-
});
|
13 |
-
|
14 |
-
});
|
15 |
-
|
16 |
-
});
|
17 |
-
|
18 |
-
jQuery(document).ready(function(){
|
19 |
-
|
20 |
-
jQuery(".hide_stuff_change_tog").click(function(){
|
21 |
-
jQuery(".hide_stuff_change_tog span").toggleClass('current_opener');
|
22 |
-
jQuery(".hide_stuff_change").slideToggle(0);
|
23 |
-
});
|
24 |
-
|
25 |
-
});
|
26 |
-
|
27 |
-
jQuery(document).ready(function(){
|
28 |
-
|
29 |
-
jQuery("a.nav-tab.general-tab").click(function(){
|
30 |
-
jQuery("a.nav-tab.billing-tab,a.nav-tab.shipping-tab,a.nav-tab.additional-tab").removeClass('nav-tab-active');
|
31 |
-
jQuery(".address_fields_class,.checkout_notice_class,.custom_css_class,.order_notes_class,.switches_class,.advanced_class").removeClass('current');
|
32 |
-
jQuery(this).addClass('nav-tab-active');
|
33 |
-
jQuery(".upload_class").addClass('current');
|
34 |
-
jQuery("#content-nav-right").addClass('general-vibe');
|
35 |
-
jQuery(".save-billing, .save-shipping, .billing-semi,.shipping-semi,.additional-semi,.colorpicker-semi").hide();
|
36 |
-
jQuery("#content-nav-right").width( '76%' );
|
37 |
-
jQuery(".save-additional, #main-nav-left,.upload_files").show();
|
38 |
-
});
|
39 |
-
|
40 |
-
jQuery("a.nav-tab.billing-tab").click(function(){
|
41 |
-
jQuery("a.nav-tab.general-tab,a.nav-tab.shipping-tab,a.nav-tab.additional-tab").removeClass('nav-tab-active');
|
42 |
-
jQuery(this).addClass('nav-tab-active');
|
43 |
-
jQuery("#content-nav-right").removeClass('general-vibe');
|
44 |
-
jQuery(".save-additional, .save-shipping, .general-semi,.shipping-semi,.additional-semi,#main-nav-left,.upload_files,.colorpicker-semi").hide();
|
45 |
-
jQuery(".save-billing, .billing-semi").show();
|
46 |
-
});
|
47 |
-
|
48 |
-
jQuery("a.nav-tab.shipping-tab").click(function(){
|
49 |
-
jQuery("a.nav-tab.general-tab,a.nav-tab.billing-tab,a.nav-tab.additional-tab").removeClass('nav-tab-active');
|
50 |
-
jQuery(this).addClass('nav-tab-active');
|
51 |
-
jQuery("#content-nav-right").removeClass('general-vibe');
|
52 |
-
jQuery(".save-additional, .save-billing, .general-semi,.billing-semi,.additional-semi,#main-nav-left,.upload_files,.colorpicker-semi").hide();
|
53 |
-
jQuery(".save-shipping, .shipping-semi").show();
|
54 |
-
});
|
55 |
-
|
56 |
-
jQuery("a.nav-tab.additional-tab").click(function(){
|
57 |
-
jQuery("a.nav-tab.general-tab,a.nav-tab.billing-tab,a.nav-tab.shipping-tab").removeClass('nav-tab-active');
|
58 |
-
jQuery(this).addClass('nav-tab-active');
|
59 |
-
jQuery("#content-nav-right").removeClass('general-vibe');
|
60 |
-
jQuery(".save-billing, .save-shipping, .general-semi,.billing-semi,.shipping-semi,.upload_files,#main-nav-left").hide();
|
61 |
-
jQuery("#content-nav-right").width( '100%' );
|
62 |
-
jQuery(".save-additional, .additional-semi").show();
|
63 |
-
});
|
64 |
-
|
65 |
-
jQuery(".upload_class").click(function(){
|
66 |
-
jQuery(".address_fields_class,.checkout_notice_class,.switches_class,.order_notes_class,.custom_css_class,.advanced_class").removeClass('current');
|
67 |
-
jQuery(this).addClass('current');
|
68 |
-
jQuery(".address_fields,.checkout_notices,.switches,.custom_css,.order_notes,.advanced").hide();
|
69 |
-
jQuery(".upload_files").show();
|
70 |
-
});
|
71 |
-
|
72 |
-
jQuery(".address_fields_class").click(function(){
|
73 |
-
jQuery(".checkout_notice_class,.upload_class,.switches_class,.order_notes_class,.custom_css_class,.advanced_class").removeClass('current');
|
74 |
-
jQuery(this).addClass('current');
|
75 |
-
jQuery(".checkout_notices,.switches,.upload_files,.custom_css,.order_notes,.advanced").hide();
|
76 |
-
jQuery(".address_fields").show();
|
77 |
-
});
|
78 |
-
|
79 |
-
jQuery(".checkout_notice_class").click(function(){
|
80 |
-
jQuery(".address_fields_class,.upload_class,.switches_class,.order_notes_class,.custom_css_class,.advanced_class").removeClass('current');
|
81 |
-
jQuery(this).addClass('current');
|
82 |
-
jQuery(".address_fields,.upload_files,.switches,.custom_css,.order_notes,.advanced").hide();
|
83 |
-
jQuery(".checkout_notices").show();
|
84 |
-
});
|
85 |
-
|
86 |
-
jQuery(".switches_class").click(function(){
|
87 |
-
jQuery(".address_fields_class,.checkout_notice_class,.upload_class,.order_notes_class,.custom_css_class,.advanced_class").removeClass('current');
|
88 |
-
jQuery(this).addClass('current');
|
89 |
-
jQuery(".address_fields,.checkout_notices,.upload_files,.custom_css,.order_notes,.advanced").hide();
|
90 |
-
jQuery(".switches").show();
|
91 |
-
});
|
92 |
-
|
93 |
-
jQuery(".order_notes_class").click(function(){
|
94 |
-
jQuery(".address_fields_class,.checkout_notice_class,.upload_class,.switches_class,.custom_css_class,.advanced_class").removeClass('current');
|
95 |
-
jQuery(this).addClass('current');
|
96 |
-
jQuery(".address_fields,.checkout_notices,.upload_files,.switches,.custom_css,.advanced").hide();
|
97 |
-
jQuery(".order_notes").show();
|
98 |
-
});
|
99 |
-
|
100 |
-
jQuery(".custom_css_class").click(function(){
|
101 |
-
jQuery(".address_fields_class,.checkout_notice_class,.upload_class,.switches_class,.order_notes_class,.advanced_class").removeClass('current');
|
102 |
-
jQuery(this).addClass('current');
|
103 |
-
jQuery(".address_fields,.checkout_notices,.upload_files,.switches,.order_notes,.advanced").hide();
|
104 |
-
jQuery(".custom_css").show();
|
105 |
-
});
|
106 |
-
|
107 |
-
jQuery(".advanced_class").click(function(){
|
108 |
-
jQuery(".address_fields_class,.checkout_notice_class,.upload_class,.switches_class,.order_notes_class,.advanced_class,.custom_css_class").removeClass('current');
|
109 |
-
jQuery(this).addClass('current');
|
110 |
-
jQuery(".address_fields,.checkout_notices,.upload_files,.switches,.order_notes,.custom_css").hide();
|
111 |
-
jQuery(".advanced").show();
|
112 |
-
});
|
113 |
-
|
114 |
-
// Confirmation prompt on button actions
|
115 |
-
jQuery('.refreshwooccm .advanced a.confirm-button').click(function(e){
|
116 |
-
e.preventDefault();
|
117 |
-
var choice = confirm(jQuery(this).attr('data-confirm'));
|
118 |
-
if( choice ) {
|
119 |
-
window.location.href = jQuery(this).attr('href');
|
120 |
-
}
|
121 |
-
});
|
122 |
-
|
123 |
-
|
124 |
-
});
|
125 |
-
|
126 |
-
jQuery(document).ready(function(){
|
127 |
-
|
128 |
-
jQuery("th.daoo").click(function(){
|
129 |
-
jQuery("th.daoo").toggleClass('current_opener');
|
130 |
-
jQuery(".hide_stuff_days").slideToggle(0);
|
131 |
-
});
|
132 |
-
|
133 |
-
});
|
134 |
-
|
135 |
-
jQuery(document).ready(function(){
|
136 |
-
|
137 |
-
jQuery("th.add_amount").click(function(){
|
138 |
-
jQuery("th.add_amount").toggleClass('current_opener');
|
139 |
-
jQuery(".add_amount_field").slideToggle(0);
|
140 |
-
});
|
141 |
-
|
142 |
-
});
|
143 |
-
|
144 |
-
jQuery(document).ready(function(){
|
145 |
-
|
146 |
-
jQuery("th.apply_tick").click(function(){
|
147 |
-
jQuery("th.apply_tick").toggleClass('current_opener');
|
148 |
-
jQuery(".condition_tick").slideToggle(0);
|
149 |
-
});
|
150 |
-
|
151 |
-
});
|
152 |
-
|
153 |
-
jQuery(document).ready(function(){
|
154 |
-
|
155 |
-
jQuery(".more_toggler").click(function(){
|
156 |
-
jQuery(".more_toggler span").toggleClass('current_opener');
|
157 |
-
jQuery(".more_toggler1").slideToggle(0);
|
158 |
-
});
|
159 |
-
|
160 |
-
});
|
161 |
-
|
162 |
-
jQuery(document).ready(function(){
|
163 |
-
|
164 |
-
jQuery(".filter_field_tog").click(function(){
|
165 |
-
jQuery(".filter_field_tog span").toggleClass('current_opener');
|
166 |
-
jQuery(".filter_field").slideToggle(0);
|
167 |
-
});
|
168 |
-
|
169 |
-
});
|
170 |
-
|
171 |
-
jQuery(document).ready(function(){
|
172 |
-
|
173 |
-
jQuery(".more_toggler1a").click(function(){
|
174 |
-
jQuery(".more_toggler1a span").toggleClass('current_opener');
|
175 |
-
jQuery(".more_toggler1c").slideToggle(0);
|
176 |
-
});
|
177 |
-
|
178 |
-
});
|
179 |
-
|
180 |
-
jQuery(document).ready(function(){
|
181 |
-
|
182 |
-
jQuery(".hide_stuff_color_tog").click(function(){
|
183 |
-
jQuery(".hide_stuff_color_tog span").toggleClass('current_opener');
|
184 |
-
jQuery(".hide_stuff_color").slideToggle(0);
|
185 |
-
});
|
186 |
-
|
187 |
-
});
|
188 |
-
|
189 |
-
jQuery(document).ready(function(){
|
190 |
-
|
191 |
-
jQuery(".hide_stuff_tog").click(function(){
|
192 |
-
jQuery(".hide_stuff_tog span").toggleClass('current_opener');
|
193 |
-
jQuery(".hide_stuff_op").slideToggle(0);
|
194 |
-
});
|
195 |
-
|
196 |
-
});
|
197 |
-
|
198 |
-
jQuery(document).ready(function(){
|
199 |
-
|
200 |
-
jQuery(".hide_stuff_time_tog").click(function(){
|
201 |
-
jQuery(".hide_stuff_time_tog span").toggleClass('current_opener');
|
202 |
-
jQuery(".hide_stuff_time").slideToggle(0);
|
203 |
-
});
|
204 |
-
|
205 |
-
});
|
206 |
-
|
207 |
-
jQuery(document).ready(function(){
|
208 |
-
|
209 |
-
jQuery(".hide_stuff_togcheck").click(function(){
|
210 |
-
jQuery(".hide_stuff_togcheck span").toggleClass('current_opener');
|
211 |
-
jQuery(".hide_stuff_opcheck").slideToggle(0);
|
212 |
-
});
|
213 |
-
|
214 |
-
});
|
215 |
-
|
216 |
-
// Javascript for adding new field
|
217 |
-
jQuery(document).ready( function() {
|
218 |
-
|
219 |
-
// Update Order Numbers
|
220 |
-
function update_order_numbers(div) {
|
221 |
-
|
222 |
-
count = parseInt(jQuery('.wccs-table').children('tbody').children('tr.wccs-row').length);
|
223 |
-
div.children('tbody').children('tr.wccs-row').each(function(i) {
|
224 |
-
|
225 |
-
jQuery(this).children('td.wccs-order').html(i+1);
|
226 |
-
|
227 |
-
for( var x = 0; x < count; x++ ) {
|
228 |
-
jQuery(this).children('td.more_toggler1,td.wccs-order-hidden').find('[name]').each(function(){
|
229 |
-
var name = jQuery(this).attr('name').replace('['+x+']','[' + i + ']');
|
230 |
-
jQuery(this).attr('name', name);
|
231 |
-
});
|
232 |
-
jQuery(this).children('td.wccs-order-hidden').find('[value]').each(function(){
|
233 |
-
var name = jQuery(this).attr('value').replace(jQuery(this).val(), i+1);
|
234 |
-
jQuery(this).attr('value', name);
|
235 |
-
});
|
236 |
-
}
|
237 |
-
|
238 |
-
});
|
239 |
-
|
240 |
-
}
|
241 |
-
|
242 |
-
// Make Sortable
|
243 |
-
function make_sortable(div){
|
244 |
-
|
245 |
-
var fixHelper = function(e, ui) {
|
246 |
-
ui.children().each(function() {
|
247 |
-
jQuery(this).width(jQuery(this).width());
|
248 |
-
});
|
249 |
-
return ui;
|
250 |
-
};
|
251 |
-
|
252 |
-
div.children('tbody').unbind('sortable').sortable({
|
253 |
-
update: function(event, ui){
|
254 |
-
update_order_numbers(div);
|
255 |
-
},
|
256 |
-
handle: 'td.wccs-order',
|
257 |
-
helper: fixHelper
|
258 |
-
});
|
259 |
-
|
260 |
-
}
|
261 |
-
|
262 |
-
var div = jQuery('.wccs-table'),
|
263 |
-
row_count = div.children('tbody').children('tr.wccs-row').length;
|
264 |
-
|
265 |
-
// Make the table sortable
|
266 |
-
make_sortable(div);
|
267 |
-
|
268 |
-
// Add button
|
269 |
-
jQuery('#wccs-add-button').live('click', function(){
|
270 |
-
|
271 |
-
var div = jQuery('.wccs-table'),
|
272 |
-
row_count = div.children('tbody').children('tr.wccs-row').length,
|
273 |
-
new_field = div.children('tbody').children('tr.wccs-clone').clone(false); // Create and add the new field
|
274 |
-
|
275 |
-
new_field.attr( 'class', 'wccs-row' );
|
276 |
-
|
277 |
-
// Update names
|
278 |
-
new_field.find('[name]').each(function(){
|
279 |
-
var count = parseInt(row_count);
|
280 |
-
var name = jQuery(this).attr('name').replace('[999]','[' + count + ']');
|
281 |
-
jQuery(this).attr('name', name);
|
282 |
-
});
|
283 |
-
|
284 |
-
new_field.find('[value]').each(function(){
|
285 |
-
var count = parseInt(row_count);
|
286 |
-
var name = jQuery(this).attr('value').replace('999', count + 1);
|
287 |
-
jQuery(this).attr('value', name);
|
288 |
-
});
|
289 |
-
|
290 |
-
// Add row
|
291 |
-
div.children('tbody').append(new_field);
|
292 |
-
update_order_numbers(div);
|
293 |
-
|
294 |
-
// There is now 1 more row
|
295 |
-
row_count ++;
|
296 |
-
|
297 |
-
return false;
|
298 |
-
|
299 |
-
});
|
300 |
-
|
301 |
-
// Remove button
|
302 |
-
jQuery('.wccs-table .wccs-remove-button').live('click', function(e){
|
303 |
-
|
304 |
-
var div = jQuery('.wccs-table');
|
305 |
-
tr = jQuery(this).closest('tr');
|
306 |
-
e.preventDefault();
|
307 |
-
var choice = confirm( 'Are you sure you want to delete this Checkout field?' );
|
308 |
-
if( choice ) {
|
309 |
-
tr.animate({'left' : '50px', 'opacity' : 0}, 250, function(){
|
310 |
-
tr.remove();
|
311 |
-
update_order_numbers(div);
|
312 |
-
});
|
313 |
-
return false;
|
314 |
-
}
|
315 |
-
|
316 |
-
});
|
317 |
-
|
318 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/old/shipping_script_wccs.js
DELETED
@@ -1,106 +0,0 @@
|
|
1 |
-
// Javascript for adding new field
|
2 |
-
jQuery(document).ready( function() {
|
3 |
-
|
4 |
-
/**
|
5 |
-
* Credits to the Advanced Custom Fields plugin for this code
|
6 |
-
*/
|
7 |
-
|
8 |
-
// Update Order Numbers
|
9 |
-
function shipping_update_order_numbers(div) {
|
10 |
-
|
11 |
-
count = parseInt(jQuery('.shipping-wccs-table').children('tbody').children('tr.shipping-wccs-row').length);
|
12 |
-
div.children('tbody').children('tr.shipping-wccs-row').each(function(i) {
|
13 |
-
|
14 |
-
jQuery(this).children('td.shipping-wccs-order').html(i+1);
|
15 |
-
|
16 |
-
for( var x = 0; x < count; x++ ) {
|
17 |
-
jQuery(this).children('td.more_toggler1,td.shipping-wccs-order-hidden').find('[name]').each(function(){
|
18 |
-
var shipping_name = jQuery(this).attr('name').replace('['+x+']','[' + i + ']');
|
19 |
-
jQuery(this).attr('name', shipping_name);
|
20 |
-
});
|
21 |
-
jQuery(this).children('td.shipping-wccs-order-hidden').find('[value]').each(function(){
|
22 |
-
var shipping_name = jQuery(this).attr('value').replace(jQuery(this).val(), i+1);
|
23 |
-
jQuery(this).attr('value', shipping_name);
|
24 |
-
});
|
25 |
-
}
|
26 |
-
|
27 |
-
});
|
28 |
-
|
29 |
-
}
|
30 |
-
|
31 |
-
// Make Sortable
|
32 |
-
function shipping_make_sortable(div){
|
33 |
-
|
34 |
-
var shipping_fixHelper = function(e, ui) {
|
35 |
-
ui.children().each(function() {
|
36 |
-
jQuery(this).width(jQuery(this).width());
|
37 |
-
});
|
38 |
-
return ui;
|
39 |
-
};
|
40 |
-
|
41 |
-
div.children('tbody').unbind('sortable').sortable({
|
42 |
-
update: function(event, ui){
|
43 |
-
shipping_update_order_numbers(div);
|
44 |
-
},
|
45 |
-
handle: 'td.shipping-wccs-order',
|
46 |
-
helper: shipping_fixHelper
|
47 |
-
});
|
48 |
-
}
|
49 |
-
|
50 |
-
var shippingdiv = jQuery('.shipping-wccs-table'),
|
51 |
-
shipping_row_count = shippingdiv.children('tbody').children('tr.shipping-wccs-row').length;
|
52 |
-
|
53 |
-
// Make the table sortable
|
54 |
-
shipping_make_sortable(shippingdiv);
|
55 |
-
|
56 |
-
// Add button
|
57 |
-
jQuery('#shipping-wccs-add-button').live('click', function(){
|
58 |
-
|
59 |
-
var shippingdiv = jQuery('.shipping-wccs-table'),
|
60 |
-
shipping_row_count = shippingdiv.children('tbody').children('tr.shipping-wccs-row').length,
|
61 |
-
shipping_new_field = shippingdiv.children('tbody').children('tr.shipping-wccs-clone').clone(false); // Create and add the new field
|
62 |
-
|
63 |
-
shipping_new_field.attr( 'class', 'shipping-wccs-row' );
|
64 |
-
|
65 |
-
// Update names
|
66 |
-
shipping_new_field.find('[name]').each(function(){
|
67 |
-
var shipping_count = parseInt(shipping_row_count);
|
68 |
-
var shipping_name = jQuery(this).attr('name').replace('[999]','[' + shipping_count + ']');
|
69 |
-
jQuery(this).attr('name', shipping_name);
|
70 |
-
});
|
71 |
-
|
72 |
-
shipping_new_field.find('[value]').each(function(){
|
73 |
-
var shipping_count = parseInt(shipping_row_count);
|
74 |
-
var shipping_name = jQuery(this).attr('value').replace('999', shipping_count + 1);
|
75 |
-
jQuery(this).attr('value', shipping_name);
|
76 |
-
});
|
77 |
-
|
78 |
-
// Add row
|
79 |
-
shippingdiv.children('tbody').append(shipping_new_field);
|
80 |
-
shipping_update_order_numbers(shippingdiv);
|
81 |
-
|
82 |
-
// There is now 1 more row
|
83 |
-
shipping_row_count ++;
|
84 |
-
|
85 |
-
return false;
|
86 |
-
|
87 |
-
});
|
88 |
-
|
89 |
-
// Remove button
|
90 |
-
jQuery('.shipping-wccs-table .shipping-wccs-remove-button').live('click', function(e){
|
91 |
-
|
92 |
-
var shippingdiv = jQuery('.shipping-wccs-table'),
|
93 |
-
tr = jQuery(this).closest('tr');
|
94 |
-
e.preventDefault();
|
95 |
-
var choice = confirm( 'Are you sure you want to delete this Checkout field?' );
|
96 |
-
if( choice ) {
|
97 |
-
tr.animate({'left' : '50px', 'opacity' : 0}, 250, function(){
|
98 |
-
tr.remove();
|
99 |
-
shipping_update_order_numbers(shippingdiv);
|
100 |
-
});
|
101 |
-
return false;
|
102 |
-
}
|
103 |
-
|
104 |
-
});
|
105 |
-
|
106 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/old/woocheckout-export.css
DELETED
@@ -1,72 +0,0 @@
|
|
1 |
-
div#welcome-panel.left {
|
2 |
-
background-color: #fff;
|
3 |
-
}
|
4 |
-
p.about-description.inner {
|
5 |
-
margin-left: 25px;
|
6 |
-
}
|
7 |
-
.welcome-panel-column-container a.button.button-hero {
|
8 |
-
padding: 6px 30px;
|
9 |
-
}
|
10 |
-
.welcome-panel .welcome-panel-column:first-child {
|
11 |
-
float: right;
|
12 |
-
top: -33px;
|
13 |
-
position: relative;
|
14 |
-
bottom: 0;
|
15 |
-
margin-bottom: -33px;
|
16 |
-
width: 0;
|
17 |
-
}
|
18 |
-
p.about-description.heading {
|
19 |
-
float: none;
|
20 |
-
margin-left: 30px;
|
21 |
-
color: black;
|
22 |
-
font-weight: 700;
|
23 |
-
margin-top: 10px;
|
24 |
-
margin-bottom: 8px;
|
25 |
-
}
|
26 |
-
.welcome-panel .about-description {
|
27 |
-
float: left;
|
28 |
-
font-size: 15px;
|
29 |
-
}
|
30 |
-
.welcome-panel .welcome-panel-column-container {
|
31 |
-
clear: none;
|
32 |
-
}
|
33 |
-
.sheet {
|
34 |
-
background-color: #2EA2CC;
|
35 |
-
color: #fff;
|
36 |
-
padding: 1px;
|
37 |
-
margin-top: 20px;
|
38 |
-
margin-bottom: 20px;
|
39 |
-
clear: both;
|
40 |
-
}
|
41 |
-
div#welcome-panel {
|
42 |
-
border: 0;
|
43 |
-
margin-bottom: 0px;
|
44 |
-
background: transparent;
|
45 |
-
}
|
46 |
-
.welcome-panel.heading {
|
47 |
-
padding: 0;
|
48 |
-
}
|
49 |
-
.button:hover {
|
50 |
-
border: 0;
|
51 |
-
}
|
52 |
-
.wp-list-table.widefat {
|
53 |
-
border: 0;
|
54 |
-
}
|
55 |
-
.welcome-panel {
|
56 |
-
padding: 0;
|
57 |
-
}
|
58 |
-
.welcome-panel-content {
|
59 |
-
padding: 10px 0;
|
60 |
-
max-width:100%;
|
61 |
-
}
|
62 |
-
div.sep {
|
63 |
-
border: 1px solid #fff;
|
64 |
-
}
|
65 |
-
.button.view {
|
66 |
-
background-color: #222;
|
67 |
-
border-color: #222;
|
68 |
-
}
|
69 |
-
.button.view:hover {
|
70 |
-
background-color: #222;
|
71 |
-
border: 0;
|
72 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
changelog.txt
DELETED
@@ -1,25 +0,0 @@
|
|
1 |
-
Fifteen ( 15 ) fields types included: Text Input, Text Area, Password, Radio Button, Check Box, Select Options, Date Picker, Time Picker, Color Picker, Heading, Multi-Select, Multi-Checkbox, Country, State, File Picker.
|
2 |
-
|
3 |
-
Compatible with WPML, WooCommerce Print Invoice & Delivery Note, Store Exporter Deluxe, WooCommerce Order/Customer CSV Export.
|
4 |
-
|
5 |
-
Sort Orders by Field Name.
|
6 |
-
Export Orders by Field Name.
|
7 |
-
|
8 |
-
Create fields to remove tax
|
9 |
-
Create fields to add additional amount
|
10 |
-
Display Payment Method and Shipping Method used by customer.
|
11 |
-
Disable any added field from Checkout details page and Order Receipt.
|
12 |
-
|
13 |
-
DatePicker: Change the default format (dd-mm-yy), Set Minimum Date and Maximum Date, Disable days in the week (Sun – Sat).
|
14 |
-
TimePicker: Includes restriction of both start and end hours, set the minutes interval and manually input labels.
|
15 |
-
Display Order Time.
|
16 |
-
|
17 |
-
Re-position the added fields: Before Shipping Form, After Shipping Form, Before Billing Form, After Billing Form or After Order Notes
|
18 |
-
|
19 |
-
= 4.4.0 Beta =
|
20 |
-
* Improvement: woocommerce order upload rebuilt
|
21 |
-
* Improvement: woocommerce checkout upload rebuilt
|
22 |
-
* Improvement: woocommerce order admin upload rebuilt
|
23 |
-
* Improvement: woocommerce register fields rebuilt
|
24 |
-
* Improvement: woocommerce register fields rebuilt
|
25 |
-
* Fix: woocommerce checkout additional fields required
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/admin.php
DELETED
@@ -1,1441 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
if (is_admin()) {
|
3 |
-
|
4 |
-
// backend scripts
|
5 |
-
add_action('admin_enqueue_scripts', 'wooccm_admin_enqueue_scripts');
|
6 |
-
// List of action links on the Plugins screen
|
7 |
-
//add_filter( sprintf( 'plugin_action_links_%s', WOOCCM_RELPATH ), 'wooccm_admin_plugin_actions' );
|
8 |
-
// WordPress Settings screen for WooCheckout
|
9 |
-
add_action('admin_init', 'wooccm_register_settings');
|
10 |
-
// WP Admin Actions
|
11 |
-
add_action('admin_init', 'wooccm_admin_actions');
|
12 |
-
add_action('admin_init', 'wooccm_admin_woocheckout_actions');
|
13 |
-
// Updater notice
|
14 |
-
//1326
|
15 |
-
//add_action('admin_notices', 'wooccm_admin_notices');
|
16 |
-
// Add fields to the Edit Order screen
|
17 |
-
//add_action('woocommerce_admin_order_data_after_billing_address', 'wooccm_admin_edit_order_billing_details');
|
18 |
-
//add_action('woocommerce_admin_order_data_after_shipping_address', 'wooccm_admin_edit_order_shipping_details');
|
19 |
-
//add_action('woocommerce_admin_order_data_after_order_details', 'wooccm_admin_edit_order_additional_details');
|
20 |
-
}
|
21 |
-
|
22 |
-
// Display admin notice on screen load
|
23 |
-
function wooccm_admin_notice($message = '', $priority = 'updated', $screen = '') {
|
24 |
-
|
25 |
-
if ($priority == false || $priority == '')
|
26 |
-
$priority = 'updated';
|
27 |
-
if ($message <> '') {
|
28 |
-
ob_start();
|
29 |
-
wooccm_admin_notice_html($message, $priority, $screen);
|
30 |
-
$output = ob_get_contents();
|
31 |
-
ob_end_clean();
|
32 |
-
// Check if an existing notice is already in queue
|
33 |
-
$existing_notice = get_transient(WOOCCM_PREFIX . '_notice');
|
34 |
-
if ($existing_notice !== false) {
|
35 |
-
$existing_notice = base64_decode($existing_notice);
|
36 |
-
$output = $existing_notice . $output;
|
37 |
-
}
|
38 |
-
set_transient(WOOCCM_PREFIX . '_notice', base64_encode($output), MINUTE_IN_SECONDS);
|
39 |
-
add_action('admin_notices', WOOCCM_PREFIX . '_admin_notice_print');
|
40 |
-
}
|
41 |
-
}
|
42 |
-
|
43 |
-
// HTML template for admin notice
|
44 |
-
function wooccm_admin_notice_html($message = '', $priority = 'updated', $screen = '') {
|
45 |
-
|
46 |
-
// Display admin notice on specific screen
|
47 |
-
if (!empty($screen)) {
|
48 |
-
|
49 |
-
global $pagenow;
|
50 |
-
|
51 |
-
if (is_array($screen)) {
|
52 |
-
if (in_array($pagenow, $screen) == false)
|
53 |
-
return;
|
54 |
-
} else {
|
55 |
-
if ($pagenow <> $screen)
|
56 |
-
return;
|
57 |
-
}
|
58 |
-
}
|
59 |
-
?>
|
60 |
-
<div id="message" class="<?php echo $priority; ?>">
|
61 |
-
<p><?php echo $message; ?></p>
|
62 |
-
</div>
|
63 |
-
<?php
|
64 |
-
}
|
65 |
-
|
66 |
-
// Grabs the WordPress transient that holds the admin notice and prints it
|
67 |
-
function wooccm_admin_notice_print() {
|
68 |
-
|
69 |
-
$output = get_transient(WOOCCM_PREFIX . '_notice');
|
70 |
-
if ($output !== false) {
|
71 |
-
delete_transient(WOOCCM_PREFIX . '_notice');
|
72 |
-
$output = base64_decode($output);
|
73 |
-
echo $output;
|
74 |
-
}
|
75 |
-
}
|
76 |
-
|
77 |
-
// WordPress Administration menu
|
78 |
-
function wooccm_admin_menu() {
|
79 |
-
|
80 |
-
add_menu_page('WooCheckout', 'WooCheckout', 'manage_options', 'woocommerce-checkout-manager', 'wooccm_options_page', 'dashicons-businessman', 57);
|
81 |
-
|
82 |
-
//add_submenu_page('woocommerce-checkout-manager', 'Export', 'Export', 'manage_options', 'wooccm-advance-export', 'wooccm_advance_export');
|
83 |
-
}
|
84 |
-
|
85 |
-
add_action('admin_menu', 'wooccm_admin_menu');
|
86 |
-
|
87 |
-
function wooccm_admin_enqueue_scripts($hook_suffix) {
|
88 |
-
|
89 |
-
if ($hook_suffix == 'toplevel_page_woocommerce-checkout-manager') {
|
90 |
-
wp_enqueue_style('farbtastic');
|
91 |
-
// @mod - We need to check that farbtastic exists
|
92 |
-
wp_enqueue_script('farbtastic', site_url('/wp-admin/js/farbtastic.js'));
|
93 |
-
wp_enqueue_style('wooccm-backend-css', plugins_url('assets/old/backend_css.css', WOOCCM_PLUGIN_FILE));
|
94 |
-
wp_enqueue_script('script_wccs', plugins_url('assets/old/script_wccs.js', WOOCCM_PLUGIN_FILE), array('jquery'), '1.2');
|
95 |
-
wp_enqueue_script('billing_script_wccs', plugins_url('assets/old/billing_script_wccs.js', WOOCCM_PLUGIN_FILE), array('jquery'), '1.2');
|
96 |
-
wp_enqueue_script('shipping_script_wccs', plugins_url('assets/old/shipping_script_wccs.js', WOOCCM_PLUGIN_FILE), array('jquery'), '1.2');
|
97 |
-
if (wp_script_is('jquery-ui-sortable', 'queue') == false)
|
98 |
-
wp_enqueue_script('jquery-ui-sortable');
|
99 |
-
}
|
100 |
-
if ($hook_suffix === 'woocheckout_page_wooccm-advance-export') {
|
101 |
-
wp_enqueue_style('export', plugins_url('assets/old/woocheckout-export.css', WOOCCM_PLUGIN_FILE));
|
102 |
-
}
|
103 |
-
}
|
104 |
-
|
105 |
-
// List of action links on the Plugins screen
|
106 |
-
/* function wooccm_admin_plugin_actions( $links ) {
|
107 |
-
|
108 |
-
$page_url = add_query_arg( 'page', 'woocommerce-checkout-manager', 'admin.php' );
|
109 |
-
$support_url = 'https://wordpress.org/support/plugin/woocommerce-checkout-manager/';
|
110 |
-
|
111 |
-
$plugin_links = array(
|
112 |
-
'<a href="' . $page_url . '">' . __( 'Settings', 'woocommerce-checkout-manager' ) . '</a>',
|
113 |
-
'<a href="' . $support_url . '">' . __( 'Support', 'woocommerce-checkout-manager' ) . '</a>',
|
114 |
-
);
|
115 |
-
return array_merge( $plugin_links, $links );
|
116 |
-
|
117 |
-
} */
|
118 |
-
|
119 |
-
function wooccm_deactivate_plugin_conditional() {
|
120 |
-
|
121 |
-
$name = 'woocommerce-checkout-manager/woocommerce-checkout-manager.php';
|
122 |
-
if (!is_plugin_active('woocommerce/woocommerce.php')) {
|
123 |
-
add_action('admin_notices', 'wooccm_admin_notice_woo');
|
124 |
-
deactivate_plugins($name);
|
125 |
-
}
|
126 |
-
}
|
127 |
-
|
128 |
-
add_action('admin_init', 'wooccm_deactivate_plugin_conditional');
|
129 |
-
|
130 |
-
function wooccm_admin_notice_woo() {
|
131 |
-
|
132 |
-
$message = __('WooCommerce is not active. WooCommerce Checkout Manager requires WooCommerce to be active.', 'woocommerce-checkout-manager');
|
133 |
-
echo '<div class="error"><p><strong>' . $message . '</strong></p></div>';
|
134 |
-
}
|
135 |
-
|
136 |
-
// Global actions
|
137 |
-
function wooccm_admin_actions() {
|
138 |
-
|
139 |
-
// Check the User has the manage_options capability
|
140 |
-
if (current_user_can('manage_options') == false)
|
141 |
-
return;
|
142 |
-
|
143 |
-
// Process any actions
|
144 |
-
$action = ( function_exists('woo_get_action') ? woo_get_action() : false );
|
145 |
-
switch ($action) {
|
146 |
-
|
147 |
-
case 'wooccm_dismiss_beta_notice':
|
148 |
-
// We need to verify the nonce.
|
149 |
-
if (!empty($_GET) && check_admin_referer('wooccm_dismiss_beta_notice')) {
|
150 |
-
add_option(WOOCCM_PREFIX . '_beta_notice', 1);
|
151 |
-
$url = add_query_arg(array('action' => null, '_wpnonce' => null));
|
152 |
-
wp_redirect($url);
|
153 |
-
exit();
|
154 |
-
}
|
155 |
-
break;
|
156 |
-
|
157 |
-
case 'wooccm_dismiss_update_notice':
|
158 |
-
// We need to verify the nonce.
|
159 |
-
if (!empty($_GET) && check_admin_referer('wooccm_dismiss_update_notice')) {
|
160 |
-
update_option(WOOCCM_PREFIX . '_update_notice', 1);
|
161 |
-
$url = add_query_arg(array('action' => null, '_wpnonce' => null));
|
162 |
-
wp_redirect($url);
|
163 |
-
exit();
|
164 |
-
}
|
165 |
-
break;
|
166 |
-
}
|
167 |
-
}
|
168 |
-
|
169 |
-
// Actions limited to the WooCheckout screen
|
170 |
-
function wooccm_admin_woocheckout_actions() {
|
171 |
-
|
172 |
-
// Check the User has the manage_options capability
|
173 |
-
if (current_user_can('manage_options') == false)
|
174 |
-
return;
|
175 |
-
|
176 |
-
// Check that we are on the WooCheckout screen
|
177 |
-
$page = ( isset($_GET['page']) ? sanitize_text_field($_GET['page']) : false );
|
178 |
-
if ($page != 'woocommerce-checkout-manager')
|
179 |
-
return;
|
180 |
-
|
181 |
-
// Process any actions
|
182 |
-
$action = ( function_exists('woo_get_action') ? woo_get_action() : false );
|
183 |
-
switch ($action) {
|
184 |
-
|
185 |
-
// // Reset the Run the updater notice
|
186 |
-
// case 'wooccm_reset_update_notice':
|
187 |
-
// // We need to verify the nonce.
|
188 |
-
// if (!empty($_GET) && check_admin_referer('wooccm_reset_update_notice')) {
|
189 |
-
// delete_option(WOOCCM_PREFIX . '_update_notice');
|
190 |
-
// $url = add_query_arg(array('action' => null, '_wpnonce' => null));
|
191 |
-
// wp_redirect($url);
|
192 |
-
// exit();
|
193 |
-
// }
|
194 |
-
// break;
|
195 |
-
|
196 |
-
case 'wooccm_nuke_options':
|
197 |
-
// We need to verify the nonce.
|
198 |
-
if (!empty($_GET) && check_admin_referer('wooccm_nuke_options')) {
|
199 |
-
// Delete the default options
|
200 |
-
$options = array('settings', 'settings2', 'settings3');
|
201 |
-
foreach ($options as $option)
|
202 |
-
delete_option('wccs_' . $option);
|
203 |
-
// Delete any notices
|
204 |
-
$notices = array('update_notice', 'beta_notice');
|
205 |
-
foreach ($notices as $notice)
|
206 |
-
delete_option(WOOCCM_PREFIX . '_' . $notice);
|
207 |
-
$url = add_query_arg(array('action' => null, '_wpnonce' => null));
|
208 |
-
wp_redirect($url);
|
209 |
-
exit();
|
210 |
-
}
|
211 |
-
break;
|
212 |
-
|
213 |
-
case 'wooccm_nuke_order_meta':
|
214 |
-
// We need to verify the nonce.
|
215 |
-
if (!empty($_GET) && check_admin_referer('wooccm_nuke_order_meta')) {
|
216 |
-
$post_type = 'shop_order';
|
217 |
-
$args = array(
|
218 |
-
'post_type' => $post_type,
|
219 |
-
'post_status' => ( function_exists('wc_get_order_statuses()') ? wc_get_order_statuses() : false ),
|
220 |
-
'fields' => 'ids',
|
221 |
-
'numberposts' => -1
|
222 |
-
);
|
223 |
-
$orders = get_posts($args);
|
224 |
-
if (!empty($orders)) {
|
225 |
-
// Prepare the Post meta name lists for only custom fields
|
226 |
-
$meta_keys = array();
|
227 |
-
|
228 |
-
// Additional section
|
229 |
-
$options = get_option('wccs_settings');
|
230 |
-
$buttons = ( isset($options['buttons']) ? $options['buttons'] : false );
|
231 |
-
if (!empty($buttons)) {
|
232 |
-
foreach ($buttons as $btn) {
|
233 |
-
if (strstr($btn['cow'], 'myfield'))
|
234 |
-
$meta_keys[] = $btn['cow'];
|
235 |
-
}
|
236 |
-
}
|
237 |
-
// Billing section
|
238 |
-
$options = get_option('wccs_settings3');
|
239 |
-
$buttons = ( isset($options['billing_buttons']) ? $options['billing_buttons'] : false );
|
240 |
-
if (!empty($buttons)) {
|
241 |
-
foreach ($buttons as $btn) {
|
242 |
-
if (strstr($btn['cow'], 'myfield'))
|
243 |
-
$meta_keys[] = sprintf('_billing_%s', $btn['cow']);
|
244 |
-
}
|
245 |
-
}
|
246 |
-
// Shipping section
|
247 |
-
$options = get_option('wccs_settings2');
|
248 |
-
$buttons = ( isset($options['shipping_buttons']) ? $options['shipping_buttons'] : false );
|
249 |
-
if (!empty($buttons)) {
|
250 |
-
foreach ($buttons as $btn) {
|
251 |
-
if (strstr($btn['cow'], 'myfield'))
|
252 |
-
$meta_keys[] = sprintf('_shipping_%s', $btn['cow']);
|
253 |
-
}
|
254 |
-
}
|
255 |
-
|
256 |
-
// Do the deed
|
257 |
-
if (!empty($meta_keys)) {
|
258 |
-
foreach ($orders as $order_id) {
|
259 |
-
if (!empty($order_id)) {
|
260 |
-
foreach ($meta_keys as $meta_key)
|
261 |
-
delete_post_meta($order_id, $meta_key);
|
262 |
-
}
|
263 |
-
}
|
264 |
-
}
|
265 |
-
}
|
266 |
-
$url = add_query_arg(array('action' => null, '_wpnonce' => null));
|
267 |
-
wp_redirect($url);
|
268 |
-
exit();
|
269 |
-
}
|
270 |
-
break;
|
271 |
-
|
272 |
-
case 'wooccm_nuke_user_meta':
|
273 |
-
// We need to verify the nonce.
|
274 |
-
if (!empty($_GET) && check_admin_referer('wooccm_nuke_user_meta')) {
|
275 |
-
$args = array(
|
276 |
-
'fields' => array('ID')
|
277 |
-
);
|
278 |
-
$users = get_users($args);
|
279 |
-
if (!empty($users)) {
|
280 |
-
// Prepare the Post meta name lists for only custom fields
|
281 |
-
$meta_keys = array();
|
282 |
-
|
283 |
-
// Additional section
|
284 |
-
$options = get_option('wccs_settings');
|
285 |
-
$buttons = ( isset($options['buttons']) ? $options['buttons'] : false );
|
286 |
-
if (!empty($buttons)) {
|
287 |
-
foreach ($buttons as $btn) {
|
288 |
-
if (strstr($btn['cow'], 'myfield'))
|
289 |
-
$meta_keys[] = $btn['cow'];
|
290 |
-
}
|
291 |
-
}
|
292 |
-
// Billing section
|
293 |
-
$options = get_option('wccs_settings3');
|
294 |
-
$buttons = ( isset($options['billing_buttons']) ? $options['billing_buttons'] : false );
|
295 |
-
if (!empty($buttons)) {
|
296 |
-
foreach ($buttons as $btn) {
|
297 |
-
if (strstr($btn['cow'], 'myfield'))
|
298 |
-
$meta_keys[] = sprintf('billing_%s', $btn['cow']);
|
299 |
-
}
|
300 |
-
}
|
301 |
-
// Shipping section
|
302 |
-
$options = get_option('wccs_settings2');
|
303 |
-
$buttons = ( isset($options['shipping_buttons']) ? $options['shipping_buttons'] : false );
|
304 |
-
if (!empty($buttons)) {
|
305 |
-
foreach ($buttons as $btn) {
|
306 |
-
if (strstr($btn['cow'], 'myfield'))
|
307 |
-
$meta_keys[] = sprintf('shipping_%s', $btn['cow']);
|
308 |
-
}
|
309 |
-
}
|
310 |
-
|
311 |
-
// Do the deed
|
312 |
-
if (!empty($meta_keys)) {
|
313 |
-
foreach ($users as $user_id) {
|
314 |
-
foreach ($meta_keys as $meta_key)
|
315 |
-
delete_user_meta($user_id->ID, $meta_key);
|
316 |
-
}
|
317 |
-
}
|
318 |
-
}
|
319 |
-
$url = add_query_arg(array('action' => null, '_wpnonce' => null));
|
320 |
-
wp_redirect($url);
|
321 |
-
exit();
|
322 |
-
}
|
323 |
-
break;
|
324 |
-
|
325 |
-
case 'wooccm_dismiss_beta_notice':
|
326 |
-
// We need to verify the nonce.
|
327 |
-
if (!empty($_GET) && check_admin_referer('wooccm_dismiss_beta_notice')) {
|
328 |
-
add_option(WOOCCM_PREFIX . '_beta_notice', 1);
|
329 |
-
$url = add_query_arg(array('action' => null, '_wpnonce' => null));
|
330 |
-
wp_redirect($url);
|
331 |
-
exit();
|
332 |
-
}
|
333 |
-
break;
|
334 |
-
|
335 |
-
case 'wooccm_dismiss_update_notice':
|
336 |
-
// We need to verify the nonce.
|
337 |
-
if (!empty($_GET) && check_admin_referer('wooccm_dismiss_update_notice')) {
|
338 |
-
add_option(WOOCCM_PREFIX . '_update_notice', 1);
|
339 |
-
$url = add_query_arg(array('action' => null, '_wpnonce' => null));
|
340 |
-
wp_redirect($url);
|
341 |
-
exit();
|
342 |
-
}
|
343 |
-
break;
|
344 |
-
}
|
345 |
-
}
|
346 |
-
|
347 |
-
if (!function_exists('woo_get_action')) {
|
348 |
-
|
349 |
-
function woo_get_action($prefer_get = false) {
|
350 |
-
|
351 |
-
if (isset($_GET['action']) && $prefer_get)
|
352 |
-
return sanitize_text_field($_GET['action']);
|
353 |
-
|
354 |
-
if (isset($_POST['action']))
|
355 |
-
return sanitize_text_field($_POST['action']);
|
356 |
-
|
357 |
-
if (isset($_GET['action']))
|
358 |
-
return sanitize_text_field($_GET['action']);
|
359 |
-
|
360 |
-
return;
|
361 |
-
}
|
362 |
-
|
363 |
-
}
|
364 |
-
|
365 |
-
// WordPress Settings screen for WooCheckout
|
366 |
-
function wooccm_register_settings() {
|
367 |
-
|
368 |
-
register_setting('wccs_options', 'wccs_settings', 'wooccm_options_validate');
|
369 |
-
register_setting('wccs_options2', 'wccs_settings2', 'wooccm_options_validate_shipping');
|
370 |
-
register_setting('wccs_options3', 'wccs_settings3', 'wooccm_options_validate_billing');
|
371 |
-
}
|
372 |
-
|
373 |
-
function wooccm_options_page() {
|
374 |
-
|
375 |
-
if (!current_user_can('manage_options'))
|
376 |
-
wp_die(__('You do not have sufficient permissions to access this page.', 'woocommerce-checkout-manager'));
|
377 |
-
|
378 |
-
$htmlshippingabbr = array('country', 'first_name', 'last_name', 'company', 'address_1', 'address_2', 'city', 'state', 'postcode');
|
379 |
-
$htmlbillingabbr = array('country', 'first_name', 'last_name', 'company', 'address_1', 'address_2', 'city', 'state', 'postcode', 'email', 'phone');
|
380 |
-
$upload_dir = wp_upload_dir();
|
381 |
-
$hidden_field_name = 'mccs_submit_hidden';
|
382 |
-
$hidden_wccs_reset = "my_new_field_reset";
|
383 |
-
|
384 |
-
// Additional details
|
385 |
-
$options = get_option('wccs_settings');
|
386 |
-
// Shipping details
|
387 |
-
$options2 = get_option('wccs_settings2');
|
388 |
-
// Billing details
|
389 |
-
$options3 = get_option('wccs_settings3');
|
390 |
-
|
391 |
-
// Check if the reset button has been clicked
|
392 |
-
if (
|
393 |
-
isset($_POST[$hidden_wccs_reset]) &&
|
394 |
-
sanitize_text_field($_POST[$hidden_wccs_reset]) == 'Y'
|
395 |
-
) {
|
396 |
-
delete_option('wccs_settings');
|
397 |
-
delete_option('wccs_settings2');
|
398 |
-
delete_option('wccs_settings3');
|
399 |
-
$defaults = array(
|
400 |
-
'checkness' => array(
|
401 |
-
'position' => 'after_billing_form',
|
402 |
-
'wooccm_notification_email' => get_option('admin_email'),
|
403 |
-
'payment_method_t' => true,
|
404 |
-
'shipping_method_t' => true,
|
405 |
-
'payment_method_d' => __('Payment Method', 'woocommerce-checkout-manager'),
|
406 |
-
'shipping_method_d' => __('Shipping Method', 'woocommerce-checkout-manager'),
|
407 |
-
'time_stamp_title' => __('Order Time', 'woocommerce-checkout-manager'),
|
408 |
-
),
|
409 |
-
);
|
410 |
-
|
411 |
-
/* $shipping = array(
|
412 |
-
'country' => __('Country', 'woocommerce-checkout-manager'),
|
413 |
-
'first_name' => __('First Name', 'woocommerce-checkout-manager'),
|
414 |
-
'last_name' => __('Last Name', 'woocommerce-checkout-manager'),
|
415 |
-
'company' => __('Company Name', 'woocommerce-checkout-manager'),
|
416 |
-
'address_1' => __('Address', 'woocommerce-checkout-manager'),
|
417 |
-
'address_2' => '',
|
418 |
-
'city' => __('Town/ City', 'woocommerce-checkout-manager'),
|
419 |
-
'state' => __('State', 'woocommerce-checkout-manager'),
|
420 |
-
'postcode' => __('Zip', 'woocommerce-checkout-manager')
|
421 |
-
);
|
422 |
-
$ship = 0;
|
423 |
-
foreach ($shipping as $name => $value) {
|
424 |
-
|
425 |
-
$defaults2['shipping_buttons'][$ship]['label'] = (!empty($value) ? __($value, 'woocommerce-checkout-manager') : false );
|
426 |
-
$defaults2['shipping_buttons'][$ship]['cow'] = $name;
|
427 |
-
$defaults2['shipping_buttons'][$ship]['checkbox'] = 'true';
|
428 |
-
$defaults2['shipping_buttons'][$ship]['order'] = $ship + 1;
|
429 |
-
$defaults2['shipping_buttons'][$ship]['type'] = 'wooccmtext';
|
430 |
-
|
431 |
-
switch ($name) {
|
432 |
-
|
433 |
-
case 'country':
|
434 |
-
$defaults2['shipping_buttons'][$ship]['position'] = 'form-row-wide';
|
435 |
-
$defaults2['shipping_buttons'][$ship]['type'] = 'wooccmcountry';
|
436 |
-
break;
|
437 |
-
|
438 |
-
case 'first_name':
|
439 |
-
$defaults2['shipping_buttons'][$ship]['position'] = 'form-row-first';
|
440 |
-
break;
|
441 |
-
|
442 |
-
case 'last_name':
|
443 |
-
$defaults2['shipping_buttons'][$ship]['position'] = 'form-row-last';
|
444 |
-
$defaults2['shipping_buttons'][$ship]['clear_row'] = true;
|
445 |
-
break;
|
446 |
-
|
447 |
-
case 'company':
|
448 |
-
$defaults2['shipping_buttons'][$ship]['position'] = 'form-row-wide';
|
449 |
-
break;
|
450 |
-
|
451 |
-
case 'address_1':
|
452 |
-
$defaults2['shipping_buttons'][$ship]['position'] = 'form-row-wide';
|
453 |
-
$defaults2['shipping_buttons'][$ship]['placeholder'] = __('Street address', 'woocommerce-checkout-manager');
|
454 |
-
break;
|
455 |
-
|
456 |
-
case 'address_2':
|
457 |
-
$defaults2['shipping_buttons'][$ship]['position'] = 'form-row-wide';
|
458 |
-
$defaults2['shipping_buttons'][$ship]['placeholder'] = __('Apartment, suite, unit etc. (optional)', 'woocommerce-checkout-manager');
|
459 |
-
$defaults2['shipping_buttons'][$ship]['required'] = false;
|
460 |
-
break;
|
461 |
-
|
462 |
-
case 'city':
|
463 |
-
$defaults2['shipping_buttons'][$ship]['position'] = 'form-row-wide';
|
464 |
-
$defaults2['shipping_buttons'][$ship]['placeholder'] = __('Town / City', 'woocommerce-checkout-manager');
|
465 |
-
break;
|
466 |
-
|
467 |
-
case 'state':
|
468 |
-
$defaults2['shipping_buttons'][$ship]['position'] = 'form-row-wide';
|
469 |
-
$defaults2['shipping_buttons'][$ship]['type'] = 'wooccmstate';
|
470 |
-
break;
|
471 |
-
}
|
472 |
-
|
473 |
-
$ship++;
|
474 |
-
}
|
475 |
-
|
476 |
-
$billing = array(
|
477 |
-
'country' => __('Country', 'woocommerce-checkout-manager'),
|
478 |
-
'first_name' => __('First Name', 'woocommerce-checkout-manager'),
|
479 |
-
'last_name' => __('Last Name', 'woocommerce-checkout-manager'),
|
480 |
-
'company' => __('Company Name', 'woocommerce-checkout-manager'),
|
481 |
-
'address_1' => __('Address', 'woocommerce-checkout-manager'),
|
482 |
-
'address_2' => '',
|
483 |
-
'city' => __('Town/ City', 'woocommerce-checkout-manager'),
|
484 |
-
'state' => __('State', 'woocommerce-checkout-manager'),
|
485 |
-
'postcode' => __('Zip', 'woocommerce-checkout-manager'),
|
486 |
-
'email' => __('Email Address', 'woocommerce-checkout-manager'),
|
487 |
-
'phone' => __('Phone', 'woocommerce-checkout-manager')
|
488 |
-
);
|
489 |
-
|
490 |
-
$bill = 0;
|
491 |
-
|
492 |
-
foreach ($billing as $name => $value) {
|
493 |
-
|
494 |
-
$defaults3['billing_buttons'][$bill]['label'] = (!empty($value) ? __($value, 'woocommerce-checkout-manager') : false );
|
495 |
-
$defaults3['billing_buttons'][$bill]['cow'] = $name;
|
496 |
-
$defaults3['billing_buttons'][$bill]['checkbox'] = 'true';
|
497 |
-
$defaults3['billing_buttons'][$bill]['order'] = $bill + 1;
|
498 |
-
$defaults3['billing_buttons'][$bill]['type'] = 'wooccmtext';
|
499 |
-
|
500 |
-
switch ($name) {
|
501 |
-
|
502 |
-
case 'country':
|
503 |
-
$defaults3['billing_buttons'][$bill]['position'] = 'form-row-wide';
|
504 |
-
$defaults3['billing_buttons'][$bill]['type'] = 'wooccmcountry';
|
505 |
-
break;
|
506 |
-
|
507 |
-
case 'first_name':
|
508 |
-
$defaults3['billing_buttons'][$bill]['position'] = 'form-row-first';
|
509 |
-
break;
|
510 |
-
|
511 |
-
case 'last_name':
|
512 |
-
$defaults3['billing_buttons'][$bill]['position'] = 'form-row-last';
|
513 |
-
$defaults3['billing_buttons'][$bill]['clear_row'] = true;
|
514 |
-
break;
|
515 |
-
|
516 |
-
case 'company':
|
517 |
-
$defaults3['billing_buttons'][$bill]['position'] = 'form-row-wide';
|
518 |
-
break;
|
519 |
-
|
520 |
-
case 'address_1':
|
521 |
-
$defaults3['billing_buttons'][$bill]['position'] = 'form-row-wide';
|
522 |
-
$defaults3['billing_buttons'][$bill]['placeholder'] = __('Street address', 'woocommerce-checkout-manager');
|
523 |
-
break;
|
524 |
-
|
525 |
-
case 'address_2':
|
526 |
-
$defaults3['billing_buttons'][$bill]['position'] = 'form-row-wide';
|
527 |
-
$defaults3['billing_buttons'][$bill]['placeholder'] = __('Apartment, suite, unit etc. (optional)', 'woocommerce-checkout-manager');
|
528 |
-
$defaults3['billing_buttons'][$bill]['checkbox'] = false;
|
529 |
-
|
530 |
-
break;
|
531 |
-
|
532 |
-
case 'city':
|
533 |
-
$defaults3['billing_buttons'][$bill]['position'] = 'form-row-wide';
|
534 |
-
$defaults3['billing_buttons'][$bill]['placeholder'] = __('Town / City', 'woocommerce-checkout-manager');
|
535 |
-
break;
|
536 |
-
|
537 |
-
case 'state':
|
538 |
-
$defaults3['billing_buttons'][$bill]['position'] = 'form-row-wide';
|
539 |
-
$defaults3['billing_buttons'][$bill]['type'] = 'wooccmstate';
|
540 |
-
|
541 |
-
break;
|
542 |
-
|
543 |
-
case 'postcode':
|
544 |
-
$defaults3['billing_buttons'][$bill]['position'] = 'form-row-wide';
|
545 |
-
$defaults3['billing_buttons'][$bill]['placeholder'] = __('Postcode / Zip', 'woocommerce-checkout-manager');
|
546 |
-
$defaults3['billing_buttons'][$bill]['clear_row'] = true;
|
547 |
-
break;
|
548 |
-
|
549 |
-
case 'email':
|
550 |
-
$defaults3['billing_buttons'][$bill]['position'] = 'form-row-first';
|
551 |
-
break;
|
552 |
-
|
553 |
-
case 'phone':
|
554 |
-
$defaults3['billing_buttons'][$bill]['position'] = 'form-row-last';
|
555 |
-
$defaults3['billing_buttons'][$bill]['clear_row'] = true;
|
556 |
-
break;
|
557 |
-
}
|
558 |
-
|
559 |
-
$bill++;
|
560 |
-
} */
|
561 |
-
add_option('wccs_settings', $defaults);
|
562 |
-
//add_option('wccs_settings2', $defaults2);
|
563 |
-
//add_option('wccs_settings3', $defaults3);
|
564 |
-
// @mod - Change this to add_query_arg()
|
565 |
-
echo '
|
566 |
-
<script type="text/javascript">window.location.href="' . admin_url('admin.php?page=woocommerce-checkout-manager') . '";</script>';
|
567 |
-
echo '
|
568 |
-
<noscript><meta http-equiv="refresh" content="0;url=' . admin_url('admin.php?page=woocommerce-checkout-manager') . '" /></noscript>';
|
569 |
-
exit;
|
570 |
-
}
|
571 |
-
echo '
|
572 |
-
<script type="text/javascript" src="' . plugins_url('/woocommerce/assets/js/jquery-blockui/jquery.blockUI.js') . '"></script>';
|
573 |
-
echo '
|
574 |
-
<div class="refreshwooccm">
|
575 |
-
';
|
576 |
-
|
577 |
-
// display error
|
578 |
-
settings_errors();
|
579 |
-
|
580 |
-
// Now display the settings editing screen
|
581 |
-
// header
|
582 |
-
?>
|
583 |
-
<h2><?php _e('WooCommerce Checkout Manager', 'woocommerce-checkout-manager'); ?></h2>
|
584 |
-
<div id="content">
|
585 |
-
|
586 |
-
<h2 class="nav-tab-wrapper add_tip_wrap">
|
587 |
-
<a class="nav-tab general-tab nav-tab-active"><?php _e('General', 'woocommerce-checkout-manager'); ?></a>
|
588 |
-
<a class="nav-tab billing-tab"><?php _e('Billing', 'woocommerce-checkout-manager'); ?></a>
|
589 |
-
<a class="nav-tab shipping-tab"><?php _e('Shipping', 'woocommerce-checkout-manager'); ?></a>
|
590 |
-
<a class="nav-tab additional-tab"><?php _e('Additional', 'woocommerce-checkout-manager'); ?></a>
|
591 |
-
<a class="nav-tab" href="<?php echo esc_url(WOOCCM_SUPPORT_URL); ?>" target="_blank">
|
592 |
-
<?php esc_html_e('Report a bug', 'woocommerce-checkout-manager'); ?>
|
593 |
-
</a>
|
594 |
-
<!--<a class="nav-tab star" href="https://wordpress.org/support/view/plugin-reviews/woocommerce-checkout-manager?filter=5" target="_blank">
|
595 |
-
<div id="star-five" title="<?php _e('Like the plugin? Rate it! On WordPress.org', 'woocommerce-checkout-manager'); ?>">
|
596 |
-
<div class="star-rating">
|
597 |
-
<div class="star star-full"></div>
|
598 |
-
<div class="star star-full"></div>
|
599 |
-
<div class="star star-full"></div>
|
600 |
-
<div class="star star-full"></div>
|
601 |
-
<div class="star star-full"></div>
|
602 |
-
</div>
|
603 |
-
</div>
|
604 |
-
</a>-->
|
605 |
-
</h2>
|
606 |
-
<!-- .nav-tab-wrapper -->
|
607 |
-
|
608 |
-
<?php do_action('wooccm_run_color_innerpicker'); ?>
|
609 |
-
|
610 |
-
<form name="reset_form" class="reset_form" method="post">
|
611 |
-
<input type="hidden" name="<?php echo esc_attr($hidden_wccs_reset); ?>" value="Y">
|
612 |
-
<input type="submit" name="submit" id="wccs_reset_submit" class="button button-hero" value="Reset">
|
613 |
-
</form>
|
614 |
-
|
615 |
-
<script type="text/javascript">
|
616 |
-
jQuery('#wccs_reset_submit').click('click', function () {
|
617 |
-
return window.confirm('<?php echo esc_js(__('Are you sure you wish to reset the settings on this tab for WooCommerce Checkout Manager?', 'woocommerce-checkout-manager')); ?>');
|
618 |
-
});
|
619 |
-
</script>
|
620 |
-
|
621 |
-
<?php require( WOOCCM_PLUGIN_DIR . 'includes/classes/import.php'); ?>
|
622 |
-
|
623 |
-
<div class="wrap">
|
624 |
-
|
625 |
-
<!-- Shipping section -->
|
626 |
-
<form name="wooccmform2" method="post" action="options.php" id="frm2">
|
627 |
-
|
628 |
-
<?php settings_fields('wccs_options2'); ?>
|
629 |
-
|
630 |
-
<input type="submit" id="wccs_submit_button" style="display:none;" name="Submit" class="save-shipping wccs_submit_button button button-primary button-hero" value="<?php _e('Save Changes', 'woocommerce-checkout-manager'); ?>" />
|
631 |
-
|
632 |
-
<?php require( WOOCCM_PLUGIN_DIR . 'includes/templates/admin/woocheckout-shipping.php' ); ?>
|
633 |
-
|
634 |
-
</form>
|
635 |
-
<!-- #frm2 -->
|
636 |
-
|
637 |
-
<!-- Billing section -->
|
638 |
-
<form name="wooccmform3" method="post" action="options.php" id="frm3">
|
639 |
-
|
640 |
-
<?php settings_fields('wccs_options3'); ?>
|
641 |
-
|
642 |
-
<input type="submit" id="wccs_submit_button" name="Submit" style="display:none;" class="save-billing wccs_submit_button button button-primary button-hero" value="<?php _e('Save Changes', 'woocommerce-checkout-manager'); ?>" />
|
643 |
-
|
644 |
-
<?php require( WOOCCM_PLUGIN_DIR . 'includes/templates/admin/woocheckout-billing.php' ); ?>
|
645 |
-
|
646 |
-
</form>
|
647 |
-
<!-- #frm3 -->
|
648 |
-
|
649 |
-
<!-- Additional section -->
|
650 |
-
<form name="wooccmform" method="post" action="options.php" id="frm1">
|
651 |
-
|
652 |
-
<?php settings_fields('wccs_options'); ?>
|
653 |
-
|
654 |
-
<input type="submit" id="wccs_submit_button" name="Submit" class="save-additional wccs_submit_button button button-primary button-hero" value="<?php _e('Save Changes', 'woocommerce-checkout-manager'); ?>" />
|
655 |
-
|
656 |
-
<!-- Additional section -->
|
657 |
-
<?php require( WOOCCM_PLUGIN_DIR . 'includes/templates/admin/woocheckout-additional.php' ); ?>
|
658 |
-
|
659 |
-
<!-- General section -->
|
660 |
-
<?php require( WOOCCM_PLUGIN_DIR . 'includes/templates/admin/woocheckout-general.php' ); ?>
|
661 |
-
|
662 |
-
</form>
|
663 |
-
<!-- #frm1 -->
|
664 |
-
|
665 |
-
</div>
|
666 |
-
<!-- .wrap -->
|
667 |
-
|
668 |
-
</div>
|
669 |
-
<!-- #content -->
|
670 |
-
|
671 |
-
</div>
|
672 |
-
<!-- #refreshwooccm -->
|
673 |
-
|
674 |
-
<?php
|
675 |
-
}
|
676 |
-
|
677 |
-
function wooccm_options_validate($input) {
|
678 |
-
|
679 |
-
$detect_error = 0;
|
680 |
-
// translate additional fields
|
681 |
-
if (!empty($input['buttons'])) {
|
682 |
-
foreach ($input['buttons'] as $i => $btn) {
|
683 |
-
|
684 |
-
if (function_exists('icl_register_string')) {
|
685 |
-
if (!empty($btn['label'])) {
|
686 |
-
icl_register_string('WooCommerce Checkout Manager', $btn['label'], $btn['label']);
|
687 |
-
}
|
688 |
-
if (!empty($btn['placeholder'])) {
|
689 |
-
icl_register_string('WooCommerce Checkout Manager', $btn['placeholder'], $btn['placeholder']);
|
690 |
-
}
|
691 |
-
|
692 |
-
if (!empty($btn['option_array'])) {
|
693 |
-
$mysecureop = explode('||', $btn['option_array']);
|
694 |
-
foreach ($mysecureop as $one) {
|
695 |
-
icl_register_string('WooCommerce Checkout Manager', $one, $one);
|
696 |
-
}
|
697 |
-
}
|
698 |
-
}
|
699 |
-
|
700 |
-
if (!empty($btn['role_options']) && !empty($btn['role_options2'])) {
|
701 |
-
$input['buttons'][$i]['role_options2'] = '';
|
702 |
-
add_settings_error(
|
703 |
-
'wooccm_settings_errors', esc_attr('settings_updated'), __('Sorry! An error occurred. WooCommerce Checkout Manager requires you to not have values in both role options. OK.', 'woocommerce-checkout-manager'), 'error'
|
704 |
-
);
|
705 |
-
}
|
706 |
-
|
707 |
-
if (!empty($btn['single_p']) && !empty($btn['single_px'])) {
|
708 |
-
$input['buttons'][$i]['single_px'] = '';
|
709 |
-
add_settings_error(
|
710 |
-
'wooccm_settings_errors', esc_attr('settings_updated'), __('Sorry! An error occurred. WooCommerce Checkout Manager requires you to not have values in both hidden product options. OK.', 'woocommerce-checkout-manager'), 'error'
|
711 |
-
);
|
712 |
-
}
|
713 |
-
|
714 |
-
if (!empty($btn['single_p_cat']) && !empty($btn['single_px_cat'])) {
|
715 |
-
$input['buttons'][$i]['single_px_cat'] = '';
|
716 |
-
add_settings_error(
|
717 |
-
'wooccm_settings_errors', esc_attr('settings_updated'), __('Sorry! An error occurred. WooCommerce Checkout Manager requires you to not have values in both hidden category options. OK.', 'woocommerce-checkout-manager'), 'error'
|
718 |
-
);
|
719 |
-
}
|
720 |
-
|
721 |
-
if (empty($btn['cow']) && empty($btn['label']) && empty($btn['placeholder'])) {
|
722 |
-
|
723 |
-
unset($input['buttons'][$i]);
|
724 |
-
|
725 |
-
if ($i != 999) {
|
726 |
-
$detect_error++;
|
727 |
-
$fieldnum = $i + 1;
|
728 |
-
add_settings_error(
|
729 |
-
'wooccm_settings_errors', esc_attr('settings_updated'), __('Sorry! An error occurred. WooCommerce Checkout Manager removed Additional field #' . $fieldnum . ' because no Label or Placeholder name was provided.', 'woocommerce-checkout-manager'), 'error'
|
730 |
-
);
|
731 |
-
}
|
732 |
-
}
|
733 |
-
|
734 |
-
if (empty($btn['cow']) && (!empty($btn['label']) || !empty($btn['placeholder']))) {
|
735 |
-
$newNum = $i + 1;
|
736 |
-
if (wooccm_mul_array('myfield' . $newNum, $input['buttons'])) {
|
737 |
-
$input['buttons'][$i]['cow'] = 'myfield' . $newNum . 'c';
|
738 |
-
} else {
|
739 |
-
$input['buttons'][$i]['cow'] = 'myfield' . $newNum;
|
740 |
-
}
|
741 |
-
}
|
742 |
-
|
743 |
-
/* if (!empty($btn['cow']) && empty($btn['label']) && empty($btn['placeholder'])) {
|
744 |
-
|
745 |
-
unset($input['buttons'][$i]);
|
746 |
-
|
747 |
-
if ($i != 999) {
|
748 |
-
$detect_error++;
|
749 |
-
$fieldnum = $i + 1;
|
750 |
-
add_settings_error(
|
751 |
-
'wooccm_settings_errors', esc_attr('settings_updated'), __('Sorry! An error occurred. WooCommerce Checkout Manager removed Additional field #' . $fieldnum . ' because no Label or Placeholder name was provided.', 'woocommerce-checkout-manager'), 'error'
|
752 |
-
);
|
753 |
-
}
|
754 |
-
} */
|
755 |
-
}
|
756 |
-
}
|
757 |
-
if ($detect_error == 0) {
|
758 |
-
add_settings_error(
|
759 |
-
'wooccm_settings_errors', esc_attr('settings_updated'), __('Your changes have been saved.', 'woocommerce-checkout-manager'), 'updated'
|
760 |
-
);
|
761 |
-
}
|
762 |
-
return $input;
|
763 |
-
}
|
764 |
-
|
765 |
-
function wooccm_options_validate_shipping($input) {
|
766 |
-
|
767 |
-
$detect_error = 0;
|
768 |
-
// translate shipping fields
|
769 |
-
if (!empty($input['shipping_buttons'])) {
|
770 |
-
foreach ($input['shipping_buttons'] as $i => $btn) {
|
771 |
-
|
772 |
-
if (function_exists('icl_register_string')) {
|
773 |
-
if (!empty($btn['label'])) {
|
774 |
-
icl_register_string('WooCommerce Checkout Manager', $btn['label'], $btn['label']);
|
775 |
-
}
|
776 |
-
if (!empty($btn['placeholder'])) {
|
777 |
-
icl_register_string('WooCommerce Checkout Manager', $btn['placeholder'], $btn['placeholder']);
|
778 |
-
}
|
779 |
-
|
780 |
-
if (!empty($btn['option_array'])) {
|
781 |
-
$mysecureop = explode('||', $btn['option_array']);
|
782 |
-
foreach ($mysecureop as $one) {
|
783 |
-
icl_register_string('WooCommerce Checkout Manager', $one, $one);
|
784 |
-
}
|
785 |
-
}
|
786 |
-
}
|
787 |
-
|
788 |
-
if (!empty($btn['role_options']) && !empty($btn['role_options2'])) {
|
789 |
-
$input['buttons'][$i]['role_options2'] = '';
|
790 |
-
add_settings_error(
|
791 |
-
'wooccm_settings_errors', esc_attr('settings_updated'), __('Sorry! An error occurred. WooCommerce Checkout Manager requires you to not have values in both role options.', 'woocommerce-checkout-manager'), 'error'
|
792 |
-
);
|
793 |
-
}
|
794 |
-
|
795 |
-
if (!empty($btn['single_p']) && !empty($btn['single_px'])) {
|
796 |
-
$input['buttons'][$i]['single_px'] = '';
|
797 |
-
add_settings_error(
|
798 |
-
'wooccm_settings_errors', esc_attr('settings_updated'), __('Sorry! An error occurred. WooCommerce Checkout Manager requires you to not have values in both hidden product options.', 'woocommerce-checkout-manager'), 'error'
|
799 |
-
);
|
800 |
-
}
|
801 |
-
|
802 |
-
if (!empty($btn['single_p_cat']) && !empty($btn['single_px_cat'])) {
|
803 |
-
$input['buttons'][$i]['single_px_cat'] = '';
|
804 |
-
add_settings_error(
|
805 |
-
'wooccm_settings_errors', esc_attr('settings_updated'), __('Sorry! An error occurred. WooCommerce Checkout Manager requires you to not have values in both hidden category options.', 'woocommerce-checkout-manager'), 'error'
|
806 |
-
);
|
807 |
-
}
|
808 |
-
|
809 |
-
if (empty($btn['cow']) && empty($btn['label']) && empty($btn['placeholder'])) {
|
810 |
-
unset($input['shipping_buttons'][$i]);
|
811 |
-
|
812 |
-
if ($i != 999) {
|
813 |
-
$detect_error++;
|
814 |
-
$fieldnum = $i + 1;
|
815 |
-
add_settings_error(
|
816 |
-
'wooccm_settings_errors', esc_attr('settings_updated'), __('Sorry! An error occurred. WooCommerce Checkout Manager removed Shipping field #' . $fieldnum . ' because no Label or Placeholder name was provided.', 'woocommerce-checkout-manager'), 'error'
|
817 |
-
);
|
818 |
-
}
|
819 |
-
}
|
820 |
-
|
821 |
-
if (empty($btn['cow']) && (!empty($btn['label']) || !empty($btn['placeholder']))) {
|
822 |
-
$newNum = $i + 1;
|
823 |
-
if (wooccm_mul_array('myfield' . $newNum, $input['shipping_buttons'])) {
|
824 |
-
$input['shipping_buttons'][$i]['cow'] = 'myfield' . $newNum . 'c';
|
825 |
-
} else {
|
826 |
-
$input['shipping_buttons'][$i]['cow'] = 'myfield' . $newNum;
|
827 |
-
}
|
828 |
-
}
|
829 |
-
|
830 |
-
/*
|
831 |
-
*
|
832 |
-
* if (!empty($btn['cow']) && empty($btn['label']) && empty($btn['placeholder'])) {
|
833 |
-
unset($input['shipping_buttons'][$i]);
|
834 |
-
|
835 |
-
if ($i != 999) {
|
836 |
-
$detect_error++;
|
837 |
-
$fieldnum = $i + 1;
|
838 |
-
add_settings_error(
|
839 |
-
'wooccm_settings_errors', esc_attr('settings_updated'), __('Sorry! An error occurred. WooCommerce Checkout Manager removed Shipping field #' . $fieldnum . ' because no Label or Placeholder name was provided.', 'woocommerce-checkout-manager'), 'error'
|
840 |
-
);
|
841 |
-
}
|
842 |
-
} */
|
843 |
-
}
|
844 |
-
}
|
845 |
-
|
846 |
-
if ($detect_error == 0) {
|
847 |
-
add_settings_error(
|
848 |
-
'wooccm_settings_errors', esc_attr('settings_updated'), __('Your changes have been saved.', 'woocommerce-checkout-manager'), 'updated'
|
849 |
-
);
|
850 |
-
}
|
851 |
-
|
852 |
-
return $input;
|
853 |
-
}
|
854 |
-
|
855 |
-
function wooccm_options_validate_billing($input) {
|
856 |
-
|
857 |
-
$detect_error = 0;
|
858 |
-
|
859 |
-
// translate billing fields
|
860 |
-
if (!empty($input['billing_buttons'])) {
|
861 |
-
foreach ($input['billing_buttons'] as $i => $btn) {
|
862 |
-
|
863 |
-
if (function_exists('icl_register_string')) {
|
864 |
-
if (!empty($btn['label'])) {
|
865 |
-
icl_register_string('WooCommerce Checkout Manager', $btn['label'], $btn['label']);
|
866 |
-
}
|
867 |
-
if (!empty($btn['placeholder'])) {
|
868 |
-
icl_register_string('WooCommerce Checkout Manager', $btn['placeholder'], $btn['placeholder']);
|
869 |
-
}
|
870 |
-
|
871 |
-
if (!empty($btn['option_array'])) {
|
872 |
-
$mysecureop = explode('||', $btn['option_array']);
|
873 |
-
foreach ($mysecureop as $one) {
|
874 |
-
icl_register_string('WooCommerce Checkout Manager', $one, $one);
|
875 |
-
}
|
876 |
-
}
|
877 |
-
}
|
878 |
-
|
879 |
-
if (!empty($btn['role_options']) && !empty($btn['role_options2'])) {
|
880 |
-
$input['buttons'][$i]['role_options2'] = '';
|
881 |
-
add_settings_error(
|
882 |
-
'wooccm_settings_errors', esc_attr('settings_updated'), __('Sorry! An error occurred. WooCommerce Checkout Manager requires you to not have values in both role options.', 'woocommerce-checkout-manager'), 'error'
|
883 |
-
);
|
884 |
-
}
|
885 |
-
|
886 |
-
if (!empty($btn['single_p']) && !empty($btn['single_px'])) {
|
887 |
-
$input['buttons'][$i]['single_px'] = '';
|
888 |
-
add_settings_error(
|
889 |
-
'wooccm_settings_errors', esc_attr('settings_updated'), __('Sorry! An error occurred. WooCommerce Checkout Manager requires you to not have values in both hidden product options.', 'woocommerce-checkout-manager'), 'error'
|
890 |
-
);
|
891 |
-
}
|
892 |
-
|
893 |
-
if (!empty($btn['single_p_cat']) && !empty($btn['single_px_cat'])) {
|
894 |
-
$input['buttons'][$i]['single_px_cat'] = '';
|
895 |
-
add_settings_error(
|
896 |
-
'wooccm_settings_errors', esc_attr('settings_updated'), __('Sorry! An error occurred. WooCommerce Checkout Manager requires you to not have values in both hidden category options.', 'woocommerce-checkout-manager'), 'error'
|
897 |
-
);
|
898 |
-
}
|
899 |
-
|
900 |
-
if (empty($btn['cow']) && empty($btn['label']) && empty($btn['placeholder'])) {
|
901 |
-
unset($input['billing_buttons'][$i]);
|
902 |
-
|
903 |
-
if ($i != 999) {
|
904 |
-
$detect_error++;
|
905 |
-
$fieldnum = $i + 1;
|
906 |
-
add_settings_error(
|
907 |
-
'wooccm_settings_errors', esc_attr('settings_updated'), __('Sorry! An error occurred. WooCommerce Checkout Manager removed Billing field #' . $fieldnum . ' because no Label or Placeholder name was provided.', 'woocommerce-checkout-manager'), 'error'
|
908 |
-
);
|
909 |
-
}
|
910 |
-
}
|
911 |
-
|
912 |
-
if (empty($btn['cow']) && (!empty($btn['label']) || !empty($btn['placeholder']))) {
|
913 |
-
|
914 |
-
$newNum = $i + 1;
|
915 |
-
if (wooccm_mul_array('myfield' . $newNum, $input['billing_buttons'])) {
|
916 |
-
$input['billing_buttons'][$i]['cow'] = 'myfield' . $newNum . 'c';
|
917 |
-
} else {
|
918 |
-
$input['billing_buttons'][$i]['cow'] = 'myfield' . $newNum;
|
919 |
-
}
|
920 |
-
}
|
921 |
-
|
922 |
-
/*
|
923 |
-
*
|
924 |
-
* if (!empty($btn['cow']) && empty($btn['label']) && empty($btn['placeholder'])) {
|
925 |
-
$detect_error++;
|
926 |
-
unset($input['billing_buttons'][$i]);
|
927 |
-
|
928 |
-
if ($i != 999) {
|
929 |
-
$detect_error++;
|
930 |
-
$fieldnum = $i + 1;
|
931 |
-
add_settings_error(
|
932 |
-
'wooccm_settings_errors', esc_attr('settings_updated'), __('Sorry! An error occurred. WooCommerce Checkout Manager removed Billing field #' . $fieldnum . ' because no Label or Placeholder name was provided.', 'woocommerce-checkout-manager'), 'error'
|
933 |
-
);
|
934 |
-
}
|
935 |
-
} */
|
936 |
-
}
|
937 |
-
}
|
938 |
-
|
939 |
-
if ($detect_error == 0) {
|
940 |
-
add_settings_error(
|
941 |
-
'wooccm_settings_errors', esc_attr('settings_updated'), __('Your changes have been saved.', 'woocommerce-checkout-manager'), 'updated'
|
942 |
-
);
|
943 |
-
}
|
944 |
-
|
945 |
-
return $input;
|
946 |
-
}
|
947 |
-
|
948 |
-
/* function wooccm_admin_notices() {
|
949 |
-
|
950 |
-
// Check the User has the manage_options capability
|
951 |
-
if (current_user_can('manage_options') == false)
|
952 |
-
return;
|
953 |
-
|
954 |
-
// @mod - Removed as it tends to blow people Options up...
|
955 |
-
// Data update from legacy (<3.0)
|
956 |
-
// wooccm_admin_updater_notice();
|
957 |
-
// Check whether we are on the WooCommerce Checkout Manager screen
|
958 |
-
$screen = get_current_screen();
|
959 |
-
|
960 |
-
if (get_option('wooccm_beta_notice') == false) {
|
961 |
-
$beta_url = 'https://www.visser.com.au/plugins/woocommerce-checkout-manager/#beta';
|
962 |
-
$support_url = 'https://wordpress.org/support/plugin/woocommerce-checkout-manager#postform';
|
963 |
-
$dismiss_url = add_query_arg(array('action' => 'wooccm_dismiss_beta_notice', '_wpnonce' => wp_create_nonce('wooccm_dismiss_beta_notice')));
|
964 |
-
|
965 |
-
$message = '<span style="float:right;"><a href="' . $dismiss_url . '" class="woocommerce-message-close notice-dismiss">' . __('Dismiss', 'woocommerce-checkout-manager') . '</a></span>';
|
966 |
-
$message .= __('<strong>WooCommerce Checkout Manager Notice:</strong> We urgently need developers, integrators and interested store owners to test early Plugin releases and provide feedback to help stabilise the 4.0+ series. Can you help?', 'woocommerce-checkout-manager');
|
967 |
-
$message .= '
|
968 |
-
<p class="submit">
|
969 |
-
<a href="' . $beta_url . '" target="_blank" class="button-primary button-hero">' . __('Join the Developers list', 'woocommerce-checkout-manager') . '</a>
|
970 |
-
<a href="' . $support_url . '" target="_blank" class="button-secondary button-hero">' . __('Send feedback', 'woocommerce-checkout-manager') . '</a>
|
971 |
-
</p>';
|
972 |
-
echo wooccm_admin_notice_html($message);
|
973 |
-
}
|
974 |
-
} */
|
975 |
-
|
976 |
-
function wooccm_admin_updater_notice() {
|
977 |
-
|
978 |
-
if (in_array(get_option(WOOCCM_PREFIX . '_update_notice'), array(1, 'yep')) == true)
|
979 |
-
return;
|
980 |
-
|
981 |
-
$dismiss_url = add_query_arg(array('action' => 'wooccm_dismiss_update_notice', '_wpnonce' => wp_create_nonce('wooccm_dismiss_update_notice')));
|
982 |
-
?>
|
983 |
-
<form method="post" name="clickhere" action="">
|
984 |
-
<div id="message" class="updated settings-error click-here-wooccm">
|
985 |
-
<p>
|
986 |
-
<span style="float:right;"><a href="<?php echo $dismiss_url; ?>" class="woocommerce-message-close notice-dismiss"><?php _e('Dismiss', 'woocommerce-checkout-manager'); ?></a></span>
|
987 |
-
<?php _e('<strong>WooCommerce Checkout Manager Data Update Required</strong> – We just need to update the settings for WooCommerce Checkout Manager to the latest version.', 'woocommerce-checkout-manager'); ?>
|
988 |
-
</p>
|
989 |
-
<?php
|
990 |
-
// Check whether we are on the WooCommerce Checkout Manager screen
|
991 |
-
$screen = get_current_screen();
|
992 |
-
if (strstr($screen->base, 'woocommerce-checkout-manager')) {
|
993 |
-
?>
|
994 |
-
<p class="submit">
|
995 |
-
<input type="submit" class="wooccm-update-now button-primary button-hero" value="<?php _e('Run the updater', 'woocommerce-checkout-manager'); ?>" />
|
996 |
-
</p>
|
997 |
-
<?php
|
998 |
-
} else {
|
999 |
-
?>
|
1000 |
-
<p class="submit">
|
1001 |
-
<a href="<?php echo add_query_arg('page', 'woocommerce-checkout-manager'); ?>" class="button-primary button-hero "><?php _e('Open WooCheckout', 'woocommerce-checkout-manager'); ?></a>
|
1002 |
-
</p>
|
1003 |
-
<?php
|
1004 |
-
}
|
1005 |
-
?>
|
1006 |
-
</div>
|
1007 |
-
<!-- #message -->
|
1008 |
-
<input type="hidden" name="click-here-wooccm" value="y" />
|
1009 |
-
</form>
|
1010 |
-
<?php
|
1011 |
-
if (strstr($screen->base, 'woocommerce-checkout-manager')) {
|
1012 |
-
?>
|
1013 |
-
<script type="text/javascript">
|
1014 |
-
jQuery('.wooccm-update-now').click('click', function () {
|
1015 |
-
return window.confirm('<?php echo esc_js(__('It is strongly recommended that you backup your database before proceeding. Are you sure you wish to run the updater now?', 'woocommerce-checkout-manager')); ?>');
|
1016 |
-
});
|
1017 |
-
</script>
|
1018 |
-
<?php
|
1019 |
-
if (
|
1020 |
-
isset($_POST['click-here-wooccm']) &&
|
1021 |
-
sanitize_text_field($_POST['click-here-wooccm']) == 'y'
|
1022 |
-
) {
|
1023 |
-
// @mod - We need to check this file exists
|
1024 |
-
?>
|
1025 |
-
|
1026 |
-
<!-- First Use -->
|
1027 |
-
<script type="text/javascript">
|
1028 |
-
jQuery(document).ready(function ($) {
|
1029 |
-
|
1030 |
-
$('#wpbody-content').block({message: null, overlayCSS: {background: "#fff url(<?php echo plugins_url('woocommerce/assets/images/ajax-loader.gif'); ?> ) no-repeat center", opacity: .6}});
|
1031 |
-
|
1032 |
-
var form = $('#frm1');
|
1033 |
-
data = $('#frm1');
|
1034 |
-
forma = $('#frm2');
|
1035 |
-
dataa = $('#frm2');
|
1036 |
-
formb = $('#frm3');
|
1037 |
-
datab = $('#frm3');
|
1038 |
-
|
1039 |
-
$.ajax({
|
1040 |
-
type: "POST",
|
1041 |
-
url: form.attr('action'),
|
1042 |
-
data: data.serialize(),
|
1043 |
-
success: function (response) {
|
1044 |
-
|
1045 |
-
$.ajax({
|
1046 |
-
type: "POST",
|
1047 |
-
url: forma.attr('action'),
|
1048 |
-
data: dataa.serialize(),
|
1049 |
-
success: function (response) {}
|
1050 |
-
});
|
1051 |
-
|
1052 |
-
$.ajax({
|
1053 |
-
type: "POST",
|
1054 |
-
url: formb.attr('action'),
|
1055 |
-
data: datab.serialize(),
|
1056 |
-
success: function (response) {}
|
1057 |
-
});
|
1058 |
-
$('.settings-error.click-here-wooccm').hide();
|
1059 |
-
$('#wpbody-content').unblock();
|
1060 |
-
|
1061 |
-
}
|
1062 |
-
});
|
1063 |
-
|
1064 |
-
});
|
1065 |
-
</script>
|
1066 |
-
|
1067 |
-
<?php
|
1068 |
-
update_option(WOOCCM_PREFIX . '_update_notice', 1);
|
1069 |
-
}
|
1070 |
-
}
|
1071 |
-
}
|
1072 |
-
|
1073 |
-
//// Additional details
|
1074 |
-
//function wooccm_admin_edit_order_additional_details($order) {
|
1075 |
-
//
|
1076 |
-
// global $post;
|
1077 |
-
//
|
1078 |
-
// if (version_compare(wooccm_get_woo_version(), '2.7', '>=')) {
|
1079 |
-
// $order_id = ( method_exists($order, 'get_id') ? $order->get_id() : $order->id );
|
1080 |
-
// } else {
|
1081 |
-
// $order_id = ( isset($order->id) ? $order->id : 0 );
|
1082 |
-
// }
|
1083 |
-
//
|
1084 |
-
// $options = get_option('wccs_settings');
|
1085 |
-
// $buttons = ( isset($options['buttons']) ? $options['buttons'] : false );
|
1086 |
-
// if (!empty($buttons)) {
|
1087 |
-
// echo '
|
1088 |
-
//<p> </p>
|
1089 |
-
//<h4>' . __('Additional Details', 'woocommerce-checkout-manager') . '</h4>';
|
1090 |
-
// foreach ($buttons as $btn) {
|
1091 |
-
//
|
1092 |
-
// if (
|
1093 |
-
// ( get_post_meta($order_id, $btn['cow'], true) !== '' ) &&
|
1094 |
-
// !empty($btn['label']) &&
|
1095 |
-
// $btn['type'] !== 'heading' &&
|
1096 |
-
// $btn['type'] !== 'multiselect' &&
|
1097 |
-
// $btn['type'] !== 'wooccmupload' &&
|
1098 |
-
// $btn['type'] !== 'multicheckbox'
|
1099 |
-
// ) {
|
1100 |
-
// echo '
|
1101 |
-
//<p id="additional_' . $btn['cow'] . '" class="form-field form-field-wide form-field-type-' . $btn['type'] . '">
|
1102 |
-
// <strong title="' . sprintf(__('ID: %s | Field Type: %s', 'woocommerce-checkout-manager'), $btn['cow'], __('Generic', 'woocommerce-checkout-manager')) . '">
|
1103 |
-
// ' . wooccm_wpml_string(trim($btn['label'])) . ':</strong><br />' . nl2br(get_post_meta($order_id, $btn['cow'], true)) . '
|
1104 |
-
//</p>
|
1105 |
-
//<!-- .form-field-type-... -->';
|
1106 |
-
// } elseif (
|
1107 |
-
// !empty($btn['label']) &&
|
1108 |
-
// $btn['type'] !== 'wooccmupload' &&
|
1109 |
-
// $btn['type'] !== 'multiselect' &&
|
1110 |
-
// $btn['type'] !== 'multicheckbox' &&
|
1111 |
-
// $btn['type'] == 'heading'
|
1112 |
-
// ) {
|
1113 |
-
// echo '
|
1114 |
-
//<h4>' . wooccm_wpml_string(trim($btn['label'])) . '</h4>';
|
1115 |
-
// } elseif (
|
1116 |
-
// ( get_post_meta($order_id, $btn['cow'], true) !== '' ) &&
|
1117 |
-
// !empty($btn['label']) &&
|
1118 |
-
// $btn['type'] !== 'heading' &&
|
1119 |
-
// $btn['type'] !== 'wooccmupload' &&
|
1120 |
-
// (
|
1121 |
-
// $btn['type'] == 'multiselect' || $btn['type'] == 'multicheckbox'
|
1122 |
-
// )
|
1123 |
-
// ) {
|
1124 |
-
// $value = get_post_meta($order_id, $btn['cow'], true);
|
1125 |
-
// $strings = maybe_unserialize($value);
|
1126 |
-
// echo '
|
1127 |
-
//<p class="form-field form-field-wide form-field-type-' . $btn['type'] . '">
|
1128 |
-
// <strong title="' . sprintf(__('ID: %s | Field Type: %s', 'woocommerce-checkout-manager'), $btn['cow'], __('Multi-Select or Multi-Checkbox', 'woocommerce-checkout-manager')) . '">' . wooccm_wpml_string(trim($btn['label'])) . ':</strong> ';
|
1129 |
-
// if (!empty($strings)) {
|
1130 |
-
// if (is_array($strings)) {
|
1131 |
-
// $iww = 0;
|
1132 |
-
// $len = count($strings);
|
1133 |
-
// foreach ($strings as $key) {
|
1134 |
-
// if ($iww == $len - 1) {
|
1135 |
-
// echo '' . wooccm_wpml_string($key);
|
1136 |
-
// } else {
|
1137 |
-
// echo '' . wooccm_wpml_string($key) . ', ';
|
1138 |
-
// }
|
1139 |
-
// $iww++;
|
1140 |
-
// }
|
1141 |
-
// }
|
1142 |
-
// } else {
|
1143 |
-
// echo '-';
|
1144 |
-
// }
|
1145 |
-
// echo '
|
1146 |
-
//</p>
|
1147 |
-
//<!-- .form-field-type-multiselect .form-field-type-multicheckbox -->';
|
1148 |
-
// } elseif (
|
1149 |
-
// ( get_post_meta($order_id, $btn['cow'], true) !== '' ) &&
|
1150 |
-
// $btn['type'] == 'wooccmupload'
|
1151 |
-
// ) {
|
1152 |
-
// $attachments = get_post_meta($order_id, $btn['cow'], true);
|
1153 |
-
// if (!empty($attachments)) {
|
1154 |
-
// // Check for delimiter
|
1155 |
-
// if (strstr($attachments, '||') !== false)
|
1156 |
-
// $attachments = explode('||', $attachments);
|
1157 |
-
// else if (strstr($attachments, ',') !== false)
|
1158 |
-
// $attachments = explode(',', $attachments);
|
1159 |
-
// else if (is_numeric($attachments))
|
1160 |
-
// $attachments = array($attachments);
|
1161 |
-
// }
|
1162 |
-
// echo '
|
1163 |
-
//<p class="form-field form-field-wide form-field-type-wooccmupload">
|
1164 |
-
// <strong>' . wooccm_wpml_string(trim($btn['label'])) . ':</strong>';
|
1165 |
-
// if (empty($attachments)) {
|
1166 |
-
// echo '<br />';
|
1167 |
-
// echo '-';
|
1168 |
-
// }
|
1169 |
-
// echo '
|
1170 |
-
//</p>' . "\n";
|
1171 |
-
// if (!empty($attachments)) {
|
1172 |
-
// echo '<ul>' . "\n";
|
1173 |
-
// foreach ($attachments as $attachment) {
|
1174 |
-
// $attachment_url = wp_get_attachment_url($attachment);
|
1175 |
-
// if (!empty($attachment_url))
|
1176 |
-
// echo '<li><a href="' . $attachment_url . '" target="_blank">' . basename($attachment_url) . '</a></li>' . "\n";
|
1177 |
-
// }
|
1178 |
-
// echo '</ul>';
|
1179 |
-
// }
|
1180 |
-
// echo '
|
1181 |
-
//<!-- .form-field-type-wooccmupload -->';
|
1182 |
-
// }
|
1183 |
-
// }
|
1184 |
-
// }
|
1185 |
-
//}
|
1186 |
-
|
1187 |
-
// Billing details
|
1188 |
-
//function wooccm_admin_edit_order_billing_details($order) {
|
1189 |
-
//
|
1190 |
-
// global $post;
|
1191 |
-
//
|
1192 |
-
// $order_id = ( isset($post->ID) ? $post->ID : false );
|
1193 |
-
//
|
1194 |
-
// $options = get_option('wccs_settings3');
|
1195 |
-
// $buttons = ( isset($options['billing_buttons']) ? $options['billing_buttons'] : false );
|
1196 |
-
// if (!empty($buttons)) {
|
1197 |
-
// $fields = array(
|
1198 |
-
// 'country',
|
1199 |
-
// 'first_name',
|
1200 |
-
// 'last_name',
|
1201 |
-
// 'company',
|
1202 |
-
// 'address_1',
|
1203 |
-
// 'address_2',
|
1204 |
-
// 'city',
|
1205 |
-
// 'state',
|
1206 |
-
// 'postcode',
|
1207 |
-
// 'email',
|
1208 |
-
// 'phone'
|
1209 |
-
// );
|
1210 |
-
// foreach ($buttons as $btn) {
|
1211 |
-
//
|
1212 |
-
// if (!in_array($btn['cow'], $fields)) {
|
1213 |
-
// if (
|
1214 |
-
// ( get_post_meta($order_id, sprintf('_billing_%s', $btn['cow']), true) !== '' ) &&
|
1215 |
-
// !empty($btn['label']) &&
|
1216 |
-
// $btn['type'] !== 'heading' &&
|
1217 |
-
// $btn['type'] !== 'multiselect' &&
|
1218 |
-
// $btn['type'] !== 'wooccmupload' &&
|
1219 |
-
// $btn['type'] !== 'multicheckbox'
|
1220 |
-
// ) {
|
1221 |
-
// echo '
|
1222 |
-
//<p id="billing_' . $btn['cow'] . '" class="form-field form-field-wide form-field-type-' . $btn['type'] . '">
|
1223 |
-
// <strong title="' . sprintf(__('ID: %s | Field Type: %s', 'woocommerce-checkout-manager'), sprintf('_billing_%s', $btn['cow']), __('Generic', 'woocommerce-checkout-manager')) . '">
|
1224 |
-
// ' . wooccm_wpml_string(trim($btn['label'])) . ':</strong><br />' . nl2br(get_post_meta($order_id, sprintf('_billing_%s', $btn['cow']), true)) . '
|
1225 |
-
//</p>
|
1226 |
-
//<!-- .form-field-type-... -->';
|
1227 |
-
// } elseif (
|
1228 |
-
// !empty($btn['label']) &&
|
1229 |
-
// $btn['type'] !== 'wooccmupload' &&
|
1230 |
-
// $btn['type'] !== 'multiselect' &&
|
1231 |
-
// $btn['type'] !== 'multicheckbox' &&
|
1232 |
-
// $btn['type'] == 'heading'
|
1233 |
-
// ) {
|
1234 |
-
// echo '
|
1235 |
-
//<h4>' . wooccm_wpml_string(trim($btn['label'])) . '</h4>';
|
1236 |
-
// } elseif (
|
1237 |
-
// ( get_post_meta($order_id, sprintf('_billing_%s', $btn['cow']), true) !== '' ) &&
|
1238 |
-
// !empty($btn['label']) &&
|
1239 |
-
// $btn['type'] !== 'heading' &&
|
1240 |
-
// $btn['type'] !== 'wooccmupload' &&
|
1241 |
-
// (
|
1242 |
-
// $btn['type'] == 'multiselect' || $btn['type'] == 'multicheckbox'
|
1243 |
-
// )
|
1244 |
-
// ) {
|
1245 |
-
// $value = get_post_meta($order_id, sprintf('_billing_%s', $btn['cow']), true);
|
1246 |
-
// $strings = maybe_unserialize($value);
|
1247 |
-
//
|
1248 |
-
// echo '
|
1249 |
-
//<p class="form-field form-field-wide form-field-type-' . $btn['type'] . '">
|
1250 |
-
// <strong title="' . sprintf(__('ID: %s | Field Type: %s', 'woocommerce-checkout-manager'), sprintf('_billing_%s', $btn['cow']), __('Multi-Select or Multi-Checkbox', 'woocommerce-checkout-manager')) . '">' . wooccm_wpml_string(trim($btn['label'])) . ':</strong> ';
|
1251 |
-
// if (!empty($strings)) {
|
1252 |
-
// if (is_array($strings)) {
|
1253 |
-
// $iww = 0;
|
1254 |
-
// $len = count($strings);
|
1255 |
-
// foreach ($strings as $key) {
|
1256 |
-
// if ($iww == $len - 1) {
|
1257 |
-
// echo wooccm_wpml_string($key);
|
1258 |
-
// } else {
|
1259 |
-
// echo wooccm_wpml_string($key) . ', ';
|
1260 |
-
// }
|
1261 |
-
// $iww++;
|
1262 |
-
// }
|
1263 |
-
// } else {
|
1264 |
-
// echo $strings;
|
1265 |
-
// }
|
1266 |
-
// } else {
|
1267 |
-
// echo '-';
|
1268 |
-
// }
|
1269 |
-
// echo '
|
1270 |
-
//</p>
|
1271 |
-
//<!-- .form-field-type-multiselect .form-field-type-multicheckbox -->';
|
1272 |
-
// } elseif (
|
1273 |
-
// ( get_post_meta($order_id, sprintf('_billing_%s', $btn['cow']), true) !== '' ) &&
|
1274 |
-
// $btn['type'] == 'wooccmupload'
|
1275 |
-
// ) {
|
1276 |
-
// $attachments = get_post_meta($order_id, sprintf('_billing_%s', $btn['cow']), true);
|
1277 |
-
// if (!empty($attachments)) {
|
1278 |
-
// // Check for delimiter
|
1279 |
-
// if (strstr($attachments, '||') !== false)
|
1280 |
-
// $attachments = explode('||', $attachments);
|
1281 |
-
// else if (strstr($attachments, ',') !== false)
|
1282 |
-
// $attachments = explode(',', $attachments);
|
1283 |
-
// else if (is_numeric($attachments))
|
1284 |
-
// $attachments = array($attachments);
|
1285 |
-
// }
|
1286 |
-
// $btn['label'] = (!empty($btn['force_title2']) ? $btn['force_title2'] : $btn['label'] );
|
1287 |
-
// echo '
|
1288 |
-
//<p class="form-field form-field-wide form-field-type-wooccmupload">
|
1289 |
-
// <strong>' . wooccm_wpml_string(trim($btn['label'])) . ':</strong>';
|
1290 |
-
// if (empty($attachments)) {
|
1291 |
-
// echo '<br />';
|
1292 |
-
// echo '-';
|
1293 |
-
// }
|
1294 |
-
// echo '
|
1295 |
-
//</p>' . "\n";
|
1296 |
-
// if (!empty($attachments)) {
|
1297 |
-
// echo '<ul>' . "\n";
|
1298 |
-
// foreach ($attachments as $attachment) {
|
1299 |
-
// $attachment_url = wp_get_attachment_url($attachment);
|
1300 |
-
// if (!empty($attachment_url))
|
1301 |
-
// echo '<li><a href="' . $attachment_url . '" target="_blank">' . basename($attachment_url) . '</a></li>' . "\n";
|
1302 |
-
// }
|
1303 |
-
// echo '</ul>';
|
1304 |
-
// }
|
1305 |
-
// echo '
|
1306 |
-
//<!-- .form-field-type-wooccmupload -->';
|
1307 |
-
// }
|
1308 |
-
// }
|
1309 |
-
// }
|
1310 |
-
// }
|
1311 |
-
//}
|
1312 |
-
|
1313 |
-
// Shipping details
|
1314 |
-
//function wooccm_admin_edit_order_shipping_details($order) {
|
1315 |
-
//
|
1316 |
-
// global $post;
|
1317 |
-
//
|
1318 |
-
// $order_id = ( isset($post->ID) ? $post->ID : false );
|
1319 |
-
//
|
1320 |
-
// $options = get_option('wccs_settings2');
|
1321 |
-
// $buttons = ( isset($options['shipping_buttons']) ? $options['shipping_buttons'] : false );
|
1322 |
-
// if (!empty($buttons)) {
|
1323 |
-
// $fields = array(
|
1324 |
-
// 'country',
|
1325 |
-
// 'first_name',
|
1326 |
-
// 'last_name',
|
1327 |
-
// 'company',
|
1328 |
-
// 'address_1',
|
1329 |
-
// 'address_2',
|
1330 |
-
// 'city',
|
1331 |
-
// 'state',
|
1332 |
-
// 'postcode'
|
1333 |
-
// );
|
1334 |
-
// foreach ($buttons as $btn) {
|
1335 |
-
//
|
1336 |
-
// if (!in_array($btn['cow'], $fields)) {
|
1337 |
-
// if (
|
1338 |
-
// ( get_post_meta($order_id, sprintf('_shipping_%s', $btn['cow']), true) !== '' ) &&
|
1339 |
-
// !empty($btn['label']) &&
|
1340 |
-
// $btn['type'] !== 'wooccmupload' &&
|
1341 |
-
// $btn['type'] !== 'heading' &&
|
1342 |
-
// $btn['type'] !== 'multiselect' &&
|
1343 |
-
// $btn['type'] !== 'multicheckbox'
|
1344 |
-
// ) {
|
1345 |
-
// echo '
|
1346 |
-
//<p id="shipping_' . $btn['cow'] . '" class="form-field form-field-wide form-field-type-' . $btn['type'] . '">
|
1347 |
-
// <strong title="' . sprintf(__('ID: %s | Field Type: %s', 'woocommerce-checkout-manager'), sprintf('_shipping_%s', $btn['cow']), __('Generic', 'woocommerce-checkout-manager')) . '">
|
1348 |
-
// ' . wooccm_wpml_string(trim($btn['label'])) . ':</strong><br />' . nl2br(get_post_meta($order_id, sprintf('_shipping_%s', $btn['cow']), true)) . '
|
1349 |
-
//</p>
|
1350 |
-
//<!-- .form-field-type-... -->';
|
1351 |
-
// } elseif (
|
1352 |
-
// !empty($btn['label']) &&
|
1353 |
-
// $btn['type'] !== 'multiselect' &&
|
1354 |
-
// $btn['type'] !== 'multicheckbox' &&
|
1355 |
-
// $btn['type'] == 'heading'
|
1356 |
-
// ) {
|
1357 |
-
// echo '
|
1358 |
-
//<h4>' . wooccm_wpml_string(trim($btn['label'])) . '</h4>';
|
1359 |
-
// } elseif (
|
1360 |
-
// ( get_post_meta($order_id, sprintf('_shipping_%s', $btn['cow']), true) !== '' ) &&
|
1361 |
-
// !empty($btn['label']) &&
|
1362 |
-
// $btn['type'] !== 'heading' &&
|
1363 |
-
// $btn['type'] !== 'wooccmupload' &&
|
1364 |
-
// (
|
1365 |
-
// $btn['type'] == 'multiselect' || $btn['type'] == 'multicheckbox'
|
1366 |
-
// )
|
1367 |
-
// ) {
|
1368 |
-
// $value = get_post_meta($order_id, sprintf('_shipping_%s', $btn['cow']), true);
|
1369 |
-
// $strings = maybe_unserialize($value);
|
1370 |
-
// echo '
|
1371 |
-
//<p class="form-field form-field-wide form-field-type-' . $btn['type'] . '">
|
1372 |
-
// <strong title="' . sprintf(__('ID: %s | Field Type: %s', 'woocommerce-checkout-manager'), sprintf('_shipping_%s', $btn['cow']), __('Multi-Select or Multi-Checkbox', 'woocommerce-checkout-manager')) . '">' . wooccm_wpml_string(trim($btn['label'])) . ':</strong> ';
|
1373 |
-
// if (!empty($strings)) {
|
1374 |
-
// if (is_array($strings)) {
|
1375 |
-
// $iww = 0;
|
1376 |
-
// $len = count($strings);
|
1377 |
-
// foreach ($strings as $key) {
|
1378 |
-
// if ($iww == $len - 1) {
|
1379 |
-
// echo wooccm_wpml_string($key);
|
1380 |
-
// } else {
|
1381 |
-
// echo wooccm_wpml_string($key) . ', ';
|
1382 |
-
// }
|
1383 |
-
// $iww++;
|
1384 |
-
// }
|
1385 |
-
// } else {
|
1386 |
-
// echo $strings;
|
1387 |
-
// }
|
1388 |
-
// } else {
|
1389 |
-
// echo '-';
|
1390 |
-
// }
|
1391 |
-
// echo '
|
1392 |
-
//</p>
|
1393 |
-
//<!-- .form-field-type-multiselect .form-field-type-multicheckbox -->';
|
1394 |
-
// } elseif (
|
1395 |
-
// ( get_post_meta($order_id, sprintf('_shipping_%s', $btn['cow']), true) !== '' ) &&
|
1396 |
-
// $btn['type'] == 'wooccmupload'
|
1397 |
-
// ) {
|
1398 |
-
// $attachments = get_post_meta($order_id, sprintf('_shipping_%s', $btn['cow']), true);
|
1399 |
-
// if (!empty($attachments)) {
|
1400 |
-
// // Check for delimiter
|
1401 |
-
// if (strstr($attachments, '||') !== false)
|
1402 |
-
// $attachments = explode('||', $attachments);
|
1403 |
-
// else if (strstr($attachments, ',') !== false)
|
1404 |
-
// $attachments = explode(',', $attachments);
|
1405 |
-
// else if (is_numeric($attachments))
|
1406 |
-
// $attachments = array($attachments);
|
1407 |
-
// }
|
1408 |
-
// $btn['label'] = (!empty($btn['force_title2']) ? $btn['force_title2'] : $btn['label'] );
|
1409 |
-
// echo '
|
1410 |
-
//<p class="form-field form-field-wide form-field-type-wooccmupload">
|
1411 |
-
// <strong>' . wooccm_wpml_string(trim($btn['label'])) . ':</strong>';
|
1412 |
-
// echo '
|
1413 |
-
//</p>' . "\n";
|
1414 |
-
// if (!empty($attachments) && is_array($attachments)) {
|
1415 |
-
// echo '<ul>' . "\n";
|
1416 |
-
// foreach ($attachments as $attachment) {
|
1417 |
-
// $attachment_url = wp_get_attachment_url($attachment);
|
1418 |
-
// if (!empty($attachment_url))
|
1419 |
-
// echo '<li><a href="' . $attachment_url . '" target="_blank">' . basename($attachment_url) . '</a></li>' . "\n";
|
1420 |
-
// }
|
1421 |
-
// echo '</ul>';
|
1422 |
-
// } else {
|
1423 |
-
// echo '<br />';
|
1424 |
-
// echo '-';
|
1425 |
-
// }
|
1426 |
-
// echo '
|
1427 |
-
//<!-- .form-field-type-wooccmupload -->';
|
1428 |
-
// }
|
1429 |
-
// }
|
1430 |
-
// }
|
1431 |
-
// }
|
1432 |
-
//}
|
1433 |
-
|
1434 |
-
//function wooccm_js_str($s) {
|
1435 |
-
// return '"' . addcslashes($s, "\0..\37\"\\") . '"';
|
1436 |
-
//}
|
1437 |
-
//
|
1438 |
-
//function wooccm_js_array($array) {
|
1439 |
-
// $temp = array_map('wooccm_js_str', $array);
|
1440 |
-
// return '[' . implode(',', $temp) . ']';
|
1441 |
-
//}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/class-wooccm-admin.php
ADDED
@@ -0,0 +1,118 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class WOOCCM_Field_Admin {
|
4 |
+
|
5 |
+
protected static $_instance;
|
6 |
+
|
7 |
+
public function __construct() {
|
8 |
+
$this->init();
|
9 |
+
}
|
10 |
+
|
11 |
+
public static function instance() {
|
12 |
+
if (is_null(self::$_instance)) {
|
13 |
+
self::$_instance = new self();
|
14 |
+
}
|
15 |
+
return self::$_instance;
|
16 |
+
}
|
17 |
+
|
18 |
+
public function ajax_select_search_products() {
|
19 |
+
|
20 |
+
if (current_user_can('manage_woocommerce') && check_ajax_referer('search-products', 'security') && isset($_REQUEST['term'])) {
|
21 |
+
|
22 |
+
if (empty($term) && isset($_GET['term'])) {
|
23 |
+
$term = (string) wc_clean(wp_unslash($_GET['term']));
|
24 |
+
}
|
25 |
+
|
26 |
+
if (empty($term)) {
|
27 |
+
wp_die();
|
28 |
+
}
|
29 |
+
|
30 |
+
if (!empty($_GET['limit'])) {
|
31 |
+
$limit = absint($_GET['limit']);
|
32 |
+
} else {
|
33 |
+
$limit = absint(apply_filters('woocommerce_json_search_limit', 30));
|
34 |
+
}
|
35 |
+
|
36 |
+
$include_ids = !empty($_GET['include']) ? array_map('absint', (array) wp_unslash($_GET['include'])) : array();
|
37 |
+
$exclude_ids = !empty($_GET['exclude']) ? array_map('absint', (array) wp_unslash($_GET['exclude'])) : array();
|
38 |
+
$selected_ids = !empty($_GET['selected']) ? array_map('absint', (array) wp_unslash($_GET['selected'])) : array();
|
39 |
+
|
40 |
+
$include_variations = false;
|
41 |
+
|
42 |
+
$data_store = WC_Data_Store::load('product');
|
43 |
+
$ids = $data_store->search_products($term, '', (bool) $include_variations, false, $limit, $include_ids, $exclude_ids + $selected_ids);
|
44 |
+
|
45 |
+
$product_objects = array_filter(array_map('wc_get_product', $ids), 'wc_products_array_filter_readable');
|
46 |
+
$products = array();
|
47 |
+
|
48 |
+
foreach ($product_objects as $product_object) {
|
49 |
+
$formatted_name = $product_object->get_formatted_name();
|
50 |
+
$managing_stock = $product_object->managing_stock();
|
51 |
+
|
52 |
+
if ($managing_stock && !empty($_GET['display_stock'])) {
|
53 |
+
$stock_amount = $product_object->get_stock_quantity();
|
54 |
+
/* Translators: %d stock amount */
|
55 |
+
$formatted_name .= ' – ' . sprintf(__('Stock: %d', 'woocommerce'), wc_format_stock_quantity_for_display($stock_amount, $product_object));
|
56 |
+
}
|
57 |
+
|
58 |
+
$products[$product_object->get_id()] = rawurldecode($formatted_name);
|
59 |
+
}
|
60 |
+
|
61 |
+
wp_send_json(apply_filters('woocommerce_json_search_found_products', $products));
|
62 |
+
}
|
63 |
+
}
|
64 |
+
|
65 |
+
function enqueue_scripts() {
|
66 |
+
|
67 |
+
wp_register_style('wooccm-admin', plugins_url('assets/backend/css/wooccm-admin.css', WOOCCM_PLUGIN_FILE), array('media-views', /* 'woocommerce_admin_marketplace_styles' */), WOOCCM_PLUGIN_VERSION, 'all');
|
68 |
+
|
69 |
+
wp_register_script('wooccm-admin', plugins_url('assets/backend/js/wooccm-admin.js', WOOCCM_PLUGIN_FILE), array('jquery'), WOOCCM_PLUGIN_VERSION, true);
|
70 |
+
|
71 |
+
if (isset($_GET['tab']) && $_GET['tab'] === WOOCCM_PREFIX) {
|
72 |
+
wp_enqueue_style('wooccm-admin');
|
73 |
+
wp_enqueue_script('wooccm-admin');
|
74 |
+
}
|
75 |
+
}
|
76 |
+
|
77 |
+
function add_beta_badge() {
|
78 |
+
?>
|
79 |
+
<style>
|
80 |
+
body #adminmenu #toplevel_page_woocommerce a[href="<?php echo admin_url('admin.php?page=wc-settings&tab=' . sanitize_title(WOOCCM_PREFIX)); ?>"]:before {
|
81 |
+
content: 'BETA';
|
82 |
+
color: #fff;
|
83 |
+
background-color: #21c2f8;
|
84 |
+
padding: 1px 7px;
|
85 |
+
font-size: 9px;
|
86 |
+
font-weight: 700;
|
87 |
+
border-radius: 10px;
|
88 |
+
position: absolute;
|
89 |
+
right: 15px;
|
90 |
+
line-height: 16px;
|
91 |
+
font-style: italic;
|
92 |
+
}
|
93 |
+
</style>
|
94 |
+
<?php
|
95 |
+
}
|
96 |
+
|
97 |
+
function add_tab($settings_tabs) {
|
98 |
+
$settings_tabs[WOOCCM_PREFIX] = esc_html__('Checkout', 'woocommerce-checkout-manager');
|
99 |
+
return $settings_tabs;
|
100 |
+
}
|
101 |
+
|
102 |
+
function add_menu_page() {
|
103 |
+
add_submenu_page('woocommerce', esc_html__('Checkout', 'woocommerce-checkout-manager'), esc_html__('Checkout', 'woocommerce-checkout-manager'), 'manage_woocommerce', admin_url('admin.php?page=wc-settings&tab=' . sanitize_title(WOOCCM_PREFIX)));
|
104 |
+
}
|
105 |
+
|
106 |
+
function init() {
|
107 |
+
add_action('wp_ajax_wooccm_select_search_products', array($this, 'ajax_select_search_products'));
|
108 |
+
|
109 |
+
add_action('admin_enqueue_scripts', array($this, 'enqueue_scripts'));
|
110 |
+
add_action('admin_head', array($this, 'add_beta_badge'));
|
111 |
+
add_action('admin_menu', array($this, 'add_menu_page'));
|
112 |
+
add_filter('woocommerce_settings_tabs_array', array($this, 'add_tab'), 50);
|
113 |
+
}
|
114 |
+
|
115 |
+
}
|
116 |
+
|
117 |
+
WOOCCM_Field_Admin::instance();
|
118 |
+
|
new/model/class-wooccm-field-old.php → includes/class-wooccm-compatibility.php
RENAMED
@@ -1,7 +1,8 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
class WOOCCM_Field_Compatibility
|
4 |
|
|
|
5 |
protected $prefix = '';
|
6 |
protected $option_name = '';
|
7 |
protected $defaults = array();
|
@@ -65,16 +66,16 @@ class WOOCCM_Field_Compatibility extends WOOCCM_Field {
|
|
65 |
'single_max_yy' => null,
|
66 |
// Amount
|
67 |
// -------------------------------------------------------------------
|
68 |
-
'
|
69 |
-
'
|
70 |
-
'
|
71 |
-
'
|
72 |
-
'
|
73 |
'extra_class' => null,
|
74 |
// Conditional
|
75 |
// -------------------------------------------------------------------
|
76 |
'conditional' => 'conditional_parent_use',
|
77 |
-
'
|
78 |
'conditional_parent_value' => 'chosen_valt',
|
79 |
// Color
|
80 |
// -------------------------------------------------------------------
|
@@ -155,6 +156,34 @@ class WOOCCM_Field_Compatibility extends WOOCCM_Field {
|
|
155 |
'sortable',
|
156 |
'filterable',
|
157 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
158 |
|
159 |
function replace_keys($array = array(), $replace = array()) {
|
160 |
|
@@ -200,9 +229,6 @@ class WOOCCM_Field_Compatibility extends WOOCCM_Field {
|
|
200 |
if (count($value)) {
|
201 |
$value = implode('||', $value);
|
202 |
} else {
|
203 |
-
|
204 |
-
//error_log(json_encode($value));
|
205 |
-
|
206 |
$value = @$value[0];
|
207 |
}
|
208 |
}
|
@@ -210,22 +236,13 @@ class WOOCCM_Field_Compatibility extends WOOCCM_Field {
|
|
210 |
return $value;
|
211 |
}
|
212 |
|
213 |
-
function get_new_args($field = array()) {
|
214 |
|
215 |
$replace = array_flip(array_filter($this->old_to_old_args));
|
216 |
|
217 |
$field = $this->replace_keys($field, $replace);
|
218 |
|
219 |
-
$field = wp_parse_args($field,
|
220 |
-
|
221 |
-
return $field;
|
222 |
-
}
|
223 |
-
|
224 |
-
function get_old_args($field = array()) {
|
225 |
-
|
226 |
-
$replace = array_filter($this->old_to_old_args);
|
227 |
-
|
228 |
-
$field = $this->replace_keys($field, $replace);
|
229 |
|
230 |
return $field;
|
231 |
}
|
@@ -239,66 +256,64 @@ class WOOCCM_Field_Compatibility extends WOOCCM_Field {
|
|
239 |
return $type;
|
240 |
}
|
241 |
|
242 |
-
function
|
243 |
|
244 |
-
|
245 |
-
return 'wooccmtext';
|
246 |
-
}
|
247 |
|
248 |
-
$
|
249 |
|
250 |
-
|
251 |
-
|
252 |
-
}
|
253 |
|
254 |
-
|
255 |
-
}
|
256 |
|
257 |
-
|
258 |
|
259 |
-
|
260 |
|
261 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
262 |
|
263 |
-
|
|
|
|
|
264 |
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
if ($this->duplicated_name($field['name'], $fields)) {
|
270 |
-
$field['name'] .= 'b';
|
271 |
}
|
272 |
}
|
273 |
|
274 |
-
if (empty($field['
|
275 |
-
if ($
|
276 |
-
$
|
|
|
|
|
|
|
277 |
}
|
278 |
}
|
279 |
|
280 |
-
if (empty($field['order'])) {
|
281 |
-
$field['order'] = $field_id + 1;
|
282 |
-
}
|
283 |
-
|
284 |
-
if (empty($field['key'])) {
|
285 |
-
$field['key'] = $this->get_key($this->prefix, $field['name']);
|
286 |
-
}
|
287 |
-
|
288 |
if ($field['type'] == 'colorpicker' && !empty($field['colorpickerd'])) {
|
289 |
$field['default'] = $field['colorpickerd'];
|
290 |
}
|
291 |
-
|
292 |
$field['type'] = $this->get_new_type($field['type']);
|
293 |
|
294 |
$field['show_role'] = $this->string_to_array($field['show_role']);
|
295 |
$field['hide_role'] = $this->string_to_array($field['hide_role']);
|
296 |
-
//$field['options'] = $this->string_to_array($field['options']);
|
297 |
$field['show_product'] = $this->string_to_array($field['show_product']);
|
298 |
$field['hide_product'] = $this->string_to_array($field['hide_product']);
|
299 |
$field['show_product_cat'] = $this->string_to_array($field['show_product_cat']);
|
300 |
$field['hide_product_cat'] = $this->string_to_array($field['hide_product_cat']);
|
301 |
-
$field['
|
302 |
|
303 |
// Days
|
304 |
if (!empty($field['days_disabler'])) {
|
@@ -333,206 +348,35 @@ class WOOCCM_Field_Compatibility extends WOOCCM_Field {
|
|
333 |
}
|
334 |
|
335 |
//return $field;
|
336 |
-
return
|
337 |
-
}
|
338 |
-
|
339 |
-
function old_panel_compatibility($field_id, $field = array()) {
|
340 |
-
|
341 |
-
$field = $this->get_old_args($field);
|
342 |
-
|
343 |
-
$field = wp_parse_args($field, array_fill_keys($this->old_args, null));
|
344 |
-
|
345 |
-
if (!is_numeric($field['order'])) {
|
346 |
-
$field['order'] = $field_id + 1;
|
347 |
-
}
|
348 |
-
|
349 |
-
$field['type'] = $this->get_old_type($field['type']);
|
350 |
-
|
351 |
-
if (empty($field['position']) && isset($field['class'])) {
|
352 |
-
if ($position = $this->array_to_string(array_intersect((array) $field['class'], array('form-row-wide', 'form-row-first', 'form-row-last')))) {
|
353 |
-
$field['position'] = $position;
|
354 |
-
}
|
355 |
-
}
|
356 |
-
|
357 |
-
$field['role_option'] = $this->array_to_string($field['role_option']);
|
358 |
-
$field['role_option2'] = $this->array_to_string($field['role_option2']);
|
359 |
-
//$field['option_array'] = $this->array_to_string($field['option_array']);
|
360 |
-
$field['single_p'] = $this->array_to_string($field['single_p']);
|
361 |
-
$field['single_px'] = $this->array_to_string($field['single_px']);
|
362 |
-
$field['single_p_cat'] = $this->array_to_string($field['single_p_cat']);
|
363 |
-
$field['single_px_cat'] = $this->array_to_string($field['single_px_cat']);
|
364 |
-
$field['tax_remove'] = !$field['tax_remove'];
|
365 |
-
|
366 |
-
// Days
|
367 |
-
if (is_array($field['days_disabler'])) {
|
368 |
-
foreach ($field['days_disabler'] as $day_index => $day) {
|
369 |
-
$field['days_disabler' . strval($day_index)] = 1;
|
370 |
-
}
|
371 |
-
$field['days_disabler'] = 1;
|
372 |
-
unset($field['date_limit_days']);
|
373 |
-
}
|
374 |
-
|
375 |
-
// Dates
|
376 |
-
if (!empty($field['date_limit_fixed_min'])) {
|
377 |
-
|
378 |
-
$min = explode('-', $field['date_limit_fixed_min']);
|
379 |
-
|
380 |
-
$field['single_yy'] = $min[0];
|
381 |
-
$field['single_mm'] = $min[1];
|
382 |
-
$field['single_dd'] = $min[2];
|
383 |
-
}
|
384 |
-
|
385 |
-
if (!empty($field['date_limit_fixed_max'])) {
|
386 |
-
|
387 |
-
$max = explode('-', $field['date_limit_fixed_max']);
|
388 |
-
|
389 |
-
$field['single_max_yy'] = $max[0];
|
390 |
-
$field['single_max_mm'] = $max[1];
|
391 |
-
$field['single_max_dd'] = $max[2];
|
392 |
-
}
|
393 |
-
|
394 |
-
return array_intersect_key($field, array_flip($this->old_args));
|
395 |
-
}
|
396 |
-
|
397 |
-
// Get
|
398 |
-
// ---------------------------------------------------------------------------
|
399 |
-
|
400 |
-
public function get_fields($old = false) {
|
401 |
-
|
402 |
-
if ($old) {
|
403 |
-
return $this->get_fields_old();
|
404 |
-
} else {
|
405 |
-
return $this->get_fields_new();
|
406 |
-
}
|
407 |
-
}
|
408 |
-
|
409 |
-
protected function get_fields_old() {
|
410 |
-
|
411 |
-
$defaults = $this->get_default_fields();
|
412 |
-
|
413 |
-
if ($fields = $this->get_option($defaults)) {
|
414 |
-
|
415 |
-
foreach ($fields as $field_id => $field) {
|
416 |
-
|
417 |
-
$fields[$field_id] = $this->old_panel_compatibility($field_id, $field);
|
418 |
-
}
|
419 |
-
}
|
420 |
-
|
421 |
-
return $fields;
|
422 |
}
|
423 |
|
424 |
-
protected function get_fields_new() {
|
425 |
|
426 |
-
$
|
427 |
|
428 |
-
|
429 |
|
430 |
foreach ($fields as $field_id => $field) {
|
431 |
|
432 |
-
|
433 |
-
|
434 |
-
$fields[$field_id] = $this->new_panel_compatibility($field_id, $field, $fields);
|
435 |
|
436 |
-
|
437 |
-
}
|
438 |
-
}
|
439 |
-
|
440 |
-
return $fields;
|
441 |
-
}
|
442 |
|
443 |
-
|
444 |
|
445 |
-
|
446 |
|
447 |
-
|
448 |
|
449 |
-
|
450 |
-
|
451 |
-
return $this->new_panel_compatibility($field_id, $field, $fields);
|
452 |
-
}
|
453 |
-
}
|
454 |
-
}
|
455 |
-
|
456 |
-
// Save
|
457 |
-
// ---------------------------------------------------------------------------
|
458 |
-
|
459 |
-
public function update_fields($fields) {
|
460 |
-
|
461 |
-
if (is_array($fields)) {
|
462 |
-
|
463 |
-
// save in old format
|
464 |
-
foreach ($fields as $field_id => $field) {
|
465 |
-
|
466 |
-
if (!array_key_exists('name', $field)) {
|
467 |
-
return false;
|
468 |
}
|
469 |
|
470 |
-
|
471 |
-
|
472 |
-
$fields[$field_id] = $this->old_panel_compatibility($field_id, $field);
|
473 |
-
|
474 |
-
//error_log(json_encode($fields[$field_id]));
|
475 |
-
}
|
476 |
-
|
477 |
-
if ($this->update_option($fields)) {
|
478 |
-
return $fields;
|
479 |
-
}
|
480 |
-
}
|
481 |
-
|
482 |
-
return false;
|
483 |
-
}
|
484 |
-
|
485 |
-
public function update_field($field_id, $field_data) {
|
486 |
-
|
487 |
-
$fields = $this->get_fields_new();
|
488 |
-
|
489 |
-
if (array_key_exists($field_id, $fields)) {
|
490 |
-
|
491 |
-
//error_log(json_encode($field_data));
|
492 |
-
|
493 |
-
$field_data = $this->sanitize_field_data($field_data);
|
494 |
-
|
495 |
-
/// error_log(json_encode($field_data));
|
496 |
-
|
497 |
-
$fields[$field_id] = array_replace($fields[$field_id], $field_data);
|
498 |
-
|
499 |
-
//error_log(json_encode($fields[$field_id]));
|
500 |
-
|
501 |
-
if ($this->update_fields($fields)) {
|
502 |
-
return $fields[$field_id];
|
503 |
}
|
504 |
-
}
|
505 |
-
|
506 |
-
return false;
|
507 |
-
}
|
508 |
-
|
509 |
-
public function add_field($field_data) {
|
510 |
-
|
511 |
-
$fields = $this->get_fields_new();
|
512 |
-
|
513 |
-
$field_id = $this->get_id($fields);
|
514 |
|
515 |
-
|
516 |
-
|
517 |
-
$field_data = $this->new_panel_compatibility($field_id, $field_data, $fields);
|
518 |
-
|
519 |
-
$fields[] = $field_data;
|
520 |
-
|
521 |
-
if ($this->update_fields($fields)) {
|
522 |
-
return $field_data;
|
523 |
-
}
|
524 |
-
|
525 |
-
return false;
|
526 |
-
}
|
527 |
-
|
528 |
-
public function delete_field($field_id) {
|
529 |
-
|
530 |
-
$fields = $this->get_fields_new();
|
531 |
-
|
532 |
-
unset($fields[$field_id]);
|
533 |
-
|
534 |
-
if ($this->update_fields($fields)) {
|
535 |
-
return true;
|
536 |
}
|
537 |
|
538 |
return false;
|
@@ -541,44 +385,26 @@ class WOOCCM_Field_Compatibility extends WOOCCM_Field {
|
|
541 |
// Core
|
542 |
// -------------------------------------------------------------------------
|
543 |
|
544 |
-
protected function
|
545 |
|
546 |
-
if ($fields = get_option($
|
547 |
|
548 |
// Compatibility with 4.x
|
549 |
// ---------------------------------------------------------------------
|
550 |
-
if (array_key_exists("{$
|
551 |
-
$fields = $fields["{$
|
552 |
}
|
553 |
|
554 |
// Additional compatibility with 4.x
|
555 |
// ---------------------------------------------------------------------
|
556 |
-
if ('wccs_settings' == $
|
557 |
$fields = (array) @$fields['buttons'];
|
558 |
}
|
559 |
}
|
560 |
|
561 |
-
// Resort the fields by order
|
562 |
-
uasort($fields, array(__CLASS__, 'order_fields'));
|
563 |
-
|
564 |
return $fields;
|
565 |
}
|
566 |
|
567 |
-
protected function update_option($fields) {
|
568 |
-
|
569 |
-
$options = get_option($this->option_name, array());
|
570 |
-
|
571 |
-
// Additional compatibility with 4.x
|
572 |
-
// ---------------------------------------------------------------------
|
573 |
-
if ($this->option_name == 'wccs_settings') {
|
574 |
-
$options['buttons'] = $fields;
|
575 |
-
} else {
|
576 |
-
$options[$this->prefix . '_buttons'] = $fields;
|
577 |
-
}
|
578 |
-
|
579 |
-
update_option($this->option_name, $options);
|
580 |
-
|
581 |
-
return true;
|
582 |
-
}
|
583 |
-
|
584 |
}
|
|
|
|
1 |
<?php
|
2 |
|
3 |
+
class WOOCCM_Field_Compatibility {
|
4 |
|
5 |
+
protected $fields = null;
|
6 |
protected $prefix = '';
|
7 |
protected $option_name = '';
|
8 |
protected $defaults = array();
|
66 |
'single_max_yy' => null,
|
67 |
// Amount
|
68 |
// -------------------------------------------------------------------
|
69 |
+
'add_price' => null,
|
70 |
+
'add_price_name' => 'fee_name',
|
71 |
+
'add_price_total' => 'add_price_field',
|
72 |
+
'add_price_type' => null,
|
73 |
+
'add_price_tax' => 'tax_remove',
|
74 |
'extra_class' => null,
|
75 |
// Conditional
|
76 |
// -------------------------------------------------------------------
|
77 |
'conditional' => 'conditional_parent_use',
|
78 |
+
'conditional_parent_key' => 'conditional_tie',
|
79 |
'conditional_parent_value' => 'chosen_valt',
|
80 |
// Color
|
81 |
// -------------------------------------------------------------------
|
156 |
'sortable',
|
157 |
'filterable',
|
158 |
);
|
159 |
+
protected static $_instance;
|
160 |
+
|
161 |
+
public function __construct() {
|
162 |
+
$this->init();
|
163 |
+
}
|
164 |
+
|
165 |
+
public static function instance() {
|
166 |
+
|
167 |
+
if (is_null(self::$_instance)) {
|
168 |
+
self::$_instance = new self();
|
169 |
+
}
|
170 |
+
return self::$_instance;
|
171 |
+
}
|
172 |
+
|
173 |
+
public function init() {
|
174 |
+
|
175 |
+
if (false === get_option('wooccm_billing', false) && $fields = $this->get_fields_new('wccs_settings3', 'billing')) {
|
176 |
+
update_option('wooccm_billing', $fields);
|
177 |
+
}
|
178 |
+
|
179 |
+
if (false === get_option('wooccm_shipping', false) && $fields = $this->get_fields_new('wccs_settings2', 'shipping')) {
|
180 |
+
update_option('wooccm_shipping', $fields);
|
181 |
+
}
|
182 |
+
|
183 |
+
if (false === get_option('wooccm_additional', false) && $fields = $this->get_fields_new('wccs_settings', 'additional')) {
|
184 |
+
update_option('wooccm_additional', $fields);
|
185 |
+
}
|
186 |
+
}
|
187 |
|
188 |
function replace_keys($array = array(), $replace = array()) {
|
189 |
|
229 |
if (count($value)) {
|
230 |
$value = implode('||', $value);
|
231 |
} else {
|
|
|
|
|
|
|
232 |
$value = @$value[0];
|
233 |
}
|
234 |
}
|
236 |
return $value;
|
237 |
}
|
238 |
|
239 |
+
function get_new_args($field = array(), $prefix = '') {
|
240 |
|
241 |
$replace = array_flip(array_filter($this->old_to_old_args));
|
242 |
|
243 |
$field = $this->replace_keys($field, $replace);
|
244 |
|
245 |
+
$field = wp_parse_args($field, WOOCCM()->$prefix->get_args());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
246 |
|
247 |
return $field;
|
248 |
}
|
256 |
return $type;
|
257 |
}
|
258 |
|
259 |
+
function new_panel_compatibility($field_id, $field = array(), $fields = array(), $prefix = '') {
|
260 |
|
261 |
+
$field = $this->get_new_args($field, $prefix);
|
|
|
|
|
262 |
|
263 |
+
$field = WOOCCM()->$prefix->sanitize_field($field_id, $field, $fields);
|
264 |
|
265 |
+
// options compatibility
|
266 |
+
if (!empty($field['options']) && is_string($field['options'])) {
|
|
|
267 |
|
268 |
+
if (strpos($field['options'], '||') !== false) {
|
|
|
269 |
|
270 |
+
$options = explode('||', $field['options']);
|
271 |
|
272 |
+
if (is_array($options)) {
|
273 |
|
274 |
+
$field['options'] = array();
|
275 |
+
$i = 0;
|
276 |
+
foreach ($options as $key => $label) {
|
277 |
+
$field['options'][] = array(
|
278 |
+
'label' => $label,
|
279 |
+
'add_price_total' => 0,
|
280 |
+
'add_price_type' => 'fixed',
|
281 |
+
'add_price_tax' => 0,
|
282 |
+
'default' => ''
|
283 |
+
);
|
284 |
|
285 |
+
if (!empty($field['conditional_parent_value']) && $field['conditional_parent_value'] == $label) {
|
286 |
+
$field['conditional_parent_value'] = $i;
|
287 |
+
}
|
288 |
|
289 |
+
$i++;
|
290 |
+
}
|
291 |
+
}
|
|
|
|
|
|
|
292 |
}
|
293 |
}
|
294 |
|
295 |
+
if (!empty($field['conditional_parent_key']) && !empty($field['conditional_parent_key'])) {
|
296 |
+
if ($parent_id = @max(array_keys(array_column($fields, 'key'), $field['conditional_parent_key']))) {
|
297 |
+
if (isset($fields[$parent_id]) && !empty($fields[$parent_id]['options'])) {
|
298 |
+
$id = @max(array_keys(array_column($fields[$parent_id]['options'], 'label'), $field['conditional_parent_value']));
|
299 |
+
$field['conditional_parent_value'] = (int) $id;
|
300 |
+
}
|
301 |
}
|
302 |
}
|
303 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
304 |
if ($field['type'] == 'colorpicker' && !empty($field['colorpickerd'])) {
|
305 |
$field['default'] = $field['colorpickerd'];
|
306 |
}
|
307 |
+
|
308 |
$field['type'] = $this->get_new_type($field['type']);
|
309 |
|
310 |
$field['show_role'] = $this->string_to_array($field['show_role']);
|
311 |
$field['hide_role'] = $this->string_to_array($field['hide_role']);
|
|
|
312 |
$field['show_product'] = $this->string_to_array($field['show_product']);
|
313 |
$field['hide_product'] = $this->string_to_array($field['hide_product']);
|
314 |
$field['show_product_cat'] = $this->string_to_array($field['show_product_cat']);
|
315 |
$field['hide_product_cat'] = $this->string_to_array($field['hide_product_cat']);
|
316 |
+
$field['add_price_tax'] = !@$field['add_amount_tax'];
|
317 |
|
318 |
// Days
|
319 |
if (!empty($field['days_disabler'])) {
|
348 |
}
|
349 |
|
350 |
//return $field;
|
351 |
+
return WOOCCM()->$prefix->sanitize_field_data(array_intersect_key($field, array_flip(array_keys(WOOCCM()->$prefix->get_args()))));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
352 |
}
|
353 |
|
354 |
+
protected function get_fields_new($name, $prefix = '') {
|
355 |
|
356 |
+
if ($fields = $this->get_option_old($name, $prefix)) {
|
357 |
|
358 |
+
$defaults = WOOCCM()->$prefix->get_default_fields();
|
359 |
|
360 |
foreach ($fields as $field_id => $field) {
|
361 |
|
362 |
+
$field = $this->new_panel_compatibility($field_id, $field, $fields, $prefix);
|
|
|
|
|
363 |
|
364 |
+
if (count($defaults) && $default_id = @max(array_keys(array_column($defaults, 'key'), $field['key']))) {
|
|
|
|
|
|
|
|
|
|
|
365 |
|
366 |
+
if (isset($defaults[$default_id])) {
|
367 |
|
368 |
+
unset($field['type']);
|
369 |
|
370 |
+
unset($field['class']);
|
371 |
|
372 |
+
$field = wp_parse_args($field, $defaults[$default_id]);
|
373 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
374 |
}
|
375 |
|
376 |
+
$fields[$field_id] = $field;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
377 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
378 |
|
379 |
+
return $fields;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
380 |
}
|
381 |
|
382 |
return false;
|
385 |
// Core
|
386 |
// -------------------------------------------------------------------------
|
387 |
|
388 |
+
protected function get_option_old($name, $prefix) {
|
389 |
|
390 |
+
if ($fields = get_option($name)) {
|
391 |
|
392 |
// Compatibility with 4.x
|
393 |
// ---------------------------------------------------------------------
|
394 |
+
if (array_key_exists("{$prefix}_buttons", $fields)) {
|
395 |
+
$fields = $fields["{$prefix}_buttons"];
|
396 |
}
|
397 |
|
398 |
// Additional compatibility with 4.x
|
399 |
// ---------------------------------------------------------------------
|
400 |
+
if ('wccs_settings' == $name) {
|
401 |
$fields = (array) @$fields['buttons'];
|
402 |
}
|
403 |
}
|
404 |
|
|
|
|
|
|
|
405 |
return $fields;
|
406 |
}
|
407 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
408 |
}
|
409 |
+
|
410 |
+
WOOCCM_Field_Compatibility::instance();
|
includes/class-wooccm-install.php
ADDED
@@ -0,0 +1,92 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class WOOCCM_Install {
|
4 |
+
|
5 |
+
public static function install() {
|
6 |
+
|
7 |
+
// Check if we are not already running this routine.
|
8 |
+
if ('yes' === get_transient('wooccm_installing')) {
|
9 |
+
return;
|
10 |
+
}
|
11 |
+
|
12 |
+
// If we made it till here nothing is running yet, lets set the transient now.
|
13 |
+
set_transient('wooccm_installing', 'yes', MINUTE_IN_SECONDS * 10);
|
14 |
+
set_transient('wooccm-first-rating', true, MONTH_IN_SECONDS);
|
15 |
+
|
16 |
+
//wooccm_install();
|
17 |
+
}
|
18 |
+
|
19 |
+
public static function update() {
|
20 |
+
|
21 |
+
if (!get_option('wooccm_billing', false)) {
|
22 |
+
update_option(WOOCCM()->billing->get_fields());
|
23 |
+
}
|
24 |
+
|
25 |
+
if (!get_option('wooccm_shipping', false)) {
|
26 |
+
update_option(WOOCCM()->shipping->get_fields());
|
27 |
+
}
|
28 |
+
|
29 |
+
if (!get_option('wooccm_additional', false)) {
|
30 |
+
update_option(WOOCCM()->additional->get_fields());
|
31 |
+
}
|
32 |
+
}
|
33 |
+
|
34 |
+
public static function old_panel_compatibility($field_id, $field = array()) {
|
35 |
+
|
36 |
+
$field = $this->get_old_args($field);
|
37 |
+
|
38 |
+
$field = wp_parse_args($field, array_fill_keys($this->old_args, null));
|
39 |
+
|
40 |
+
if (!is_numeric($field['order'])) {
|
41 |
+
$field['order'] = $field_id + 1;
|
42 |
+
}
|
43 |
+
|
44 |
+
$field['type'] = $this->get_old_type($field['type']);
|
45 |
+
|
46 |
+
if (empty($field['position']) && isset($field['class'])) {
|
47 |
+
if ($position = $this->array_to_string(array_intersect((array) $field['class'], array('form-row-wide', 'form-row-first', 'form-row-last')))) {
|
48 |
+
$field['position'] = $position;
|
49 |
+
}
|
50 |
+
}
|
51 |
+
|
52 |
+
$field['role_option'] = $this->array_to_string($field['role_option']);
|
53 |
+
$field['role_option2'] = $this->array_to_string($field['role_option2']);
|
54 |
+
//$field['option_array'] = $this->array_to_string($field['option_array']);
|
55 |
+
$field['single_p'] = $this->array_to_string($field['single_p']);
|
56 |
+
$field['single_px'] = $this->array_to_string($field['single_px']);
|
57 |
+
$field['single_p_cat'] = $this->array_to_string($field['single_p_cat']);
|
58 |
+
$field['single_px_cat'] = $this->array_to_string($field['single_px_cat']);
|
59 |
+
$field['tax_remove'] = !$field['tax_remove'];
|
60 |
+
|
61 |
+
// Days
|
62 |
+
if (is_array($field['days_disabler'])) {
|
63 |
+
foreach ($field['days_disabler'] as $day_index => $day) {
|
64 |
+
$field['days_disabler' . strval($day_index)] = 1;
|
65 |
+
}
|
66 |
+
$field['days_disabler'] = 1;
|
67 |
+
unset($field['date_limit_days']);
|
68 |
+
}
|
69 |
+
|
70 |
+
// Dates
|
71 |
+
if (!empty($field['date_limit_fixed_min'])) {
|
72 |
+
|
73 |
+
$min = explode('-', $field['date_limit_fixed_min']);
|
74 |
+
|
75 |
+
$field['single_yy'] = $min[0];
|
76 |
+
$field['single_mm'] = $min[1];
|
77 |
+
$field['single_dd'] = $min[2];
|
78 |
+
}
|
79 |
+
|
80 |
+
if (!empty($field['date_limit_fixed_max'])) {
|
81 |
+
|
82 |
+
$max = explode('-', $field['date_limit_fixed_max']);
|
83 |
+
|
84 |
+
$field['single_max_yy'] = $max[0];
|
85 |
+
$field['single_max_mm'] = $max[1];
|
86 |
+
$field['single_max_dd'] = $max[2];
|
87 |
+
}
|
88 |
+
|
89 |
+
return array_intersect_key($field, array_flip($this->old_args));
|
90 |
+
}
|
91 |
+
|
92 |
+
}
|
{new → includes}/class-wooccm-notices.php
RENAMED
@@ -22,28 +22,73 @@ class WOOCCM_Notices {
|
|
22 |
}
|
23 |
|
24 |
public function ajax_dismiss_notice() {
|
25 |
-
if (current_user_can('manage_options')) {
|
26 |
|
27 |
-
|
28 |
|
29 |
-
|
30 |
|
31 |
-
|
32 |
|
33 |
-
|
34 |
-
}
|
35 |
-
}
|
36 |
}
|
|
|
37 |
wp_die();
|
38 |
}
|
39 |
|
40 |
public function add_notices() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
if (!get_transient('wooccm-first-rating') && !get_user_meta(get_current_user_id(), 'wooccm-user-rating', true)) {
|
42 |
?>
|
43 |
<div id="wooccm-admin-rating" class="wooccm-notice notice is-dismissible" data-notice_id="wooccm-user-rating">
|
44 |
<div class="notice-container" style="padding-top: 10px; padding-bottom: 10px; display: flex; justify-content: left; align-items: center;">
|
45 |
<div class="notice-image">
|
46 |
-
<img style="border-radius:50%;max-width: 90px;" src="<?php echo plugins_url('/assets/img/logo.jpg', WOOCCM_PLUGIN_FILE); ?>" alt="<?php echo esc_html(WOOCCM_PLUGIN_NAME); ?>>">
|
47 |
</div>
|
48 |
<div class="notice-content" style="margin-left: 15px;">
|
49 |
<p>
|
@@ -90,7 +135,7 @@ class WOOCCM_Notices {
|
|
90 |
public function add_action_links($links) {
|
91 |
|
92 |
$links[] = '<a target="_blank" href="' . WOOCCM_SUPPORT_URL . '">' . esc_html__('Support', 'woocommerce-checkout-manager') . '</a>';
|
93 |
-
$links[] = '<a href="' . admin_url('admin.php?page=
|
94 |
|
95 |
return $links;
|
96 |
}
|
22 |
}
|
23 |
|
24 |
public function ajax_dismiss_notice() {
|
|
|
25 |
|
26 |
+
if (check_admin_referer('wooccm_dismiss_notice', 'nonce') && isset($_REQUEST['notice_id'])) {
|
27 |
|
28 |
+
$notice_id = sanitize_key($_REQUEST['notice_id']);
|
29 |
|
30 |
+
update_user_meta(get_current_user_id(), $notice_id, true);
|
31 |
|
32 |
+
wp_send_json($notice_id);
|
|
|
|
|
33 |
}
|
34 |
+
|
35 |
wp_die();
|
36 |
}
|
37 |
|
38 |
public function add_notices() {
|
39 |
+
|
40 |
+
if (!get_user_meta(get_current_user_id(), 'wooccm-beta-notice', true)) {
|
41 |
+
?>
|
42 |
+
<div id="wooccm-admin-rating" class="wooccm-notice notice is-dismissible" data-notice_id="wooccm-beta-notice">
|
43 |
+
<div class="notice-container" style="padding-top: 10px; padding-bottom: 10px; display: flex; justify-content: left; align-items: center;">
|
44 |
+
<div class="notice-image">
|
45 |
+
<img style="border-radius:50%;max-width: 90px;" src="<?php echo plugins_url('/assets/backend/img/logo.jpg', WOOCCM_PLUGIN_FILE); ?>" alt="<?php echo esc_html(WOOCCM_PLUGIN_NAME); ?>>">
|
46 |
+
</div>
|
47 |
+
<div class="notice-content" style="margin-left: 15px;">
|
48 |
+
<p>
|
49 |
+
<h3>Hello! the new admin panel is here!</h3>
|
50 |
+
</p>
|
51 |
+
<p>
|
52 |
+
As you know, we've recently acquired this plugin and we've ween working very hard to bring you a quality product.
|
53 |
+
</p>
|
54 |
+
<p>
|
55 |
+
Finally, we're glad to introduce you to the new admin panel available in the WooCommerce > Checkout dashboard.
|
56 |
+
</p>
|
57 |
+
<p>
|
58 |
+
The entire panel has been rebuilt and now each field has its own modal of settings. Also, conditional relationships have been simplified.
|
59 |
+
</p>
|
60 |
+
<p>
|
61 |
+
This has been a titanic task and we were forced to remove some settings. We want to apologies to you if you experience some issues in the last couple of updates or even in this one. :)
|
62 |
+
</p>
|
63 |
+
<p>
|
64 |
+
Don't hesitate to contact us to report any issue or join our community to be in touch.
|
65 |
+
</p>
|
66 |
+
<p>
|
67 |
+
We wish you the best! and good luck with your sales! The QuadLayers team.
|
68 |
+
</p>
|
69 |
+
<p>
|
70 |
+
<a href="<?php echo esc_url(WOOCCM_GROUP_URL); ?>" class="button-primary" target="_blank">
|
71 |
+
<?php esc_html_e('Join Community!', 'woocommerce-checkout-manager'); ?>
|
72 |
+
</a>
|
73 |
+
<a href="<?php echo esc_url(WOOCCM_SUPPORT_URL); ?>" class="button-secondary" target="_blank">
|
74 |
+
<?php esc_html_e('Report a bug', 'woocommerce-checkout-manager'); ?>
|
75 |
+
</a>
|
76 |
+
<a style="margin-left: 10px;" href="https://quadlayers.com/?utm_source=wooccm_admin" target="_blank">
|
77 |
+
<?php esc_html_e('About us', 'woocommerce-checkout-manager'); ?>
|
78 |
+
</a>
|
79 |
+
</p>
|
80 |
+
</div>
|
81 |
+
</div>
|
82 |
+
</div>
|
83 |
+
<?php
|
84 |
+
}
|
85 |
+
|
86 |
if (!get_transient('wooccm-first-rating') && !get_user_meta(get_current_user_id(), 'wooccm-user-rating', true)) {
|
87 |
?>
|
88 |
<div id="wooccm-admin-rating" class="wooccm-notice notice is-dismissible" data-notice_id="wooccm-user-rating">
|
89 |
<div class="notice-container" style="padding-top: 10px; padding-bottom: 10px; display: flex; justify-content: left; align-items: center;">
|
90 |
<div class="notice-image">
|
91 |
+
<img style="border-radius:50%;max-width: 90px;" src="<?php echo plugins_url('/assets/backend/img/logo.jpg', WOOCCM_PLUGIN_FILE); ?>" alt="<?php echo esc_html(WOOCCM_PLUGIN_NAME); ?>>">
|
92 |
</div>
|
93 |
<div class="notice-content" style="margin-left: 15px;">
|
94 |
<p>
|
135 |
public function add_action_links($links) {
|
136 |
|
137 |
$links[] = '<a target="_blank" href="' . WOOCCM_SUPPORT_URL . '">' . esc_html__('Support', 'woocommerce-checkout-manager') . '</a>';
|
138 |
+
$links[] = '<a href="' . admin_url('admin.php?page=wc-settings&tab=' . sanitize_title(WOOCCM_PREFIX)) . '">' . esc_html__('Settings', 'woocommerce-checkout-manager') . '</a>';
|
139 |
|
140 |
return $links;
|
141 |
}
|
{new → includes}/class-wooccm.php
RENAMED
@@ -5,9 +5,17 @@ final class WOOCCM {
|
|
5 |
protected static $_instance;
|
6 |
|
7 |
public function __construct() {
|
8 |
-
|
9 |
-
|
10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
}
|
12 |
|
13 |
public static function instance() {
|
@@ -17,49 +25,31 @@ final class WOOCCM {
|
|
17 |
return self::$_instance;
|
18 |
}
|
19 |
|
20 |
-
function
|
21 |
|
22 |
-
|
|
|
|
|
23 |
|
24 |
-
|
25 |
-
|
26 |
-
$this->field = WOOCCM_Field_Controller::instance();
|
27 |
}
|
28 |
|
29 |
-
function includes() {
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
include_once( WOOCCM_PLUGIN_DIR . '
|
34 |
-
include_once( WOOCCM_PLUGIN_DIR . '
|
35 |
-
include_once( WOOCCM_PLUGIN_DIR . '
|
36 |
-
include_once( WOOCCM_PLUGIN_DIR . 'new/controller/class-wooccm-checkout-controller.php' );
|
37 |
-
include_once( WOOCCM_PLUGIN_DIR . 'new/controller/class-wooccm-field-controller.php' );
|
38 |
-
include_once( WOOCCM_PLUGIN_DIR . 'new/controller/class-wooccm-field-upload.php' );
|
39 |
-
include_once( WOOCCM_PLUGIN_DIR . 'new/controller/class-wooccm-order-controller.php' );
|
40 |
-
include_once( WOOCCM_PLUGIN_DIR . 'new/controller/class-wooccm-checkout-advanced-controller.php' );
|
41 |
-
}
|
42 |
-
|
43 |
-
function includes_old() {
|
44 |
-
// Old
|
45 |
-
// -----------------------------------------------------------------------
|
46 |
-
include_once( WOOCCM_PLUGIN_DIR . 'includes/install.php' );
|
47 |
-
include_once( WOOCCM_PLUGIN_DIR . 'includes/functions.php' );
|
48 |
-
//include_once( WOOCCM_PLUGIN_DIR . 'includes/checkout.php' );
|
49 |
-
include_once( WOOCCM_PLUGIN_DIR . 'includes/formatting.php' );
|
50 |
-
include_once( WOOCCM_PLUGIN_DIR . 'includes/admin.php' );
|
51 |
-
//include_once( WOOCCM_PLUGIN_DIR . 'includes/template.php' );
|
52 |
-
include_once( WOOCCM_PLUGIN_DIR . 'includes/export.php' );
|
53 |
-
include_once( WOOCCM_PLUGIN_DIR . 'includes/classes/main.php' );
|
54 |
}
|
55 |
|
56 |
public function register_scripts() {
|
57 |
|
58 |
// Frontend
|
59 |
// -----------------------------------------------------------------------
|
60 |
-
wp_register_style('wooccm', plugins_url('assets/css/wooccm.css', WOOCCM_PLUGIN_FILE), false, WOOCCM_PLUGIN_VERSION, 'all');
|
61 |
|
62 |
-
wp_register_script('wooccm-checkout', plugins_url('assets/js/wooccm-checkout.js', WOOCCM_PLUGIN_FILE), array('jquery'), WOOCCM_PLUGIN_VERSION, true);
|
63 |
|
64 |
wp_localize_script('wooccm-checkout', 'wooccm_upload', array(
|
65 |
'ajaxurl' => admin_url('admin-ajax.php'),
|
@@ -91,8 +81,8 @@ final class WOOCCM {
|
|
91 |
|
92 |
// Timepicker
|
93 |
// ---------------------------------------------------------------------
|
94 |
-
wp_register_style('jquery-ui-timepicker', plugins_url('assets/timepicker/jquery.ui.timepicker.css', WOOCCM_PLUGIN_FILE), false, WOOCCM_PLUGIN_VERSION);
|
95 |
-
wp_register_script('jquery-ui-timepicker', plugins_url('assets/timepicker/jquery.ui.timepicker.js', WOOCCM_PLUGIN_FILE), array('jquery'), WOOCCM_PLUGIN_VERSION);
|
96 |
|
97 |
// Colorpicker
|
98 |
// ---------------------------------------------------------------------
|
@@ -110,4 +100,16 @@ final class WOOCCM {
|
|
110 |
wp_register_script('farbtastic', admin_url('js/farbtastic.js'), array('jquery'), false);
|
111 |
}
|
112 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
113 |
}
|
5 |
protected static $_instance;
|
6 |
|
7 |
public function __construct() {
|
8 |
+
|
9 |
+
include_once( WOOCCM_PLUGIN_DIR . 'includes/class-wooccm-install.php' );
|
10 |
+
include_once( WOOCCM_PLUGIN_DIR . 'includes/class-wooccm-notices.php' );
|
11 |
+
|
12 |
+
register_activation_hook(WOOCCM_PLUGIN_FILE, array('WOOCCM_Install', 'install'));
|
13 |
+
|
14 |
+
load_plugin_textdomain('woocommerce-checkout-manager', false, dirname(plugin_basename(__FILE__)) . '/languages/');
|
15 |
+
|
16 |
+
add_action('woocommerce_init', array($this, 'init_session'));
|
17 |
+
add_action('woocommerce_init', array($this, 'includes'));
|
18 |
+
add_action('woocommerce_init', array($this, 'field'));
|
19 |
}
|
20 |
|
21 |
public static function instance() {
|
25 |
return self::$_instance;
|
26 |
}
|
27 |
|
28 |
+
public function field() {
|
29 |
|
30 |
+
$this->billing = WOOCCM_Field_Billing::instance();
|
31 |
+
$this->shipping = WOOCCM_Field_Shipping::instance();
|
32 |
+
$this->additional = WOOCCM_Field_Additional::instance();
|
33 |
|
34 |
+
include_once( WOOCCM_PLUGIN_DIR . 'includes/class-wooccm-compatibility.php' );
|
|
|
|
|
35 |
}
|
36 |
|
37 |
+
public function includes() {
|
38 |
+
include_once( WOOCCM_PLUGIN_DIR . 'includes/class-wooccm-admin.php' );
|
39 |
+
include_once( WOOCCM_PLUGIN_DIR . 'includes/controller/class-wooccm-checkout.php' );
|
40 |
+
include_once( WOOCCM_PLUGIN_DIR . 'includes/controller/class-wooccm-field.php' );
|
41 |
+
include_once( WOOCCM_PLUGIN_DIR . 'includes/controller/class-wooccm-field-upload.php' );
|
42 |
+
include_once( WOOCCM_PLUGIN_DIR . 'includes/controller/class-wooccm-order.php' );
|
43 |
+
include_once( WOOCCM_PLUGIN_DIR . 'includes/controller/class-wooccm-checkout-advanced.php' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
}
|
45 |
|
46 |
public function register_scripts() {
|
47 |
|
48 |
// Frontend
|
49 |
// -----------------------------------------------------------------------
|
50 |
+
wp_register_style('wooccm', plugins_url('assets/frontend/css/wooccm.css', WOOCCM_PLUGIN_FILE), false, WOOCCM_PLUGIN_VERSION, 'all');
|
51 |
|
52 |
+
wp_register_script('wooccm-checkout', plugins_url('assets/frontend/js/wooccm-checkout.js', WOOCCM_PLUGIN_FILE), array('jquery'), WOOCCM_PLUGIN_VERSION, true);
|
53 |
|
54 |
wp_localize_script('wooccm-checkout', 'wooccm_upload', array(
|
55 |
'ajaxurl' => admin_url('admin-ajax.php'),
|
81 |
|
82 |
// Timepicker
|
83 |
// ---------------------------------------------------------------------
|
84 |
+
wp_register_style('jquery-ui-timepicker', plugins_url('assets/frontend/timepicker/jquery.ui.timepicker.css', WOOCCM_PLUGIN_FILE), false, WOOCCM_PLUGIN_VERSION);
|
85 |
+
wp_register_script('jquery-ui-timepicker', plugins_url('assets/frontend/timepicker/jquery.ui.timepicker.js', WOOCCM_PLUGIN_FILE), array('jquery'), WOOCCM_PLUGIN_VERSION);
|
86 |
|
87 |
// Colorpicker
|
88 |
// ---------------------------------------------------------------------
|
100 |
wp_register_script('farbtastic', admin_url('js/farbtastic.js'), array('jquery'), false);
|
101 |
}
|
102 |
|
103 |
+
public function init_session() {
|
104 |
+
|
105 |
+
if (isset(WC()->session) && !WC()->session->wooccm) {
|
106 |
+
|
107 |
+
WC()->session->wooccm = array(
|
108 |
+
'fields' => array(),
|
109 |
+
'fees' => array(),
|
110 |
+
'files' => array(),
|
111 |
+
);
|
112 |
+
}
|
113 |
+
}
|
114 |
+
|
115 |
}
|
includes/classes/import.php
DELETED
@@ -1,187 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* WooCommerce Checkout Manager
|
4 |
-
*/
|
5 |
-
|
6 |
-
// Exit if accessed directly
|
7 |
-
if ( !defined( 'ABSPATH' ) ) exit;
|
8 |
-
|
9 |
-
// =======================================================
|
10 |
-
// IMPORT FUNCTION
|
11 |
-
// =======================================================
|
12 |
-
|
13 |
-
$options = get_option( 'wccs_settings' );
|
14 |
-
$options2 = get_option( 'wccs_settings2' );
|
15 |
-
$options3 = get_option( 'wccs_settings3' );
|
16 |
-
|
17 |
-
if( isset($_FILES['import']) && check_admin_referer('ie-import') ) {
|
18 |
-
|
19 |
-
if( $_FILES['import']['error'] > 0 ) {
|
20 |
-
// @mod - Add in error reporting
|
21 |
-
// Do something
|
22 |
-
} else {
|
23 |
-
$encode_options = $_FILES['import']['tmp_name'];
|
24 |
-
|
25 |
-
if( ( $handle = fopen( $encode_options , "r" ) ) !== FALSE ) {
|
26 |
-
$rows = 0;
|
27 |
-
$header = fgetcsv($handle, 10000, ",");
|
28 |
-
while( ( $data = fgetcsv($handle, 10000, ",")) !== FALSE ) {
|
29 |
-
$c = 0;
|
30 |
-
foreach( $header as $value ) {
|
31 |
-
$options['buttons'][$rows][$value] = $data[$c];
|
32 |
-
$c++;
|
33 |
-
}
|
34 |
-
$rows++;
|
35 |
-
update_option( 'wccs_settings', $options );
|
36 |
-
}
|
37 |
-
fclose($handle);
|
38 |
-
}
|
39 |
-
}
|
40 |
-
|
41 |
-
}
|
42 |
-
|
43 |
-
// BILLING IMPORT ===========================================================
|
44 |
-
// ==========================================================================
|
45 |
-
if( isset( $_FILES['billing-import'] ) && check_admin_referer( 'ie-import' ) ) {
|
46 |
-
|
47 |
-
if( $_FILES['billing-import']['error'] > 0 ) {
|
48 |
-
// @mod - Add in error reporting
|
49 |
-
// Do something
|
50 |
-
} else {
|
51 |
-
$encode_options = $_FILES['billing-import']['tmp_name'];
|
52 |
-
|
53 |
-
if( ( $handle = fopen( $encode_options , "r") ) !== FALSE ) {
|
54 |
-
$rows = 0;
|
55 |
-
$header = fgetcsv($handle, 10000, ",");
|
56 |
-
while( ( $data = fgetcsv($handle, 10000, ",")) !== FALSE ) {
|
57 |
-
$c = 0;
|
58 |
-
foreach( $header as $value ) {
|
59 |
-
$options3['billing_buttons'][$rows][$value] = $data[$c];
|
60 |
-
$c++;
|
61 |
-
}
|
62 |
-
$rows++;
|
63 |
-
update_option( 'wccs_settings3', $options3 );
|
64 |
-
}
|
65 |
-
fclose($handle);
|
66 |
-
}
|
67 |
-
}
|
68 |
-
|
69 |
-
}
|
70 |
-
|
71 |
-
// SHIPPING IMPORT ================================================================
|
72 |
-
// ================================================================================
|
73 |
-
if( isset( $_FILES['shipping-import'] ) && check_admin_referer( 'ie-import' ) ) {
|
74 |
-
|
75 |
-
if( $_FILES['shipping-import']['error'] > 0 ) {
|
76 |
-
// @mod - Add in error reporting
|
77 |
-
// Do something
|
78 |
-
} else {
|
79 |
-
$encode_options = $_FILES['shipping-import']['tmp_name'];
|
80 |
-
|
81 |
-
if( ( $handle = fopen( $encode_options , "r" ) ) !== FALSE ) {
|
82 |
-
$rows = 0;
|
83 |
-
$header = fgetcsv($handle, 10000, ",");
|
84 |
-
while( ($data = fgetcsv($handle, 10000, ",")) !== FALSE ) {
|
85 |
-
$c = 0;
|
86 |
-
foreach( $header as $value ) {
|
87 |
-
$options2['shipping_buttons'][$rows][$value] = $data[$c];
|
88 |
-
$c++;
|
89 |
-
}
|
90 |
-
$rows++;
|
91 |
-
update_option( 'wccs_settings2', $options2 );
|
92 |
-
}
|
93 |
-
fclose($handle);
|
94 |
-
}
|
95 |
-
}
|
96 |
-
|
97 |
-
}
|
98 |
-
|
99 |
-
// GENERAL IMPORT =========================================================== ..
|
100 |
-
// ==========================================================================
|
101 |
-
if( isset( $_FILES['general-import'] ) && check_admin_referer( 'ie-import' ) ) {
|
102 |
-
|
103 |
-
if( $_FILES['general-import']['error'] > 0 ) {
|
104 |
-
// @mod - Add in error reporting
|
105 |
-
// Do something
|
106 |
-
} else {
|
107 |
-
$encode_options = $_FILES['general-import']['tmp_name'];
|
108 |
-
|
109 |
-
if( ( $handle = fopen( $encode_options , "r" ) ) !== FALSE ) {
|
110 |
-
$rows = 0;
|
111 |
-
$header = fgetcsv($handle, 10000, ",");
|
112 |
-
while( ($data = fgetcsv($handle, 10000, ",") ) !== FALSE ) {
|
113 |
-
$c = 0;
|
114 |
-
foreach( $header as $value ) {
|
115 |
-
$options['checkness'][$value] = $data[$c];
|
116 |
-
$c++;
|
117 |
-
}
|
118 |
-
$rows++;
|
119 |
-
update_option( 'wccs_settings', $options );
|
120 |
-
}
|
121 |
-
}
|
122 |
-
fclose($handle);
|
123 |
-
}
|
124 |
-
|
125 |
-
}
|
126 |
-
|
127 |
-
// =======================================================================================================
|
128 |
-
?>
|
129 |
-
|
130 |
-
<form method='post' class='import_form' enctype='multipart/form-data'>
|
131 |
-
|
132 |
-
<?php wp_nonce_field('ie-import'); ?>
|
133 |
-
<input type="button" id="wccs_import_submit" class="button button-hero button-secondary import" value="Import" />
|
134 |
-
|
135 |
-
<div id="wp-auth-check-wrap" class="click_showWccm" style="display:none;">
|
136 |
-
<div id="wp-auth-check-bg"></div>
|
137 |
-
<div id="wp-auth-check" style="max-height: 700px;">
|
138 |
-
<div class="wp-auth-check-close" tabindex="0" title="Close"></div>
|
139 |
-
<div class="updated">
|
140 |
-
<h3><?php _e( 'Field Data Import', 'woocommerce-checkout-manager' ); ?></h3>
|
141 |
-
<p>
|
142 |
-
<?php _e( 'Import General Settings or new Billing, Shipping or Additional fields exported from the WooCheckout > Export screen back into WooCheckout.' ); ?><br /><br />
|
143 |
-
<span class="make_smalla">Max Upload Size: <?php echo size_format( wp_max_upload_size() ); ?> <br /></span>
|
144 |
-
</p>
|
145 |
-
</div>
|
146 |
-
<div class="updated jellow">
|
147 |
-
<p>
|
148 |
-
<span class="heading_smalla"><?php _e( 'General Settings', 'woocommerce-checkout-manager'); ?><br></span>
|
149 |
-
<input type="file" name="general-import" class="wccm_importer" />
|
150 |
-
<input type="submit" class="button button-primary wccm_importer_submit" name="submit" value="<?php _e('Import CSV', 'woocommerce-checkout-manager'); ?>" />
|
151 |
-
</p>
|
152 |
-
<hr />
|
153 |
-
<p>
|
154 |
-
<span class="heading_smalla"><?php _e( 'Billing fields', 'woocommerce-checkout-manager'); ?></span>
|
155 |
-
<input type="file" name="billing-import" class="wccm_importer" />
|
156 |
-
<input type="submit" class="button button-primary wccm_importer_submit" name="submit" value="<?php _e('Import CSV', 'woocommerce-checkout-manager'); ?>" />
|
157 |
-
</p>
|
158 |
-
<hr />
|
159 |
-
<p>
|
160 |
-
<span class="heading_smalla"><?php _e( 'Shipping fields', 'woocommerce-checkout-manager'); ?></span>
|
161 |
-
<input type="file" name="shipping-import" class="wccm_importer" />
|
162 |
-
<input type="submit" class="button button-primary wccm_importer_submit" name="submit" value="<?php _e('Import CSV', 'woocommerce-checkout-manager'); ?>" />
|
163 |
-
</p>
|
164 |
-
<hr />
|
165 |
-
<p>
|
166 |
-
<span class="heading_smalla"><?php _e( 'Additional fields', 'woocommerce-checkout-manager'); ?></span>
|
167 |
-
<input type="file" name="import" class="wccm_importer" />
|
168 |
-
<input type="submit" class="button button-primary wccm_importer_submit" name="submit" value="<?php _e('Import CSV', 'woocommerce-checkout-manager'); ?>" />
|
169 |
-
</p>
|
170 |
-
</div>
|
171 |
-
<!-- .updated -->
|
172 |
-
</div>
|
173 |
-
<!-- #wp-auth-check -->
|
174 |
-
</div>
|
175 |
-
<!-- #wp-auth-check-wrap -->
|
176 |
-
|
177 |
-
</form>
|
178 |
-
|
179 |
-
<script type="text/javascript">
|
180 |
-
jQuery(document).ready(function() {
|
181 |
-
|
182 |
-
jQuery('#wccs_import_submit').click(function() {
|
183 |
-
jQuery('#wp-auth-check-wrap').slideToggle('slow');
|
184 |
-
});
|
185 |
-
|
186 |
-
});
|
187 |
-
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/classes/main.php
DELETED
@@ -1,472 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* WooCommerce Checkout Manager
|
4 |
-
*
|
5 |
-
* MAIN
|
6 |
-
*
|
7 |
-
*/
|
8 |
-
// Exit if accessed directly
|
9 |
-
if (!defined('ABSPATH'))
|
10 |
-
exit;
|
11 |
-
|
12 |
-
//function wooccm_state_default_switch() {
|
13 |
-
//
|
14 |
-
// $options = get_option('wccs_settings');
|
15 |
-
//
|
16 |
-
// if (!empty($options['checkness']['per_state']) && !empty($options['checkness']['per_state_check'])) {
|
17 |
-
// return $options['checkness']['per_state'];
|
18 |
-
// }
|
19 |
-
//}
|
20 |
-
//
|
21 |
-
//add_filter('default_checkout_billing_state', 'wooccm_state_default_switch');
|
22 |
-
|
23 |
-
function wooccm_woocommerce_delivery_notes_compat($fields, $order) {
|
24 |
-
|
25 |
-
if (version_compare(wooccm_get_woo_version(), '2.7', '>=')) {
|
26 |
-
$order_id = ( method_exists($order, 'get_id') ? $order->get_id() : $order->id );
|
27 |
-
} else {
|
28 |
-
$order_id = ( isset($order->id) ? $order->id : 0 );
|
29 |
-
}
|
30 |
-
|
31 |
-
$new_fields = array();
|
32 |
-
|
33 |
-
$shipping = array(
|
34 |
-
'country',
|
35 |
-
'first_name',
|
36 |
-
'last_name',
|
37 |
-
'company',
|
38 |
-
'address_1',
|
39 |
-
'address_2',
|
40 |
-
'city',
|
41 |
-
'state',
|
42 |
-
'postcode'
|
43 |
-
);
|
44 |
-
$billing = array(
|
45 |
-
'country',
|
46 |
-
'first_name',
|
47 |
-
'last_name',
|
48 |
-
'company',
|
49 |
-
'address_1',
|
50 |
-
'address_2',
|
51 |
-
'city',
|
52 |
-
'state',
|
53 |
-
'postcode',
|
54 |
-
'email',
|
55 |
-
'phone'
|
56 |
-
);
|
57 |
-
|
58 |
-
$names = array(
|
59 |
-
'billing',
|
60 |
-
'shipping'
|
61 |
-
);
|
62 |
-
$inc = 3;
|
63 |
-
foreach ($names as $name) {
|
64 |
-
|
65 |
-
$array = ( $name == 'billing' ) ? $billing : $shipping;
|
66 |
-
|
67 |
-
$options = get_option('wccs_settings' . $inc);
|
68 |
-
if (!empty($options[$name . '_buttons'])) {
|
69 |
-
foreach ($options[$name . '_buttons'] as $btn) {
|
70 |
-
|
71 |
-
if (!in_array($btn['cow'], $array)) {
|
72 |
-
|
73 |
-
if (
|
74 |
-
get_post_meta($order_id, sprintf('_%s_%s', $name, $btn['cow']), true) &&
|
75 |
-
$btn['type'] !== 'wooccmupload' &&
|
76 |
-
$btn['type'] !== 'heading' &&
|
77 |
-
(
|
78 |
-
$btn['type'] !== 'multiselect' || $btn['type'] !== 'multicheckbox'
|
79 |
-
)
|
80 |
-
) {
|
81 |
-
$new_fields[sprintf('_%s_%s', $name, $btn['cow'])] = array(
|
82 |
-
'label' => wooccm_wpml_string($btn['label']),
|
83 |
-
'value' => get_post_meta($order_id, sprintf('_%s_%s', $name, $btn['cow']), true)
|
84 |
-
);
|
85 |
-
}
|
86 |
-
|
87 |
-
if (
|
88 |
-
get_post_meta($order_id, sprintf('_%s_%s', $name, $btn['cow']), true) &&
|
89 |
-
$btn['type'] !== 'wooccmupload' &&
|
90 |
-
$btn['type'] !== 'heading' &&
|
91 |
-
(
|
92 |
-
$btn['type'] == 'multiselect' || $btn['type'] == 'multicheckbox'
|
93 |
-
)
|
94 |
-
) {
|
95 |
-
$new_fields[sprintf('_%s_%s', $name, $btn['cow'])]['label'] = wooccm_wpml_string($btn['label']);
|
96 |
-
$new_fields[sprintf('_%s_%s', $name, $btn['cow'])]['value'] = '';
|
97 |
-
$value = get_post_meta($order_id, sprintf('_%s_%s', $name, $btn['cow']), true);
|
98 |
-
$strings = maybe_unserialize($value);
|
99 |
-
if (!empty($strings)) {
|
100 |
-
if (is_array($strings)) {
|
101 |
-
$iww = 0;
|
102 |
-
$len = count($strings);
|
103 |
-
foreach ($strings as $key) {
|
104 |
-
if ($iww == $len - 1) {
|
105 |
-
$new_fields[sprintf('_%s_%s', $name, $btn['cow'])]['value'] .= $key;
|
106 |
-
} else {
|
107 |
-
$new_fields[sprintf('_%s_%s', $name, $btn['cow'])]['value'] .= $key . ', ';
|
108 |
-
}
|
109 |
-
$iww++;
|
110 |
-
}
|
111 |
-
} else {
|
112 |
-
echo $strings;
|
113 |
-
}
|
114 |
-
} else {
|
115 |
-
echo '-';
|
116 |
-
}
|
117 |
-
} elseif ($btn['type'] == 'wooccmupload') {
|
118 |
-
$info = explode("||", get_post_meta($order_id, sprintf('_%s_%s', $name, $btn['cow']), true));
|
119 |
-
$btn['label'] = (!empty($btn['force_title2']) ? $btn['force_title2'] : $btn['label'] );
|
120 |
-
$new_fields[sprintf('_%s_%s', $name, $btn['cow'])] = array(
|
121 |
-
'label' => wooccm_wpml_string(trim($btn['label'])),
|
122 |
-
'value' => $info[0]
|
123 |
-
);
|
124 |
-
}
|
125 |
-
}
|
126 |
-
}
|
127 |
-
}
|
128 |
-
$inc--;
|
129 |
-
}
|
130 |
-
|
131 |
-
$options = get_option('wccs_settings');
|
132 |
-
if (!empty($options['buttons'])) {
|
133 |
-
foreach ($options['buttons'] as $btn) {
|
134 |
-
|
135 |
-
if (
|
136 |
-
get_post_meta($order_id, $btn['cow'], true) &&
|
137 |
-
$btn['type'] !== 'wooccmupload' &&
|
138 |
-
$btn['type'] !== 'heading' &&
|
139 |
-
(
|
140 |
-
$btn['type'] !== 'multiselect' || $btn['type'] !== 'multicheckbox'
|
141 |
-
)
|
142 |
-
) {
|
143 |
-
$new_fields[$btn['cow']] = array(
|
144 |
-
'label' => wooccm_wpml_string($btn['label']),
|
145 |
-
'value' => get_post_meta($order_id, $btn['cow'], true)
|
146 |
-
);
|
147 |
-
}
|
148 |
-
|
149 |
-
if (
|
150 |
-
get_post_meta($order_id, $btn['cow'], true) &&
|
151 |
-
$btn['type'] !== 'wooccmupload' &&
|
152 |
-
$btn['type'] !== 'heading' &&
|
153 |
-
(
|
154 |
-
$btn['type'] == 'multiselect' || $btn['type'] == 'multicheckbox'
|
155 |
-
)
|
156 |
-
) {
|
157 |
-
$new_fields[$btn['cow']]['label'] = wooccm_wpml_string($btn['label']);
|
158 |
-
$new_fields[$btn['cow']]['value'] = '';
|
159 |
-
$value = get_post_meta($order_id, $btn['cow'], true);
|
160 |
-
$strings = maybe_unserialize($value);
|
161 |
-
if (!empty($strings)) {
|
162 |
-
if (is_array($strings)) {
|
163 |
-
$iww = 0;
|
164 |
-
$len = count($strings);
|
165 |
-
foreach ($strings as $key) {
|
166 |
-
if ($iww == $len - 1) {
|
167 |
-
$new_fields[$btn['cow']]['value'] .= $key;
|
168 |
-
} else {
|
169 |
-
$new_fields[$btn['cow']]['value'] .= $key . ', ';
|
170 |
-
}
|
171 |
-
$iww++;
|
172 |
-
}
|
173 |
-
} else {
|
174 |
-
echo $strings;
|
175 |
-
}
|
176 |
-
} else {
|
177 |
-
echo '-';
|
178 |
-
}
|
179 |
-
}
|
180 |
-
|
181 |
-
if ($btn['type'] == 'wooccmupload') {
|
182 |
-
$info = get_post_meta($order_id, $btn['cow'], true);
|
183 |
-
$btn['label'] = (!empty($btn['force_title2']) ? $btn['force_title2'] : $btn['label'] );
|
184 |
-
$new_fields[$btn['cow']] = array(
|
185 |
-
'label' => wooccm_wpml_string(trim($btn['label'])),
|
186 |
-
'value' => $info[0]
|
187 |
-
);
|
188 |
-
}
|
189 |
-
}
|
190 |
-
}
|
191 |
-
|
192 |
-
return array_merge($fields, $new_fields);
|
193 |
-
}
|
194 |
-
|
195 |
-
add_filter('wcdn_order_info_fields', 'wooccm_woocommerce_delivery_notes_compat', 10, 2);
|
196 |
-
|
197 |
-
//function wooccm_order_notes($fields = array()) {
|
198 |
-
//
|
199 |
-
// $options = get_option('wccs_settings');
|
200 |
-
//
|
201 |
-
// if (!empty($options['checkness']['noteslabel'])) {
|
202 |
-
// $fields['order']['order_comments']['label'] = $options['checkness']['noteslabel'];
|
203 |
-
// }
|
204 |
-
// if (!empty($options['checkness']['notesplaceholder'])) {
|
205 |
-
// $fields['order']['order_comments']['placeholder'] = $options['checkness']['notesplaceholder'];
|
206 |
-
// }
|
207 |
-
// if (!empty($options['checkness']['notesenable'])) {
|
208 |
-
// unset($fields['order']['order_comments']);
|
209 |
-
// }
|
210 |
-
//
|
211 |
-
// return $fields;
|
212 |
-
//}
|
213 |
-
//
|
214 |
-
//add_action('woocommerce_checkout_fields', 'wooccm_order_notes');
|
215 |
-
|
216 |
-
function woooccm_restrict_manage_posts() {
|
217 |
-
|
218 |
-
$options = get_option('wccs_settings');
|
219 |
-
$options2 = get_option('wccs_settings2');
|
220 |
-
$options3 = get_option('wccs_settings3');
|
221 |
-
|
222 |
-
$billing = array(
|
223 |
-
'country',
|
224 |
-
'first_name',
|
225 |
-
'last_name',
|
226 |
-
'company',
|
227 |
-
'address_1',
|
228 |
-
'address_2',
|
229 |
-
'city',
|
230 |
-
'state',
|
231 |
-
'postcode',
|
232 |
-
'email',
|
233 |
-
'phone'
|
234 |
-
);
|
235 |
-
$shipping = array(
|
236 |
-
'country',
|
237 |
-
'first_name',
|
238 |
-
'last_name',
|
239 |
-
'company',
|
240 |
-
'address_1',
|
241 |
-
'address_2',
|
242 |
-
'city',
|
243 |
-
'state',
|
244 |
-
'postcode'
|
245 |
-
);
|
246 |
-
|
247 |
-
$post_type = 'shop_order';
|
248 |
-
if (get_current_screen()->post_type == $post_type) {
|
249 |
-
|
250 |
-
$values = array();
|
251 |
-
if (!empty($options['buttons'])) {
|
252 |
-
foreach ($options['buttons'] as $name) {
|
253 |
-
$values[$name['label']] = $name['cow'];
|
254 |
-
}
|
255 |
-
}
|
256 |
-
if (!empty($values)) {
|
257 |
-
array_unique($values);
|
258 |
-
}
|
259 |
-
|
260 |
-
$values2 = array();
|
261 |
-
if (!empty($options2['shipping_buttons'])) {
|
262 |
-
foreach ($options2['shipping_buttons'] as $name) {
|
263 |
-
if (!in_array($name['cow'], $shipping)) {
|
264 |
-
$values2['Shipping ' . $name['label']] = sprintf('_shipping_%s', $name['cow']);
|
265 |
-
}
|
266 |
-
}
|
267 |
-
}
|
268 |
-
if (!empty($values2)) {
|
269 |
-
array_unique($values2);
|
270 |
-
}
|
271 |
-
|
272 |
-
$values3 = array();
|
273 |
-
if (!empty($options3['billing_buttons'])) {
|
274 |
-
foreach ($options3['billing_buttons'] as $name) {
|
275 |
-
if (!in_array($name['cow'], $billing)) {
|
276 |
-
$values3['Billing ' . $name['label']] = sprintf('_billing_%s', $name['cow']);
|
277 |
-
}
|
278 |
-
}
|
279 |
-
}
|
280 |
-
if (!empty($values3)) {
|
281 |
-
array_unique($values3);
|
282 |
-
}
|
283 |
-
|
284 |
-
if (!empty($values) && !empty($values2) && !empty($values3)) {
|
285 |
-
$values = array_merge($values, $values2);
|
286 |
-
$values = array_merge($values, $values3);
|
287 |
-
} elseif (!empty($values) && !empty($values2) && empty($values3)) {
|
288 |
-
$values = array_merge($values, $values2);
|
289 |
-
} elseif (!empty($values) && empty($values2) && !empty($values3)) {
|
290 |
-
$values = array_merge($values, $values3);
|
291 |
-
} elseif (empty($values) && !empty($values2) && !empty($values3)) {
|
292 |
-
$values = array_merge($values2, $values3);
|
293 |
-
} elseif (empty($values) && empty($values2) && !empty($values3)) {
|
294 |
-
$values = $values3;
|
295 |
-
} elseif (empty($values) && !empty($values2) && empty($values3)) {
|
296 |
-
$values = $values2;
|
297 |
-
} elseif (!empty($values) && empty($values2) && empty($values3)) {
|
298 |
-
$values = $values;
|
299 |
-
}
|
300 |
-
?>
|
301 |
-
<select name="wooccm_abbreviation">
|
302 |
-
<?php if (empty($values) && empty($values2) && empty($values3)) { ?>
|
303 |
-
<option value=""><?php _e('No Added Fields', 'woocommerce-checkout-manager'); ?></option>
|
304 |
-
<?php } else { ?>
|
305 |
-
<option value=""><?php _e('Field Name', 'woocommerce-checkout-manager'); ?></option>
|
306 |
-
<?php } ?>
|
307 |
-
<?php
|
308 |
-
$current_v = ( isset($_GET['wooccm_abbreviation']) ? sanitize_text_field($_GET['wooccm_abbreviation']) : '' );
|
309 |
-
if (!empty($values)) {
|
310 |
-
foreach ($values as $label => $value) {
|
311 |
-
printf(
|
312 |
-
'<option value="%s"%s>%s</option>', $value, $value == $current_v ? ' selected="selected"' : '', $label
|
313 |
-
);
|
314 |
-
}
|
315 |
-
}
|
316 |
-
?>
|
317 |
-
</select>
|
318 |
-
<?php
|
319 |
-
}
|
320 |
-
}
|
321 |
-
|
322 |
-
add_action('restrict_manage_posts', 'woooccm_restrict_manage_posts');
|
323 |
-
|
324 |
-
function wooccm_query_list($query) {
|
325 |
-
|
326 |
-
global $pagenow;
|
327 |
-
|
328 |
-
$wooccm_abbreviation = ( isset($_GET['wooccm_abbreviation']) ? sanitize_text_field($_GET['wooccm_abbreviation']) : '' );
|
329 |
-
if (is_admin() && $pagenow == 'edit.php' && $wooccm_abbreviation != '') {
|
330 |
-
$query->query_vars['meta_key'] = $wooccm_abbreviation;
|
331 |
-
}
|
332 |
-
}
|
333 |
-
|
334 |
-
add_filter('parse_query', 'wooccm_query_list');
|
335 |
-
|
336 |
-
// ========================================
|
337 |
-
// Remove conditional notices
|
338 |
-
// ========================================
|
339 |
-
|
340 |
-
//function wooccm_remove_notices_conditional($posted) {
|
341 |
-
//
|
342 |
-
// $notice = WC()->session->get('wc_notices');
|
343 |
-
//
|
344 |
-
// $shipping = array(
|
345 |
-
// 'country',
|
346 |
-
// 'first_name',
|
347 |
-
// 'last_name',
|
348 |
-
// 'company',
|
349 |
-
// 'address_1',
|
350 |
-
// 'address_2',
|
351 |
-
// 'city',
|
352 |
-
// 'state',
|
353 |
-
// 'postcode'
|
354 |
-
// );
|
355 |
-
// $billing = array(
|
356 |
-
// 'country',
|
357 |
-
// 'first_name',
|
358 |
-
// 'last_name',
|
359 |
-
// 'company',
|
360 |
-
// 'address_1',
|
361 |
-
// 'address_2',
|
362 |
-
// 'city',
|
363 |
-
// 'state',
|
364 |
-
// 'postcode',
|
365 |
-
// 'email',
|
366 |
-
// 'phone'
|
367 |
-
// );
|
368 |
-
//
|
369 |
-
// $options = get_option('wccs_settings');
|
370 |
-
// $buttons = ( isset($options['buttons']) ? $options['buttons'] : false );
|
371 |
-
//
|
372 |
-
// $names = array(
|
373 |
-
// 'billing',
|
374 |
-
// 'shipping'
|
375 |
-
// );
|
376 |
-
// $inc = 3;
|
377 |
-
// foreach ($names as $name) {
|
378 |
-
//
|
379 |
-
// $array = ( $name == 'billing' ) ? $billing : $shipping;
|
380 |
-
//
|
381 |
-
// $options2 = get_option('wccs_settings' . $inc);
|
382 |
-
// if (!empty($options2[$name . '_buttons'])) {
|
383 |
-
// foreach ($options2[$name . '_buttons'] as $btn) {
|
384 |
-
//
|
385 |
-
// if (
|
386 |
-
// !empty($btn['chosen_valt']) &&
|
387 |
-
// !empty($btn['conditional_parent_use']) &&
|
388 |
-
// !empty($btn['conditional_tie']) &&
|
389 |
-
// $btn['type'] !== 'changename' &&
|
390 |
-
// $btn['type'] !== 'heading' &&
|
391 |
-
// !empty($btn['conditional_parent'])
|
392 |
-
// ) {
|
393 |
-
// if (!empty($_POST[$btn['cow']])) {
|
394 |
-
// foreach ($buttons as $btn2) {
|
395 |
-
//
|
396 |
-
// if (
|
397 |
-
// !empty($btn2['chosen_valt']) &&
|
398 |
-
// !empty($btn2['conditional_parent_use']) &&
|
399 |
-
// !empty($btn2['conditional_tie']) &&
|
400 |
-
// $btn2['type'] !== 'changename' &&
|
401 |
-
// $btn2['type'] !== 'heading' &&
|
402 |
-
// empty($btn2['conditional_parent'])
|
403 |
-
// ) {
|
404 |
-
// if (sanitize_text_field($_POST[$btn['cow']]) != $btn2['chosen_valt']) {
|
405 |
-
// if (empty($_POST[$btn2['cow']])) {
|
406 |
-
// foreach ($notice['error'] as $position => $value) {
|
407 |
-
//
|
408 |
-
// if (strip_tags($value) == sprintf(__('%s is a required field.', 'woocommerce'), wooccm_wpml_string($btn2['label']))) {
|
409 |
-
// unset($notice['error'][$position]);
|
410 |
-
// }
|
411 |
-
// }
|
412 |
-
// }
|
413 |
-
// }
|
414 |
-
// }
|
415 |
-
// }
|
416 |
-
// } else {
|
417 |
-
// foreach ($notice['error'] as $position => $value) {
|
418 |
-
//
|
419 |
-
// if (strip_tags($value) == sprintf(__('%s is a required field.', 'woocommerce'), wooccm_wpml_string($btn2['label']))) {
|
420 |
-
// unset($notice['error'][$position]);
|
421 |
-
// }
|
422 |
-
// }
|
423 |
-
// }
|
424 |
-
// }
|
425 |
-
// }
|
426 |
-
// }
|
427 |
-
// $inc--;
|
428 |
-
// }
|
429 |
-
//
|
430 |
-
// $options = get_option('wccs_settings');
|
431 |
-
//
|
432 |
-
// global $woocommerce;
|
433 |
-
//
|
434 |
-
// if (!empty($options['buttons'])) {
|
435 |
-
// foreach ($options['buttons'] as $btn) {
|
436 |
-
//
|
437 |
-
// if (!empty($btn['chosen_valt']) && !empty($btn['conditional_parent_use']) && !empty($btn['conditional_tie']) && $btn['type'] !== 'changename' && ($btn['type'] !== 'heading') && !empty($btn['conditional_parent'])) {
|
438 |
-
//
|
439 |
-
// if (!empty($_POST[$btn['cow']])) {
|
440 |
-
//
|
441 |
-
// foreach ($options['buttons'] as $btn2) {
|
442 |
-
//
|
443 |
-
// if (!empty($btn2['chosen_valt']) && !empty($btn2['conditional_parent_use']) && !empty($btn2['conditional_tie']) && $btn2['type'] !== 'changename' && ($btn2['type'] !== 'heading') && empty($btn2['conditional_parent'])) {
|
444 |
-
// if (sanitize_text_field($_POST[$btn['cow']]) != $btn2['chosen_valt']) {
|
445 |
-
// if (empty($_POST[$btn2['cow']])) {
|
446 |
-
// foreach ($notice['error'] as $position => $value) {
|
447 |
-
//
|
448 |
-
// if (strip_tags($value) == sprintf(__('%s is a required field.', 'woocommerce'), wooccm_wpml_string($btn2['label']))) {
|
449 |
-
// unset($notice['error'][$position]);
|
450 |
-
// }
|
451 |
-
// }
|
452 |
-
// }
|
453 |
-
// }
|
454 |
-
// }
|
455 |
-
// }
|
456 |
-
// } else {
|
457 |
-
//
|
458 |
-
// foreach ($notice['error'] as $position => $value) {
|
459 |
-
//
|
460 |
-
// if (strip_tags($value) == sprintf(__('%s is a required field.', 'woocommerce'), wooccm_wpml_string($btn2['label']))) {
|
461 |
-
// unset($notice['error'][$position]);
|
462 |
-
// }
|
463 |
-
// }
|
464 |
-
// }
|
465 |
-
// }
|
466 |
-
// }
|
467 |
-
// }
|
468 |
-
//
|
469 |
-
// WC()->session->set('wc_notices', $notice);
|
470 |
-
//}
|
471 |
-
//
|
472 |
-
//add_action('woocommerce_after_checkout_validation', 'wooccm_remove_notices_conditional');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
new/controller/class-wooccm-checkout-advanced-controller.php → includes/controller/class-wooccm-checkout-advanced.php
RENAMED
@@ -2,7 +2,18 @@
|
|
2 |
|
3 |
class WOOCCM_Checkout_Advanced_Controller {
|
4 |
|
5 |
-
protected static $
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
|
7 |
public function add_inline_scripts() {
|
8 |
|
@@ -59,7 +70,7 @@ class WOOCCM_Checkout_Advanced_Controller {
|
|
59 |
|
60 |
$settings = $this->get_settings();
|
61 |
|
62 |
-
include_once(WOOCCM_PLUGIN_DIR . '
|
63 |
}
|
64 |
}
|
65 |
|
@@ -96,14 +107,6 @@ class WOOCCM_Checkout_Advanced_Controller {
|
|
96 |
add_filter('default_option_wooccm_advanced_custom_css', array($this, 'custom_css_w'));
|
97 |
}
|
98 |
|
99 |
-
public static function instance() {
|
100 |
-
if (!isset(self::$instance)) {
|
101 |
-
self::$instance = new self();
|
102 |
-
self::$instance->init();
|
103 |
-
}
|
104 |
-
return self::$instance;
|
105 |
-
}
|
106 |
-
|
107 |
}
|
108 |
|
109 |
WOOCCM_Checkout_Advanced_Controller::instance();
|
2 |
|
3 |
class WOOCCM_Checkout_Advanced_Controller {
|
4 |
|
5 |
+
protected static $_instance;
|
6 |
+
|
7 |
+
public function __construct() {
|
8 |
+
$this->init();
|
9 |
+
}
|
10 |
+
|
11 |
+
public static function instance() {
|
12 |
+
if (is_null(self::$_instance)) {
|
13 |
+
self::$_instance = new self();
|
14 |
+
}
|
15 |
+
return self::$_instance;
|
16 |
+
}
|
17 |
|
18 |
public function add_inline_scripts() {
|
19 |
|
70 |
|
71 |
$settings = $this->get_settings();
|
72 |
|
73 |
+
include_once( WOOCCM_PLUGIN_DIR . 'includes/view/backend/pages/advanced.php' );
|
74 |
}
|
75 |
}
|
76 |
|
107 |
add_filter('default_option_wooccm_advanced_custom_css', array($this, 'custom_css_w'));
|
108 |
}
|
109 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
110 |
}
|
111 |
|
112 |
WOOCCM_Checkout_Advanced_Controller::instance();
|
new/controller/class-wooccm-checkout-controller.php → includes/controller/class-wooccm-checkout.php
RENAMED
@@ -2,7 +2,18 @@
|
|
2 |
|
3 |
class WOOCCM_Checkout_Controller {
|
4 |
|
5 |
-
protected static $
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
|
7 |
public function enqueue_scripts() {
|
8 |
|
@@ -249,7 +260,7 @@ class WOOCCM_Checkout_Controller {
|
|
249 |
|
250 |
$settings = $this->get_settings();
|
251 |
|
252 |
-
include_once(WOOCCM_PLUGIN_DIR . '
|
253 |
}
|
254 |
}
|
255 |
|
@@ -369,14 +380,6 @@ class WOOCCM_Checkout_Controller {
|
|
369 |
add_filter('default_option_wooccm_checkout_checkout_form_after_message', array($this, 'text2'));
|
370 |
}
|
371 |
|
372 |
-
public static function instance() {
|
373 |
-
if (!isset(self::$instance)) {
|
374 |
-
self::$instance = new self();
|
375 |
-
self::$instance->init();
|
376 |
-
}
|
377 |
-
return self::$instance;
|
378 |
-
}
|
379 |
-
|
380 |
}
|
381 |
|
382 |
WOOCCM_Checkout_Controller::instance();
|
2 |
|
3 |
class WOOCCM_Checkout_Controller {
|
4 |
|
5 |
+
protected static $_instance;
|
6 |
+
|
7 |
+
public function __construct() {
|
8 |
+
$this->init();
|
9 |
+
}
|
10 |
+
|
11 |
+
public static function instance() {
|
12 |
+
if (is_null(self::$_instance)) {
|
13 |
+
self::$_instance = new self();
|
14 |
+
}
|
15 |
+
return self::$_instance;
|
16 |
+
}
|
17 |
|
18 |
public function enqueue_scripts() {
|
19 |
|
260 |
|
261 |
$settings = $this->get_settings();
|
262 |
|
263 |
+
include_once( WOOCCM_PLUGIN_DIR . 'includes/view/backend/pages/checkout.php' );
|
264 |
}
|
265 |
}
|
266 |
|
380 |
add_filter('default_option_wooccm_checkout_checkout_form_after_message', array($this, 'text2'));
|
381 |
}
|
382 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
383 |
}
|
384 |
|
385 |
WOOCCM_Checkout_Controller::instance();
|
{new → includes}/controller/class-wooccm-field-upload.php
RENAMED
@@ -2,7 +2,18 @@
|
|
2 |
|
3 |
class WOOCCM_Upload {
|
4 |
|
5 |
-
protected static $
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
|
7 |
protected function process_uploads($files, $key, $post_id = 0) {
|
8 |
|
@@ -103,21 +114,21 @@ class WOOCCM_Upload {
|
|
103 |
|
104 |
public function checkout_billing_attachment_update_ids($order_id = 0) {
|
105 |
|
106 |
-
$fields = WOOCCM()->
|
107 |
|
108 |
$this->checkout_attachment_update_ids($order_id, 'billing_', $fields);
|
109 |
}
|
110 |
|
111 |
public function checkout_shipping_attachment_update_ids($order_id = 0) {
|
112 |
|
113 |
-
$fields = WOOCCM()->
|
114 |
|
115 |
$this->checkout_attachment_update_ids($order_id, 'shipping_', $fields);
|
116 |
}
|
117 |
|
118 |
public function checkout_additional_attachment_update_ids($order_id = 0) {
|
119 |
|
120 |
-
$fields = WOOCCM()->
|
121 |
|
122 |
$this->checkout_attachment_update_ids($order_id, '', $fields);
|
123 |
}
|
@@ -130,13 +141,9 @@ class WOOCCM_Upload {
|
|
130 |
|
131 |
foreach ($fields as $id => $field) {
|
132 |
|
133 |
-
if ($field['type'] == '
|
134 |
|
135 |
-
|
136 |
-
$key = sprintf("_%s%s", $prefix, $field['cow']);
|
137 |
-
} else {
|
138 |
-
$key = $field['cow'];
|
139 |
-
}
|
140 |
|
141 |
if ($attachments = get_post_meta($order_id, $key, true)) {
|
142 |
|
@@ -169,14 +176,6 @@ class WOOCCM_Upload {
|
|
169 |
add_action('woocommerce_checkout_update_order_meta', array($this, 'checkout_additional_attachment_update_ids'));
|
170 |
}
|
171 |
|
172 |
-
public static function instance() {
|
173 |
-
if (!isset(self::$instance)) {
|
174 |
-
self::$instance = new self();
|
175 |
-
self::$instance->init();
|
176 |
-
}
|
177 |
-
return self::$instance;
|
178 |
-
}
|
179 |
-
|
180 |
}
|
181 |
|
182 |
-
WOOCCM_Upload::instance();
|
2 |
|
3 |
class WOOCCM_Upload {
|
4 |
|
5 |
+
protected static $_instance;
|
6 |
+
|
7 |
+
public function __construct() {
|
8 |
+
$this->init();
|
9 |
+
}
|
10 |
+
|
11 |
+
public static function instance() {
|
12 |
+
if (is_null(self::$_instance)) {
|
13 |
+
self::$_instance = new self();
|
14 |
+
}
|
15 |
+
return self::$_instance;
|
16 |
+
}
|
17 |
|
18 |
protected function process_uploads($files, $key, $post_id = 0) {
|
19 |
|
114 |
|
115 |
public function checkout_billing_attachment_update_ids($order_id = 0) {
|
116 |
|
117 |
+
$fields = WOOCCM()->billing->get_fields();
|
118 |
|
119 |
$this->checkout_attachment_update_ids($order_id, 'billing_', $fields);
|
120 |
}
|
121 |
|
122 |
public function checkout_shipping_attachment_update_ids($order_id = 0) {
|
123 |
|
124 |
+
$fields = WOOCCM()->shipping->get_fields();
|
125 |
|
126 |
$this->checkout_attachment_update_ids($order_id, 'shipping_', $fields);
|
127 |
}
|
128 |
|
129 |
public function checkout_additional_attachment_update_ids($order_id = 0) {
|
130 |
|
131 |
+
$fields = WOOCCM()->additional->get_fields();
|
132 |
|
133 |
$this->checkout_attachment_update_ids($order_id, '', $fields);
|
134 |
}
|
141 |
|
142 |
foreach ($fields as $id => $field) {
|
143 |
|
144 |
+
if ($field['type'] == 'file') {
|
145 |
|
146 |
+
$key = sprintf('_%s', $field['key']);
|
|
|
|
|
|
|
|
|
147 |
|
148 |
if ($attachments = get_post_meta($order_id, $key, true)) {
|
149 |
|
176 |
add_action('woocommerce_checkout_update_order_meta', array($this, 'checkout_additional_attachment_update_ids'));
|
177 |
}
|
178 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
179 |
}
|
180 |
|
181 |
+
WOOCCM_Upload::instance();
|
new/controller/class-wooccm-field-controller.php → includes/controller/class-wooccm-field.php
RENAMED
@@ -23,12 +23,12 @@ class WOOCCM_Field_Controller {
|
|
23 |
|
24 |
global $current_section;
|
25 |
|
26 |
-
wp_register_script('wooccm-field', plugins_url('assets/js/wooccm-field.js', WOOCCM_PLUGIN_FILE), array('jquery', 'jquery-ui-datepicker', 'backbone', 'wp-util'), WOOCCM_PLUGIN_VERSION, true);
|
27 |
|
28 |
wp_localize_script('wooccm-field', 'wooccm_field', array(
|
29 |
'ajax_url' => admin_url('admin-ajax.php?section=' . $current_section),
|
30 |
'nonce' => wp_create_nonce('wooccm_field'),
|
31 |
-
'args' => WOOCCM()->
|
32 |
'message' => array(
|
33 |
'remove' => esc_html__('Are you sure you want to remove this field?', 'woocommerce-checkout-manager'),
|
34 |
'reset' => esc_html__('Are you sure you want to reset this fields?', 'woocommerce-checkout-manager')
|
@@ -74,15 +74,24 @@ class WOOCCM_Field_Controller {
|
|
74 |
|
75 |
if (current_user_can('manage_woocommerce') && check_ajax_referer('wooccm_field', 'nonce') && isset($_REQUEST['field_id']) && isset($_REQUEST['field_attr']) && isset($_REQUEST['field_value'])) {
|
76 |
|
77 |
-
$field_id = wc_clean(wp_unslash($_REQUEST['field_id']));
|
78 |
-
$attr = wc_clean(wp_unslash($_REQUEST['field_attr']));
|
79 |
-
$value = wc_clean(wp_unslash($_REQUEST['field_value']));
|
80 |
|
81 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
|
83 |
-
|
84 |
|
85 |
-
|
|
|
|
|
|
|
|
|
86 |
}
|
87 |
|
88 |
wp_send_json_error(esc_html__('Unknow error', 'woocommerce-checkout-manager'));
|
@@ -92,7 +101,9 @@ class WOOCCM_Field_Controller {
|
|
92 |
|
93 |
if (current_user_can('manage_woocommerce') && check_ajax_referer('wooccm_field', 'nonce') && isset($_REQUEST['field_data'])) {
|
94 |
|
95 |
-
$field_data =
|
|
|
|
|
96 |
|
97 |
if (array_key_exists('field_id', $_REQUEST)) {
|
98 |
|
@@ -137,9 +148,9 @@ class WOOCCM_Field_Controller {
|
|
137 |
|
138 |
$section = wc_clean(wp_unslash($_REQUEST['section']));
|
139 |
|
140 |
-
if (isset(WOOCCM()
|
141 |
|
142 |
-
WOOCCM()
|
143 |
|
144 |
wp_send_json_success();
|
145 |
}
|
@@ -174,20 +185,60 @@ class WOOCCM_Field_Controller {
|
|
174 |
|
175 |
$section = wc_clean(wp_unslash($_REQUEST['section']));
|
176 |
|
177 |
-
if (isset(WOOCCM()
|
178 |
|
179 |
-
if ($
|
180 |
|
181 |
-
if (
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
186 |
}
|
187 |
-
|
188 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
189 |
|
190 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
191 |
}
|
192 |
}
|
193 |
}
|
@@ -202,13 +253,13 @@ class WOOCCM_Field_Controller {
|
|
202 |
|
203 |
$section = wc_clean(wp_unslash($_REQUEST['section']));
|
204 |
|
205 |
-
if (isset(WOOCCM()
|
206 |
|
207 |
-
if ($field = WOOCCM()
|
208 |
|
209 |
$field_data = array($attr => !(bool) @$field[$attr]);
|
210 |
|
211 |
-
$field = WOOCCM()
|
212 |
|
213 |
return $field_data[$attr];
|
214 |
}
|
@@ -222,8 +273,16 @@ class WOOCCM_Field_Controller {
|
|
222 |
|
223 |
$section = wc_clean(wp_unslash($_REQUEST['section']));
|
224 |
|
225 |
-
if (isset(WOOCCM()
|
226 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
227 |
}
|
228 |
}
|
229 |
}
|
@@ -234,9 +293,9 @@ class WOOCCM_Field_Controller {
|
|
234 |
|
235 |
$section = wc_clean(wp_unslash($_REQUEST['section']));
|
236 |
|
237 |
-
if (isset(WOOCCM()
|
238 |
|
239 |
-
return WOOCCM()
|
240 |
}
|
241 |
}
|
242 |
}
|
@@ -247,9 +306,9 @@ class WOOCCM_Field_Controller {
|
|
247 |
|
248 |
$section = wc_clean(wp_unslash($_REQUEST['section']));
|
249 |
|
250 |
-
if (isset(WOOCCM()
|
251 |
|
252 |
-
return WOOCCM()
|
253 |
}
|
254 |
}
|
255 |
}
|
@@ -268,9 +327,9 @@ class WOOCCM_Field_Controller {
|
|
268 |
|
269 |
if (is_array($field_order) && count($field_order) > 0) {
|
270 |
|
271 |
-
if (isset(WOOCCM()
|
272 |
|
273 |
-
$fields = WOOCCM()
|
274 |
|
275 |
$loop = 1;
|
276 |
|
@@ -284,7 +343,7 @@ class WOOCCM_Field_Controller {
|
|
284 |
}
|
285 |
}
|
286 |
|
287 |
-
WOOCCM()
|
288 |
}
|
289 |
}
|
290 |
}
|
@@ -300,14 +359,12 @@ class WOOCCM_Field_Controller {
|
|
300 |
'type' => 'select',
|
301 |
//'class' => 'chosen_select',
|
302 |
'options' => array(
|
303 |
-
'before_shipping_form' => esc_html__('Before shipping form', 'woocommerce-checkout-manager'),
|
304 |
-
'after_shipping_form' => esc_html__('After shipping form', 'woocommerce-checkout-manager'),
|
305 |
'before_billing_form' => esc_html__('Before billing form', 'woocommerce-checkout-manager'),
|
306 |
'after_billing_form' => esc_html__('After billing form', 'woocommerce-checkout-manager'),
|
307 |
'before_order_notes' => esc_html__('Before order notes', 'woocommerce-checkout-manager'),
|
308 |
'after_order_notes' => esc_html__('After order notes', 'woocommerce-checkout-manager'),
|
309 |
),
|
310 |
-
'default' => '
|
311 |
));
|
312 |
}
|
313 |
|
@@ -320,80 +377,97 @@ class WOOCCM_Field_Controller {
|
|
320 |
|
321 |
function add_order_billing_data($order) {
|
322 |
|
323 |
-
if ($fields = WOOCCM()->
|
324 |
|
325 |
-
$defaults = WOOCCM()->
|
326 |
|
327 |
foreach ($fields as $field_id => $field) {
|
328 |
|
329 |
-
if (!in_array($field['
|
|
|
|
|
330 |
|
331 |
-
if ($value = get_post_meta($order->get_id(),
|
332 |
?>
|
333 |
-
<p id="
|
334 |
-
<strong title="<?php echo esc_attr(sprintf(__('ID: %s | Field Type: %s', 'woocommerce-checkout-manager'),
|
335 |
-
|
336 |
</strong>
|
337 |
<br />
|
338 |
-
|
339 |
</p>
|
340 |
-
|
341 |
-
}
|
342 |
}
|
343 |
}
|
344 |
}
|
345 |
}
|
|
|
346 |
|
347 |
-
|
348 |
|
349 |
-
|
350 |
|
351 |
-
|
352 |
|
353 |
-
|
|
|
|
|
354 |
|
355 |
-
|
356 |
|
357 |
-
|
358 |
-
|
359 |
-
<p id="
|
360 |
-
<strong title="<?php echo esc_attr(sprintf(__('ID: %s | Field Type: %s', 'woocommerce-checkout-manager'),
|
361 |
-
|
362 |
</strong>
|
363 |
<br/>
|
364 |
-
|
365 |
</p>
|
366 |
-
|
367 |
-
}
|
368 |
}
|
369 |
}
|
370 |
}
|
371 |
}
|
|
|
372 |
|
373 |
-
|
374 |
-
|
375 |
-
if ($fields = WOOCCM()->field->additional->get_fields('old')) {
|
376 |
|
377 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
378 |
|
379 |
foreach ($fields as $field_id => $field) {
|
380 |
|
381 |
-
|
|
|
|
|
382 |
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
<?php echo esc_attr(wooccm_wpml_string(trim($field['label']))); ?>:
|
389 |
</strong>
|
390 |
<br/>
|
391 |
-
|
392 |
</p>
|
393 |
-
|
394 |
-
}
|
395 |
}
|
396 |
}
|
|
|
|
|
|
|
397 |
}
|
398 |
}
|
399 |
|
@@ -406,15 +480,16 @@ class WOOCCM_Field_Controller {
|
|
406 |
|
407 |
if ('billing' == $current_section) {
|
408 |
|
409 |
-
$fields = WOOCCM()->
|
410 |
-
$defaults = WOOCCM()->
|
411 |
-
$types = WOOCCM()->
|
412 |
-
$conditionals = WOOCCM()->
|
413 |
-
$
|
414 |
-
$
|
|
|
415 |
$product_categories = $this->get_product_categories();
|
416 |
|
417 |
-
include_once(WOOCCM_PLUGIN_DIR . '
|
418 |
}
|
419 |
}
|
420 |
|
@@ -424,15 +499,16 @@ class WOOCCM_Field_Controller {
|
|
424 |
|
425 |
if ('shipping' == $current_section) {
|
426 |
|
427 |
-
$fields = WOOCCM()->
|
428 |
-
$defaults = WOOCCM()->
|
429 |
-
$types = WOOCCM()->
|
430 |
-
$conditionals = WOOCCM()->
|
431 |
-
$
|
432 |
-
$
|
|
|
433 |
$product_categories = $this->get_product_categories();
|
434 |
|
435 |
-
include_once(WOOCCM_PLUGIN_DIR . '
|
436 |
}
|
437 |
}
|
438 |
|
@@ -442,48 +518,41 @@ class WOOCCM_Field_Controller {
|
|
442 |
|
443 |
if ('additional' == $current_section) {
|
444 |
|
445 |
-
$fields = WOOCCM()->
|
446 |
-
$defaults = WOOCCM()->
|
447 |
-
$types = WOOCCM()->
|
448 |
-
$conditionals = WOOCCM()->
|
449 |
-
$
|
450 |
-
$
|
|
|
451 |
$product_categories = $this->get_product_categories();
|
452 |
$settings = $this->get_additional_settings();
|
453 |
|
454 |
-
include_once(WOOCCM_PLUGIN_DIR . '
|
455 |
}
|
456 |
}
|
457 |
|
458 |
function includes() {
|
459 |
|
460 |
-
include_once( WOOCCM_PLUGIN_DIR . '
|
461 |
-
include_once( WOOCCM_PLUGIN_DIR . '
|
462 |
-
include_once( WOOCCM_PLUGIN_DIR . '
|
463 |
-
include_once( WOOCCM_PLUGIN_DIR . '
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
$this->billing = WOOCCM_Field_Billing::instance();
|
474 |
-
$this->shipping = WOOCCM_Field_Shipping::instance();
|
475 |
-
$this->additional = WOOCCM_Field_Additional::instance();
|
476 |
}
|
477 |
|
478 |
function init() {
|
479 |
|
480 |
-
// global $wooccm_sections;
|
481 |
-
//
|
482 |
-
// $wooccm_sections['billing'] = esc_html__('Billing', 'woocommerce-checkout-manager');
|
483 |
-
// $wooccm_sections['shipping'] = esc_html__('Shipping', 'woocommerce-checkout-manager');
|
484 |
-
// $wooccm_sections['additional'] = esc_html__('Additional', 'woocommerce-checkout-manager');
|
485 |
-
|
486 |
add_action('admin_enqueue_scripts', array($this, 'enqueue_scripts'));
|
|
|
487 |
add_action('wp_ajax_wooccm_load_field', array($this, 'ajax_load_field'));
|
488 |
add_action('wp_ajax_wooccm_save_field', array($this, 'ajax_save_field'));
|
489 |
add_action('wp_ajax_wooccm_delete_field', array($this, 'ajax_delete_field'));
|
@@ -493,7 +562,7 @@ class WOOCCM_Field_Controller {
|
|
493 |
|
494 |
add_action('woocommerce_admin_order_data_after_billing_address', array($this, 'add_order_billing_data'));
|
495 |
add_action('woocommerce_admin_order_data_after_shipping_address', array($this, 'add_order_shipping_data'));
|
496 |
-
add_action('
|
497 |
|
498 |
add_action('woocommerce_sections_' . WOOCCM_PREFIX, array($this, 'add_section_billing'), 99);
|
499 |
add_action('woocommerce_sections_' . WOOCCM_PREFIX, array($this, 'add_section_shipping'), 99);
|
@@ -503,4 +572,6 @@ class WOOCCM_Field_Controller {
|
|
503 |
}
|
504 |
|
505 |
}
|
|
|
|
|
506 |
|
23 |
|
24 |
global $current_section;
|
25 |
|
26 |
+
wp_register_script('wooccm-field', plugins_url('assets/backend/js/wooccm-admin-field.js', WOOCCM_PLUGIN_FILE), array('jquery', 'jquery-ui-datepicker', 'backbone', 'wp-util'), WOOCCM_PLUGIN_VERSION, true);
|
27 |
|
28 |
wp_localize_script('wooccm-field', 'wooccm_field', array(
|
29 |
'ajax_url' => admin_url('admin-ajax.php?section=' . $current_section),
|
30 |
'nonce' => wp_create_nonce('wooccm_field'),
|
31 |
+
'args' => WOOCCM()->billing->get_args(),
|
32 |
'message' => array(
|
33 |
'remove' => esc_html__('Are you sure you want to remove this field?', 'woocommerce-checkout-manager'),
|
34 |
'reset' => esc_html__('Are you sure you want to reset this fields?', 'woocommerce-checkout-manager')
|
74 |
|
75 |
if (current_user_can('manage_woocommerce') && check_ajax_referer('wooccm_field', 'nonce') && isset($_REQUEST['field_id']) && isset($_REQUEST['field_attr']) && isset($_REQUEST['field_value'])) {
|
76 |
|
|
|
|
|
|
|
77 |
|
78 |
+
if (array_key_exists('section', $_REQUEST)) {
|
79 |
+
|
80 |
+
$section = wc_clean(wp_unslash($_REQUEST['section']));
|
81 |
+
|
82 |
+
$field_id = wc_clean(wp_unslash($_REQUEST['field_id']));
|
83 |
+
$attr = wc_clean(wp_unslash($_REQUEST['field_attr']));
|
84 |
+
$value = wc_clean(wp_unslash($_REQUEST['field_value']));
|
85 |
+
|
86 |
+
$field_data = array($attr => $value);
|
87 |
|
88 |
+
if (isset(WOOCCM()->$section)) {
|
89 |
|
90 |
+
$field = WOOCCM()->$section->update_field($field_id, $field_data);
|
91 |
+
|
92 |
+
wp_send_json_success($field);
|
93 |
+
}
|
94 |
+
}
|
95 |
}
|
96 |
|
97 |
wp_send_json_error(esc_html__('Unknow error', 'woocommerce-checkout-manager'));
|
101 |
|
102 |
if (current_user_can('manage_woocommerce') && check_ajax_referer('wooccm_field', 'nonce') && isset($_REQUEST['field_data'])) {
|
103 |
|
104 |
+
$field_data = array(); //WOOCCM()->billing->get_args();
|
105 |
+
|
106 |
+
parse_str($_REQUEST['field_data'], $field_data);
|
107 |
|
108 |
if (array_key_exists('field_id', $_REQUEST)) {
|
109 |
|
148 |
|
149 |
$section = wc_clean(wp_unslash($_REQUEST['section']));
|
150 |
|
151 |
+
if (isset(WOOCCM()->$section)) {
|
152 |
|
153 |
+
WOOCCM()->$section->delete_fields();
|
154 |
|
155 |
wp_send_json_success();
|
156 |
}
|
185 |
|
186 |
$section = wc_clean(wp_unslash($_REQUEST['section']));
|
187 |
|
188 |
+
if (isset(WOOCCM()->$section)) {
|
189 |
|
190 |
+
if ($fields = WOOCCM()->$section->get_fields()) {
|
191 |
|
192 |
+
if (isset($fields[$field_id])) {
|
193 |
+
|
194 |
+
$field = $fields[$field_id];
|
195 |
+
|
196 |
+
if (!empty($field['show_product'])) {
|
197 |
+
$field['show_product_selected'] = array_filter(array_combine((array) $field['show_product'], array_map('get_the_title', (array) $field['show_product'])));
|
198 |
+
}
|
199 |
+
if (!empty($field['hide_product'])) {
|
200 |
+
$field['hide_product_selected'] = array_filter(array_combine((array) $field['hide_product'], array_map('get_the_title', (array) $field['hide_product'])));
|
201 |
+
}
|
202 |
+
|
203 |
+
if (!empty($field['conditional_parent_key']) && $field['conditional_parent_key'] != $field['key']) {
|
204 |
+
|
205 |
+
$parent_id = @max(array_keys(array_column($fields, 'key'), $field['conditional_parent_key']));
|
206 |
+
|
207 |
+
if (isset($fields[$parent_id])) {
|
208 |
+
$field['parent'] = $fields[$parent_id];
|
209 |
+
}
|
210 |
+
}
|
211 |
+
|
212 |
+
//don't remove empty attr because previus data remain
|
213 |
+
//$field = array_filter($field);
|
214 |
+
|
215 |
+
return $field;
|
216 |
}
|
217 |
+
}
|
218 |
+
}
|
219 |
+
}
|
220 |
+
}
|
221 |
+
|
222 |
+
public function ajax_load_parent() {
|
223 |
+
|
224 |
+
if (!empty($_REQUEST['conditional_parent_key'])) {
|
225 |
|
226 |
+
$key = $_REQUEST['conditional_parent_key'];
|
227 |
+
|
228 |
+
if (array_key_exists('section', $_REQUEST)) {
|
229 |
+
|
230 |
+
$section = wc_clean(wp_unslash($_REQUEST['section']));
|
231 |
+
|
232 |
+
if (isset(WOOCCM()->$section)) {
|
233 |
+
|
234 |
+
if ($fields = WOOCCM()->$section->get_fields()) {
|
235 |
+
|
236 |
+
$parent_id = @max(array_keys(array_column($fields, 'key'), $key));
|
237 |
+
|
238 |
+
if (isset($fields[$parent_id])) {
|
239 |
+
wp_send_json_success($fields[$parent_id]);
|
240 |
+
}
|
241 |
+
}
|
242 |
}
|
243 |
}
|
244 |
}
|
253 |
|
254 |
$section = wc_clean(wp_unslash($_REQUEST['section']));
|
255 |
|
256 |
+
if (isset(WOOCCM()->$section)) {
|
257 |
|
258 |
+
if ($field = WOOCCM()->$section->get_field($field_id)) {
|
259 |
|
260 |
$field_data = array($attr => !(bool) @$field[$attr]);
|
261 |
|
262 |
+
$field = WOOCCM()->$section->update_field($field_id, $field_data);
|
263 |
|
264 |
return $field_data[$attr];
|
265 |
}
|
273 |
|
274 |
$section = wc_clean(wp_unslash($_REQUEST['section']));
|
275 |
|
276 |
+
if (isset(WOOCCM()->$section)) {
|
277 |
+
|
278 |
+
// fix unchecked checkboxes
|
279 |
+
$field_data = wp_parse_args($field_data, WOOCCM()->$section->get_args());
|
280 |
+
|
281 |
+
unset($field_data['required']);
|
282 |
+
unset($field_data['position']);
|
283 |
+
unset($field_data['disabled']);
|
284 |
+
|
285 |
+
return WOOCCM()->$section->update_field($field_id, $field_data);
|
286 |
}
|
287 |
}
|
288 |
}
|
293 |
|
294 |
$section = wc_clean(wp_unslash($_REQUEST['section']));
|
295 |
|
296 |
+
if (isset(WOOCCM()->$section)) {
|
297 |
|
298 |
+
return WOOCCM()->$section->add_field($field_data);
|
299 |
}
|
300 |
}
|
301 |
}
|
306 |
|
307 |
$section = wc_clean(wp_unslash($_REQUEST['section']));
|
308 |
|
309 |
+
if (isset(WOOCCM()->$section)) {
|
310 |
|
311 |
+
return WOOCCM()->$section->delete_field($field_id);
|
312 |
}
|
313 |
}
|
314 |
}
|
327 |
|
328 |
if (is_array($field_order) && count($field_order) > 0) {
|
329 |
|
330 |
+
if (isset(WOOCCM()->$section)) {
|
331 |
|
332 |
+
$fields = WOOCCM()->$section->get_fields();
|
333 |
|
334 |
$loop = 1;
|
335 |
|
343 |
}
|
344 |
}
|
345 |
|
346 |
+
WOOCCM()->$section->update_fields($fields);
|
347 |
}
|
348 |
}
|
349 |
}
|
359 |
'type' => 'select',
|
360 |
//'class' => 'chosen_select',
|
361 |
'options' => array(
|
|
|
|
|
362 |
'before_billing_form' => esc_html__('Before billing form', 'woocommerce-checkout-manager'),
|
363 |
'after_billing_form' => esc_html__('After billing form', 'woocommerce-checkout-manager'),
|
364 |
'before_order_notes' => esc_html__('Before order notes', 'woocommerce-checkout-manager'),
|
365 |
'after_order_notes' => esc_html__('After order notes', 'woocommerce-checkout-manager'),
|
366 |
),
|
367 |
+
'default' => 'before_order_notes',
|
368 |
));
|
369 |
}
|
370 |
|
377 |
|
378 |
function add_order_billing_data($order) {
|
379 |
|
380 |
+
if ($fields = WOOCCM()->billing->get_fields()) {
|
381 |
|
382 |
+
$defaults = WOOCCM()->billing->get_defaults();
|
383 |
|
384 |
foreach ($fields as $field_id => $field) {
|
385 |
|
386 |
+
if (!in_array($field['name'], $defaults)) {
|
387 |
+
|
388 |
+
$key = sprintf('_%s', $field['key']);
|
389 |
|
390 |
+
if ($value = get_post_meta($order->get_id(), $key, true)) {
|
391 |
?>
|
392 |
+
<p id="<?php echo esc_attr($field['key']); ?>" class="form-field form-field-wide form-field-type-<?php echo esc_attr($field['type']); ?>">
|
393 |
+
<strong title="<?php echo esc_attr(sprintf(__('ID: %s | Field Type: %s', 'woocommerce-checkout-manager'), $key, __('Generic', 'woocommerce-checkout-manager'))); ?>">
|
394 |
+
<?php echo esc_attr(trim($field['label'])); ?>:
|
395 |
</strong>
|
396 |
<br />
|
397 |
+
<?php echo esc_html($value); ?>
|
398 |
</p>
|
399 |
+
<?php
|
|
|
400 |
}
|
401 |
}
|
402 |
}
|
403 |
}
|
404 |
+
}
|
405 |
|
406 |
+
function add_order_shipping_data($order) {
|
407 |
|
408 |
+
if ($fields = WOOCCM()->shipping->get_fields()) {
|
409 |
|
410 |
+
$defaults = WOOCCM()->shipping->get_defaults();
|
411 |
|
412 |
+
foreach ($fields as $field_id => $field) {
|
413 |
+
|
414 |
+
if (!in_array($field['name'], $defaults)) {
|
415 |
|
416 |
+
$key = sprintf('_%s', $field['key']);
|
417 |
|
418 |
+
if ($value = get_post_meta($order->get_id(), $key, true)) {
|
419 |
+
?>
|
420 |
+
<p id="<?php echo esc_attr($field['key']); ?>" class="form-field form-field-wide form-field-type-<?php echo esc_attr($field['type']); ?>">
|
421 |
+
<strong title="<?php echo esc_attr(sprintf(__('ID: %s | Field Type: %s', 'woocommerce-checkout-manager'), $key, __('Generic', 'woocommerce-checkout-manager'))); ?>">
|
422 |
+
<?php echo esc_attr(trim($field['label'])); ?>:
|
423 |
</strong>
|
424 |
<br/>
|
425 |
+
<?php echo esc_html($value); ?>
|
426 |
</p>
|
427 |
+
<?php
|
|
|
428 |
}
|
429 |
}
|
430 |
}
|
431 |
}
|
432 |
+
}
|
433 |
|
434 |
+
function add_order_additional_data($order) {
|
|
|
|
|
435 |
|
436 |
+
if ($fields = WOOCCM()->additional->get_fields()) {
|
437 |
+
?>
|
438 |
+
<!--<div class="order_data_column">-->
|
439 |
+
</div>
|
440 |
+
<style>
|
441 |
+
#order_data .order_data_column {
|
442 |
+
width: 23%;
|
443 |
+
}
|
444 |
+
</style>
|
445 |
+
<div class="order_data_column">
|
446 |
+
<h3><?php esc_html_e('Additional Details', 'woocommerce-checkout-manager'); ?></h3>
|
447 |
+
<?php
|
448 |
+
$defaults = WOOCCM()->additional->get_defaults();
|
449 |
|
450 |
foreach ($fields as $field_id => $field) {
|
451 |
|
452 |
+
$key = sprintf('_%s', $field['key']);
|
453 |
+
|
454 |
+
($value = get_post_meta($order->get_id(), $key, true)) ? $value : get_post_meta($order->get_id(), sprintf('%s', $field['name']), true);
|
455 |
|
456 |
+
if ($value) {
|
457 |
+
?>
|
458 |
+
<p id="<?php echo esc_attr($field['key']); ?>" class="form-field form-field-wide form-field-type-<?php echo esc_attr($field['type']); ?>">
|
459 |
+
<strong title="<?php echo esc_attr(sprintf(__('ID: %s | Field Type: %s', 'woocommerce-checkout-manager'), $key, __('Generic', 'woocommerce-checkout-manager'))); ?>">
|
460 |
+
<?php printf('%s', $field['label'] ? esc_html($field['label']) : sprintf(esc_html__('Field %s', 'woocommerce-checkout-manager'), $field_id)); ?>
|
|
|
461 |
</strong>
|
462 |
<br/>
|
463 |
+
<?php echo esc_html($value); ?>
|
464 |
</p>
|
465 |
+
<?php
|
|
|
466 |
}
|
467 |
}
|
468 |
+
?>
|
469 |
+
<!--</div>-->
|
470 |
+
<?php
|
471 |
}
|
472 |
}
|
473 |
|
480 |
|
481 |
if ('billing' == $current_section) {
|
482 |
|
483 |
+
$fields = WOOCCM()->billing->get_fields();
|
484 |
+
$defaults = WOOCCM()->billing->get_defaults();
|
485 |
+
$types = WOOCCM()->billing->get_types();
|
486 |
+
$conditionals = WOOCCM()->billing->get_conditional_types();
|
487 |
+
$option = WOOCCM()->billing->get_option_types();
|
488 |
+
$multiple = WOOCCM()->billing->get_multiple_types();
|
489 |
+
$template = WOOCCM()->billing->get_template_types();
|
490 |
$product_categories = $this->get_product_categories();
|
491 |
|
492 |
+
include_once( WOOCCM_PLUGIN_DIR . 'includes/view/backend/pages/billing.php' );
|
493 |
}
|
494 |
}
|
495 |
|
499 |
|
500 |
if ('shipping' == $current_section) {
|
501 |
|
502 |
+
$fields = WOOCCM()->shipping->get_fields();
|
503 |
+
$defaults = WOOCCM()->shipping->get_defaults();
|
504 |
+
$types = WOOCCM()->shipping->get_types();
|
505 |
+
$conditionals = WOOCCM()->shipping->get_conditional_types();
|
506 |
+
$option = WOOCCM()->billing->get_option_types();
|
507 |
+
$multiple = WOOCCM()->billing->get_multiple_types();
|
508 |
+
$template = WOOCCM()->billing->get_template_types();
|
509 |
$product_categories = $this->get_product_categories();
|
510 |
|
511 |
+
include_once( WOOCCM_PLUGIN_DIR . 'includes/view/backend/pages/shipping.php' );
|
512 |
}
|
513 |
}
|
514 |
|
518 |
|
519 |
if ('additional' == $current_section) {
|
520 |
|
521 |
+
$fields = WOOCCM()->additional->get_fields();
|
522 |
+
$defaults = WOOCCM()->additional->get_defaults();
|
523 |
+
$types = WOOCCM()->additional->get_types();
|
524 |
+
$conditionals = WOOCCM()->additional->get_conditional_types();
|
525 |
+
$option = WOOCCM()->billing->get_option_types();
|
526 |
+
$multiple = WOOCCM()->billing->get_multiple_types();
|
527 |
+
$template = WOOCCM()->billing->get_template_types();
|
528 |
$product_categories = $this->get_product_categories();
|
529 |
$settings = $this->get_additional_settings();
|
530 |
|
531 |
+
include_once( WOOCCM_PLUGIN_DIR . 'includes/view/backend/pages/additional.php' );
|
532 |
}
|
533 |
}
|
534 |
|
535 |
function includes() {
|
536 |
|
537 |
+
include_once( WOOCCM_PLUGIN_DIR . 'includes/model/class-wooccm-field.php' );
|
538 |
+
include_once( WOOCCM_PLUGIN_DIR . 'includes/model/class-wooccm-field-billing.php' );
|
539 |
+
include_once( WOOCCM_PLUGIN_DIR . 'includes/model/class-wooccm-field-shipping.php' );
|
540 |
+
include_once( WOOCCM_PLUGIN_DIR . 'includes/model/class-wooccm-field-additional.php' );
|
541 |
+
|
542 |
+
if (!is_admin()) {
|
543 |
+
include_once( WOOCCM_PLUGIN_DIR . 'includes/view/frontend/class-wooccm-fields-register.php' );
|
544 |
+
include_once( WOOCCM_PLUGIN_DIR . 'includes/view/frontend/class-wooccm-fields-additional.php' );
|
545 |
+
include_once( WOOCCM_PLUGIN_DIR . 'includes/view/frontend/class-wooccm-fields-display.php' );
|
546 |
+
include_once( WOOCCM_PLUGIN_DIR . 'includes/view/frontend/class-wooccm-fields-conditional.php' );
|
547 |
+
include_once( WOOCCM_PLUGIN_DIR . 'includes/view/frontend/class-wooccm-fields-handler.php' );
|
548 |
+
include_once( WOOCCM_PLUGIN_DIR . 'includes/view/frontend/class-wooccm-fields-filters.php' );
|
549 |
+
}
|
|
|
|
|
|
|
550 |
}
|
551 |
|
552 |
function init() {
|
553 |
|
|
|
|
|
|
|
|
|
|
|
|
|
554 |
add_action('admin_enqueue_scripts', array($this, 'enqueue_scripts'));
|
555 |
+
add_action('wp_ajax_wooccm_load_parent', array($this, 'ajax_load_parent'));
|
556 |
add_action('wp_ajax_wooccm_load_field', array($this, 'ajax_load_field'));
|
557 |
add_action('wp_ajax_wooccm_save_field', array($this, 'ajax_save_field'));
|
558 |
add_action('wp_ajax_wooccm_delete_field', array($this, 'ajax_delete_field'));
|
562 |
|
563 |
add_action('woocommerce_admin_order_data_after_billing_address', array($this, 'add_order_billing_data'));
|
564 |
add_action('woocommerce_admin_order_data_after_shipping_address', array($this, 'add_order_shipping_data'));
|
565 |
+
add_action('woocommerce_admin_order_data_after_shipping_address', array($this, 'add_order_additional_data'));
|
566 |
|
567 |
add_action('woocommerce_sections_' . WOOCCM_PREFIX, array($this, 'add_section_billing'), 99);
|
568 |
add_action('woocommerce_sections_' . WOOCCM_PREFIX, array($this, 'add_section_shipping'), 99);
|
572 |
}
|
573 |
|
574 |
}
|
575 |
+
|
576 |
+
WOOCCM_Field_Controller::instance();
|
577 |
|
includes/controller/class-wooccm-order.php
ADDED
@@ -0,0 +1,340 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class WOOCCM_Order_Controller extends WOOCCM_Upload {
|
4 |
+
|
5 |
+
protected static $_instance;
|
6 |
+
|
7 |
+
public function __construct() {
|
8 |
+
$this->init();
|
9 |
+
}
|
10 |
+
|
11 |
+
public static function instance() {
|
12 |
+
if (is_null(self::$_instance)) {
|
13 |
+
self::$_instance = new self();
|
14 |
+
}
|
15 |
+
return self::$_instance;
|
16 |
+
}
|
17 |
+
|
18 |
+
public function enqueue_scripts() {
|
19 |
+
|
20 |
+
WOOCCM()->register_scripts();
|
21 |
+
|
22 |
+
wp_register_script('wooccm-order-upload', plugins_url('assets/frontend/js/wooccm-order-upload.js', WOOCCM_PLUGIN_FILE), array(), WOOCCM_PLUGIN_VERSION, true);
|
23 |
+
|
24 |
+
wp_localize_script('wooccm-order-upload', 'wooccm_upload', array(
|
25 |
+
'ajax_url' => admin_url('admin-ajax.php?metabox=' . is_admin()),
|
26 |
+
'nonce' => wp_create_nonce('wooccm_upload'),
|
27 |
+
'message' => array(
|
28 |
+
'uploading' => esc_html__('Uploading, please wait...', 'woocommerce-checkout-manager'),
|
29 |
+
'saving' => esc_html__('Saving, please wait...', 'woocommerce-checkout-manager'),
|
30 |
+
'success' => esc_html__('Files uploaded successfully.', 'woocommerce-checkout-manager'),
|
31 |
+
'deleted' => esc_html__('Deleted successfully.', 'woocommerce-checkout-manager'),
|
32 |
+
),
|
33 |
+
'icons' => array(
|
34 |
+
'interactive' => site_url('wp-includes/images/media/interactive.png'),
|
35 |
+
'spreadsheet' => site_url('wp-includes/images/media/spreadsheet.png'),
|
36 |
+
'archive' => site_url('wp-includes/images/media/archive.png'),
|
37 |
+
'audio' => site_url('wp-includes/images/media/audio.png'),
|
38 |
+
'text' => site_url('wp-includes/images/media/text.png'),
|
39 |
+
'video' => site_url('wp-includes/images/media/video.png')
|
40 |
+
)
|
41 |
+
));
|
42 |
+
|
43 |
+
if (is_admin() && $screen = get_current_screen()) {
|
44 |
+
if (in_array($screen->id, array(/* 'product', 'edit-product', */'shop_order', 'edit-shop_order'))) {
|
45 |
+
wp_enqueue_script('wooccm-order-upload');
|
46 |
+
}
|
47 |
+
}
|
48 |
+
|
49 |
+
if (is_account_page()) {
|
50 |
+
wp_enqueue_style('wooccm');
|
51 |
+
wp_enqueue_style('dashicons');
|
52 |
+
wp_enqueue_script('wooccm-order-upload');
|
53 |
+
}
|
54 |
+
}
|
55 |
+
|
56 |
+
public function ajax_order_attachment_upload() {
|
57 |
+
|
58 |
+
if (!empty($_REQUEST) && check_admin_referer('wooccm_upload', 'nonce')) {
|
59 |
+
|
60 |
+
$files = ( isset($_FILES['wooccm_order_attachment_upload']) ? $_FILES['wooccm_order_attachment_upload'] : false );
|
61 |
+
|
62 |
+
if (empty($files)) {
|
63 |
+
//wc_order_notice(esc_html__('No uploads were recognised. Files were not uploaded.', 'woocommerce-checkout-manager'), 'error');
|
64 |
+
wp_send_json_error(esc_html__('No uploads were recognised. Files were not uploaded.', 'woocommerce-checkout-manager'), 'error');
|
65 |
+
}
|
66 |
+
|
67 |
+
$order_id = ( isset($_REQUEST['order_id']) ? absint($_REQUEST['order_id']) : false );
|
68 |
+
|
69 |
+
if (empty($order_id)) {
|
70 |
+
wp_send_json_error(esc_html__('Empty order id.', 'woocommerce-checkout-manager'));
|
71 |
+
}
|
72 |
+
|
73 |
+
if (!$post = get_post($order_id)) {
|
74 |
+
wp_send_json_error(esc_html__('Invalid order id.', 'woocommerce-checkout-manager'));
|
75 |
+
}
|
76 |
+
|
77 |
+
if (count($attachment_ids = $this->process_uploads($files, 'wooccm_order_attachment_upload', $order_id))) {
|
78 |
+
|
79 |
+
ob_start();
|
80 |
+
|
81 |
+
if (!empty($_REQUEST['metabox'])) {
|
82 |
+
$this->add_metabox_content($post);
|
83 |
+
} else {
|
84 |
+
$this->add_upload_files($post->ID);
|
85 |
+
}
|
86 |
+
|
87 |
+
wp_send_json_success(ob_get_clean());
|
88 |
+
/* send email
|
89 |
+
$email_recipients = $options['checkness']['wooccm_notification_email'];
|
90 |
+
if (empty($email_recipients))
|
91 |
+
$email_recipients = get_option('admin_email');
|
92 |
+
$email_heading = __('Files Uploaded by Customer', 'woocommerce-checkout-manager');
|
93 |
+
$subject = sprintf(__('WooCommerce Checkout Manager - %s [%s]', 'woocommerce-checkout-manager'), $email_heading, $order->billing_first_name . ' ' . $order->billing_last_name);
|
94 |
+
|
95 |
+
$mailer = WC()->mailer();
|
96 |
+
|
97 |
+
// Buffer
|
98 |
+
ob_start();
|
99 |
+
?>
|
100 |
+
<p>This is an automatic message from WooCommerce Checkout Manager, reporting that files have been uploaded by <?php echo $order->billing_first_name; ?> <?php echo $order->billing_last_name; ?>.</p>
|
101 |
+
<h3>Customer Details</h3>
|
102 |
+
<ul>
|
103 |
+
<li>Name: <?php echo $order->billing_first_name; ?> <?php $order->billing_last_name; ?></li>
|
104 |
+
<li>E-mail: <?php echo $order->billing_email; ?></li>
|
105 |
+
<li>Order Number: <?php echo $order_id; ?></li>
|
106 |
+
</ul>
|
107 |
+
<p>You can view the files and order details via back-end by following this <a href="<?php echo admin_url('/post.php?post=' . $order_id . '&action=edit'); ?>" target="_blank">link</a>.</p>
|
108 |
+
<?php
|
109 |
+
// Get contents
|
110 |
+
$message = ob_get_clean();
|
111 |
+
|
112 |
+
$message = $mailer->wrap_message($email_heading, $message);
|
113 |
+
|
114 |
+
// add_filter( 'wp_mail_content_type', 'wooccm_set_html_content_type' );
|
115 |
+
// wc_mail( $email_recipients, $subject, $message );
|
116 |
+
$mailer->send($email_recipients, strip_tags($subject), $message);
|
117 |
+
// remove_filter( 'wp_mail_content_type', 'wooccm_set_html_content_type' ); */
|
118 |
+
}
|
119 |
+
wp_send_json_error(esc_html__('Unknow error.', 'woocommerce-checkout-manager'));
|
120 |
+
}
|
121 |
+
}
|
122 |
+
|
123 |
+
public function add_upload_files($order_id) {
|
124 |
+
|
125 |
+
if (get_option('wooccm_order_upload_files', 'no') === 'yes') {
|
126 |
+
|
127 |
+
if ($order = wc_get_order($order_id)) {
|
128 |
+
|
129 |
+
if (in_array("wc-{$order->get_status()}", array_values(get_option('wooccm_order_upload_files_order_status', array())))) {
|
130 |
+
|
131 |
+
$attachments = get_posts(array(
|
132 |
+
'fields' => 'ids',
|
133 |
+
'post_type' => 'attachment',
|
134 |
+
'numberposts' => -1,
|
135 |
+
'post_status' => null,
|
136 |
+
'post_parent' => $order->get_id())
|
137 |
+
);
|
138 |
+
|
139 |
+
wc_get_template('templates/order/order-upload-files.php', array('order' => $order, 'attachments' => $attachments), '', WOOCCM_PLUGIN_DIR);
|
140 |
+
}
|
141 |
+
}
|
142 |
+
}
|
143 |
+
}
|
144 |
+
|
145 |
+
public function add_custom_fields($order_id) {
|
146 |
+
|
147 |
+
if (get_option('wooccm_order_custom_fields', 'no') === 'yes') {
|
148 |
+
|
149 |
+
if ($order = wc_get_order($order_id)) {
|
150 |
+
|
151 |
+
if (in_array("wc-{$order->get_status()}", array_values(get_option('wooccm_order_custom_fields_status', array())))) {
|
152 |
+
|
153 |
+
wc_get_template('templates/order/order-custom-fields.php', array('order_id' => $order_id), '', WOOCCM_PLUGIN_DIR);
|
154 |
+
}
|
155 |
+
}
|
156 |
+
}
|
157 |
+
}
|
158 |
+
|
159 |
+
public function add_metabox_content($post) {
|
160 |
+
|
161 |
+
if ($order = wc_get_order($post->ID)) {
|
162 |
+
|
163 |
+
$attachments = get_posts(array(
|
164 |
+
'fields' => 'ids',
|
165 |
+
'post_type' => 'attachment',
|
166 |
+
'numberposts' => -1,
|
167 |
+
'post_status' => null,
|
168 |
+
'post_parent' => $order->get_id()
|
169 |
+
));
|
170 |
+
?>
|
171 |
+
|
172 |
+
<?php include WOOCCM_PLUGIN_DIR . 'includes/view/backend/meta-boxes/html-order-uploads.php'; ?>
|
173 |
+
|
174 |
+
<?php
|
175 |
+
|
176 |
+
}
|
177 |
+
}
|
178 |
+
|
179 |
+
// Admin
|
180 |
+
// -------------------------------------------------------------------------
|
181 |
+
|
182 |
+
public function add_metabox() {
|
183 |
+
add_meta_box('woocommerce-order-files', esc_html__('Order Uploaded Files', 'woocommerce-checkout-manager'), array($this, 'add_metabox_content'), 'shop_order', 'normal', 'default');
|
184 |
+
}
|
185 |
+
|
186 |
+
public function get_settings() {
|
187 |
+
return array(
|
188 |
+
array(
|
189 |
+
'type' => 'title',
|
190 |
+
'id' => 'section_title'
|
191 |
+
),
|
192 |
+
array(
|
193 |
+
'name' => esc_html__('Add upload files', 'woocommerce-checkout-manager'),
|
194 |
+
'desc_tip' => esc_html__('Allow customers to upload files in the order.', 'woocommerce-checkout-manager'),
|
195 |
+
'id' => 'wooccm_order_upload_files',
|
196 |
+
'type' => 'select',
|
197 |
+
'class' => 'chosen_select',
|
198 |
+
'options' => array(
|
199 |
+
'yes' => esc_html__('Yes', 'woocommerce-checkout-manager'),
|
200 |
+
'no' => esc_html__('No', 'woocommerce-checkout-manager'),
|
201 |
+
),
|
202 |
+
'default' => 'no',
|
203 |
+
),
|
204 |
+
array(
|
205 |
+
'name' => esc_html__('Add for this order status', 'woocommerce-checkout-manager'),
|
206 |
+
'desc_tip' => esc_html__('Allow customers to upload files in the order.', 'woocommerce-checkout-manager'),
|
207 |
+
'id' => 'wooccm_order_upload_files_order_status',
|
208 |
+
'type' => 'multiselect',
|
209 |
+
'class' => 'chosen_select',
|
210 |
+
'options' => wc_get_order_statuses(),
|
211 |
+
),
|
212 |
+
array(
|
213 |
+
'name' => esc_html__('Add upload files title', 'woocommerce-checkout-manager'),
|
214 |
+
'desc_tip' => esc_html__('Add custom title for the uploads files table.', 'woocommerce-checkout-manager'),
|
215 |
+
'id' => 'wooccm_order_upload_files_title',
|
216 |
+
'type' => 'text',
|
217 |
+
'placeholder' => esc_html__('Upload files', 'woocommerce-checkout-manager')
|
218 |
+
),
|
219 |
+
array(
|
220 |
+
'name' => esc_html__('Add custom fields', 'woocommerce-checkout-manager'),
|
221 |
+
'desc_tip' => esc_html__('Show the selected fields in the order.', 'woocommerce-checkout-manager'),
|
222 |
+
'id' => 'wooccm_order_custom_fields',
|
223 |
+
'type' => 'select',
|
224 |
+
'class' => 'chosen_select',
|
225 |
+
'options' => array(
|
226 |
+
'yes' => esc_html__('Yes', 'woocommerce-checkout-manager'),
|
227 |
+
'no' => esc_html__('No', 'woocommerce-checkout-manager'),
|
228 |
+
),
|
229 |
+
'default' => 'no',
|
230 |
+
),
|
231 |
+
array(
|
232 |
+
'name' => esc_html__('Add for this order status', 'woocommerce-checkout-manager'),
|
233 |
+
'desc_tip' => esc_html__('Allow customers to upload files in the order.', 'woocommerce-checkout-manager'),
|
234 |
+
'id' => 'wooccm_order_custom_fields_status',
|
235 |
+
'type' => 'multiselect',
|
236 |
+
'class' => 'chosen_select',
|
237 |
+
'options' => wc_get_order_statuses(),
|
238 |
+
),
|
239 |
+
array(
|
240 |
+
'name' => esc_html__('Add custom fields title', 'woocommerce-checkout-manager'),
|
241 |
+
'desc_tip' => esc_html__('Add custom title for the uploads files table.', 'woocommerce-checkout-manager'),
|
242 |
+
'id' => 'wooccm_order_custom_fields_title',
|
243 |
+
'type' => 'text',
|
244 |
+
'placeholder' => esc_html__('Order extra', 'woocommerce-checkout-manager')
|
245 |
+
),
|
246 |
+
array(
|
247 |
+
'type' => 'sectionend',
|
248 |
+
'id' => 'section_end'
|
249 |
+
)
|
250 |
+
);
|
251 |
+
}
|
252 |
+
|
253 |
+
public function add_section() {
|
254 |
+
|
255 |
+
global $current_section;
|
256 |
+
|
257 |
+
if ('order' == $current_section) {
|
258 |
+
|
259 |
+
$settings = $this->get_settings();
|
260 |
+
|
261 |
+
include_once( WOOCCM_PLUGIN_DIR . 'includes/view/backend/pages/order.php' );
|
262 |
+
}
|
263 |
+
}
|
264 |
+
|
265 |
+
public function save_settings() {
|
266 |
+
woocommerce_update_options($this->get_settings());
|
267 |
+
}
|
268 |
+
|
269 |
+
// Compatibility
|
270 |
+
// -------------------------------------------------------------------------
|
271 |
+
|
272 |
+
public function enable_file_upload($value) {
|
273 |
+
|
274 |
+
$options = get_option('wccs_settings');
|
275 |
+
|
276 |
+
if (!empty($options['checkness']['enable_file_upload'])) {
|
277 |
+
return 'yes';
|
278 |
+
}
|
279 |
+
|
280 |
+
return $value;
|
281 |
+
}
|
282 |
+
|
283 |
+
public function upload_os($value) {
|
284 |
+
|
285 |
+
$options = get_option('wccs_settings');
|
286 |
+
|
287 |
+
if (!empty($options['checkness']['upload_os'])) {
|
288 |
+
return (array) implode(',', $options['checkness']['upload_os']);
|
289 |
+
}
|
290 |
+
|
291 |
+
return $value;
|
292 |
+
}
|
293 |
+
|
294 |
+
public function upload_title($value) {
|
295 |
+
|
296 |
+
$options = get_option('wccs_settings');
|
297 |
+
|
298 |
+
if (!empty($options['checkness']['upload_title'])) {
|
299 |
+
return $options['checkness']['upload_title'];
|
300 |
+
}
|
301 |
+
|
302 |
+
return $value;
|
303 |
+
}
|
304 |
+
|
305 |
+
function init() {
|
306 |
+
//
|
307 |
+
// global $wooccm_sections;
|
308 |
+
//
|
309 |
+
// $wooccm_sections['order'] = esc_html__('Order', 'woocommerce-checkout-manager');
|
310 |
+
|
311 |
+
add_action('wp_enqueue_scripts', array($this, 'enqueue_scripts'));
|
312 |
+
|
313 |
+
add_action('wp_ajax_wooccm_order_attachment_upload', array($this, 'ajax_order_attachment_upload'));
|
314 |
+
add_action('wp_ajax_nopriv_wooccm_order_attachment_upload', array($this, 'ajax_order_attachment_upload'));
|
315 |
+
|
316 |
+
add_action('add_meta_boxes', array($this, 'add_metabox'));
|
317 |
+
|
318 |
+
add_action('woocommerce_sections_' . WOOCCM_PREFIX, array($this, 'add_section'), 99);
|
319 |
+
add_action('woocommerce_settings_save_' . WOOCCM_PREFIX, array($this, 'save_settings'));
|
320 |
+
|
321 |
+
// Frontend
|
322 |
+
// -----------------------------------------------------------------------
|
323 |
+
|
324 |
+
add_action('woocommerce_thankyou', array($this, 'add_upload_files'));
|
325 |
+
add_action('woocommerce_view_order', array($this, 'add_upload_files'));
|
326 |
+
|
327 |
+
add_action('woocommerce_thankyou', array($this, 'add_custom_fields'));
|
328 |
+
add_action('woocommerce_view_order', array($this, 'add_custom_fields'));
|
329 |
+
|
330 |
+
// Compatibility
|
331 |
+
// -----------------------------------------------------------------------
|
332 |
+
|
333 |
+
add_filter('default_option_wooccm_order_upload_files', array($this, 'enable_file_upload'));
|
334 |
+
add_filter('default_option_wooccm_order_upload_files_order_status', array($this, 'upload_os'));
|
335 |
+
add_filter('default_option_wooccm_order_upload_files_title', array($this, 'upload_title'));
|
336 |
+
}
|
337 |
+
|
338 |
+
}
|
339 |
+
|
340 |
+
WOOCCM_Order_Controller::instance();
|
includes/export.php
DELETED
@@ -1,961 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
// Exit if accessed directly
|
3 |
-
if (!defined('ABSPATH'))
|
4 |
-
exit;
|
5 |
-
|
6 |
-
// add custom column headers
|
7 |
-
function wooccm_csv_export_modify_column_headers($column_headers) {
|
8 |
-
|
9 |
-
$new_headers = array();
|
10 |
-
|
11 |
-
$shipping = array(
|
12 |
-
'country',
|
13 |
-
'first_name',
|
14 |
-
'last_name',
|
15 |
-
'company',
|
16 |
-
'address_1',
|
17 |
-
'address_2',
|
18 |
-
'city',
|
19 |
-
'state',
|
20 |
-
'postcode'
|
21 |
-
);
|
22 |
-
$billing = array(
|
23 |
-
'country',
|
24 |
-
'first_name',
|
25 |
-
'last_name',
|
26 |
-
'company',
|
27 |
-
'address_1',
|
28 |
-
'address_2',
|
29 |
-
'city',
|
30 |
-
'state',
|
31 |
-
'postcode',
|
32 |
-
'email',
|
33 |
-
'phone'
|
34 |
-
);
|
35 |
-
|
36 |
-
$names = array(
|
37 |
-
'billing',
|
38 |
-
'shipping'
|
39 |
-
);
|
40 |
-
$inc = 3;
|
41 |
-
foreach ($names as $name) {
|
42 |
-
|
43 |
-
$array = ( $name == 'billing' ) ? $billing : $shipping;
|
44 |
-
$options = get_option('wccs_settings' . $inc);
|
45 |
-
if (!empty($options[$name . '_buttons'])) {
|
46 |
-
foreach ($options[$name . '_buttons'] as $btn) {
|
47 |
-
if (!in_array($btn['cow'], $array)) {
|
48 |
-
$new_headers[sprintf('_%s_%s', $name, $btn['cow'])] = wooccm_wpml_string($btn['label']);
|
49 |
-
}
|
50 |
-
}
|
51 |
-
}
|
52 |
-
$inc--;
|
53 |
-
}
|
54 |
-
|
55 |
-
$options = get_option('wccs_settings');
|
56 |
-
if (!empty($options['buttons'])) {
|
57 |
-
foreach ($options['buttons'] as $btn) {
|
58 |
-
$new_headers[$btn['cow']] = wooccm_wpml_string($btn['label']);
|
59 |
-
}
|
60 |
-
}
|
61 |
-
|
62 |
-
return array_merge($column_headers, $new_headers);
|
63 |
-
}
|
64 |
-
|
65 |
-
add_filter('wc_customer_order_csv_export_order_headers', 'wooccm_csv_export_modify_column_headers');
|
66 |
-
|
67 |
-
// set the data for each for custom columns
|
68 |
-
function wooccm_csv_export_modify_row_data($order_data, $order, $csv_generator) {
|
69 |
-
|
70 |
-
if (version_compare(wooccm_get_woo_version(), '2.7', '>=')) {
|
71 |
-
$order_id = ( method_exists($order, 'get_id') ? $order->get_id() : $order->id );
|
72 |
-
} else {
|
73 |
-
$order_id = ( isset($order->id) ? $order->id : 0 );
|
74 |
-
}
|
75 |
-
|
76 |
-
$custom_data = array();
|
77 |
-
|
78 |
-
$shipping = array(
|
79 |
-
'country',
|
80 |
-
'first_name',
|
81 |
-
'last_name',
|
82 |
-
'company',
|
83 |
-
'address_1',
|
84 |
-
'address_2',
|
85 |
-
'city',
|
86 |
-
'state',
|
87 |
-
'postcode'
|
88 |
-
);
|
89 |
-
$billing = array(
|
90 |
-
'country',
|
91 |
-
'first_name',
|
92 |
-
'last_name',
|
93 |
-
'company',
|
94 |
-
'address_1',
|
95 |
-
'address_2',
|
96 |
-
'city',
|
97 |
-
'state',
|
98 |
-
'postcode',
|
99 |
-
'email',
|
100 |
-
'phone'
|
101 |
-
);
|
102 |
-
|
103 |
-
$names = array(
|
104 |
-
'billing',
|
105 |
-
'shipping'
|
106 |
-
);
|
107 |
-
$inc = 3;
|
108 |
-
foreach ($names as $name) {
|
109 |
-
|
110 |
-
$array = ( $name == 'billing' ) ? $billing : $shipping;
|
111 |
-
|
112 |
-
$options = get_option('wccs_settings' . $inc);
|
113 |
-
|
114 |
-
if (!empty($options[$name . '_buttons'])) {
|
115 |
-
foreach ($options[$name . '_buttons'] as $btn) {
|
116 |
-
|
117 |
-
if (!in_array($btn['cow'], $array)) {
|
118 |
-
|
119 |
-
if (
|
120 |
-
get_post_meta($order_id, sprintf('_%s_%s', $name, $btn['cow']), true) &&
|
121 |
-
$btn['type'] !== 'heading' &&
|
122 |
-
(
|
123 |
-
$btn['type'] !== 'multiselect' || $btn['type'] !== 'multicheckbox'
|
124 |
-
)
|
125 |
-
) {
|
126 |
-
$custom_data[sprintf('_%s_%s', $name, $btn['cow'])] = get_post_meta($order_id, sprintf('_%s_%s', $name, $btn['cow']), true);
|
127 |
-
}
|
128 |
-
|
129 |
-
if (
|
130 |
-
get_post_meta($order_id, sprintf('_%s_%s', $name, $btn['cow']), true) &&
|
131 |
-
$btn['type'] !== 'heading' &&
|
132 |
-
$btn['type'] !== 'wooccmupload' &&
|
133 |
-
(
|
134 |
-
$btn['type'] == 'multiselect' || $btn['type'] == 'multicheckbox'
|
135 |
-
)
|
136 |
-
) {
|
137 |
-
$custom_data[sprintf('_%s_%s', $name, $btn['cow'])] = '';
|
138 |
-
$value = get_post_meta($order_id, sprintf('_%s_%s', $name, $btn['cow']), true);
|
139 |
-
$strings = maybe_unserialize($value);
|
140 |
-
if (!empty($strings)) {
|
141 |
-
if (is_array($strings)) {
|
142 |
-
$iww = 0;
|
143 |
-
$len = count($strings);
|
144 |
-
foreach ($strings as $key) {
|
145 |
-
if ($iww == $len - 1) {
|
146 |
-
$custom_data[sprintf('_%s_%s', $name, $btn['cow'])] .= $key;
|
147 |
-
} else {
|
148 |
-
$custom_data[sprintf('_%s_%s', $name, $btn['cow'])] .= $key . ', ';
|
149 |
-
}
|
150 |
-
$iww++;
|
151 |
-
}
|
152 |
-
} else {
|
153 |
-
echo $strings;
|
154 |
-
}
|
155 |
-
} else {
|
156 |
-
echo '-';
|
157 |
-
}
|
158 |
-
}
|
159 |
-
}
|
160 |
-
}
|
161 |
-
}
|
162 |
-
$inc--;
|
163 |
-
}
|
164 |
-
|
165 |
-
$options = get_option('wccs_settings');
|
166 |
-
if (!empty($options['buttons'])) {
|
167 |
-
foreach ($options['buttons'] as $btn) {
|
168 |
-
|
169 |
-
if (
|
170 |
-
get_post_meta($order_id, $btn['cow'], true) &&
|
171 |
-
$btn['type'] !== 'heading' &&
|
172 |
-
(
|
173 |
-
$btn['type'] !== 'multiselect' || $btn['type'] !== 'multicheckbox'
|
174 |
-
)
|
175 |
-
) {
|
176 |
-
$custom_data[$btn['cow']] = get_post_meta($order_id, $btn['cow'], true);
|
177 |
-
}
|
178 |
-
|
179 |
-
if (
|
180 |
-
get_post_meta($order_id, $btn['cow'], true) &&
|
181 |
-
$btn['type'] !== 'heading' &&
|
182 |
-
$btn['type'] !== 'wooccmupload' &&
|
183 |
-
(
|
184 |
-
$btn['type'] == 'multiselect' || $btn['type'] == 'multicheckbox'
|
185 |
-
)
|
186 |
-
) {
|
187 |
-
$custom_data[$btn['cow']] = '';
|
188 |
-
$value = get_post_meta($order_id, $btn['cow'], true);
|
189 |
-
$strings = maybe_unserialize($value);
|
190 |
-
if (!empty($strings)) {
|
191 |
-
if (is_array($strings)) {
|
192 |
-
$iww = 0;
|
193 |
-
$len = count($strings);
|
194 |
-
foreach ($strings as $key) {
|
195 |
-
if ($iww == $len - 1) {
|
196 |
-
$custom_data[$btn['cow']] .= $key;
|
197 |
-
} else {
|
198 |
-
$custom_data[$btn['cow']] .= $key . ', ';
|
199 |
-
}
|
200 |
-
$iww++;
|
201 |
-
}
|
202 |
-
echo $strings;
|
203 |
-
}
|
204 |
-
} else {
|
205 |
-
echo '-';
|
206 |
-
}
|
207 |
-
}
|
208 |
-
}
|
209 |
-
}
|
210 |
-
|
211 |
-
// defaults set back
|
212 |
-
$new_order_data = array();
|
213 |
-
|
214 |
-
if (isset($csv_generator->order_format) && ( 'default_one_row_per_item' == $csv_generator->order_format || 'legacy_one_row_per_item' == $csv_generator->order_format )) {
|
215 |
-
if (!empty($order_data)) {
|
216 |
-
foreach ($order_data as $data) {
|
217 |
-
$new_order_data[] = array_merge((array) $data, $custom_data);
|
218 |
-
}
|
219 |
-
}
|
220 |
-
} else {
|
221 |
-
$new_order_data = array_merge($order_data, $custom_data);
|
222 |
-
}
|
223 |
-
|
224 |
-
return $new_order_data;
|
225 |
-
}
|
226 |
-
|
227 |
-
add_filter('wc_customer_order_csv_export_order_row', 'wooccm_csv_export_modify_row_data', 10, 3);
|
228 |
-
|
229 |
-
function wooccm_additional_gen($tab, $abbr, $section, $wooname = '') {
|
230 |
-
|
231 |
-
global $woocommerce, $wpdb;
|
232 |
-
|
233 |
-
$options = get_option('wccs_settings');
|
234 |
-
$options2 = get_option('wccs_settings2'); // shipping
|
235 |
-
$options3 = get_option('wccs_settings3'); // billing
|
236 |
-
|
237 |
-
$args = array(
|
238 |
-
'post_type' => 'shop_order',
|
239 |
-
'posts_per_page' => -1,
|
240 |
-
'post_status' => array('wc-processing', 'wc-completed')
|
241 |
-
);
|
242 |
-
|
243 |
-
$loop = new WP_Query($args);
|
244 |
-
$csv_output = '';
|
245 |
-
|
246 |
-
$optionname = false;
|
247 |
-
switch ($wooname) {
|
248 |
-
|
249 |
-
case 'additional':
|
250 |
-
$optionname = $options['buttons'];
|
251 |
-
break;
|
252 |
-
|
253 |
-
case 'shipping':
|
254 |
-
$optionname = $options2['shipping_buttons'];
|
255 |
-
break;
|
256 |
-
|
257 |
-
case 'billing':
|
258 |
-
$optionname = $options3['billing_buttons'];
|
259 |
-
break;
|
260 |
-
}
|
261 |
-
|
262 |
-
if (!empty($abbr) && $section == 1) {
|
263 |
-
if ($tab == $wooname) {
|
264 |
-
|
265 |
-
while ($loop->have_posts()) {
|
266 |
-
$loop->the_post();
|
267 |
-
$order_id = $loop->post->ID;
|
268 |
-
$order = new WC_Order($order_id);
|
269 |
-
if (get_post_meta($order_id, $abbr, true)) {
|
270 |
-
$csv_output .= '["' . $order->billing_first_name . ' ' . $order->billing_last_name . '", "' . get_post_meta($order_id, $abbr, true) . '" ], ';
|
271 |
-
}
|
272 |
-
}
|
273 |
-
} elseif ($tab == 'heading') {
|
274 |
-
|
275 |
-
$csv_output .= '["Name","' . $abbr . '"]';
|
276 |
-
}
|
277 |
-
} elseif (empty($abbr) && $section == 2) {
|
278 |
-
if ($tab == $wooname) {
|
279 |
-
|
280 |
-
$listida = array();
|
281 |
-
while ($loop->have_posts()) {
|
282 |
-
$loop->the_post();
|
283 |
-
$order_id = $loop->post->ID;
|
284 |
-
$order = new WC_Order($order_id);
|
285 |
-
if (!empty($optionname)) {
|
286 |
-
foreach ($optionname as $name) {
|
287 |
-
if (get_post_meta($order_id, $name['cow'], true)) {
|
288 |
-
$listida[] = $order_id;
|
289 |
-
}
|
290 |
-
}
|
291 |
-
}
|
292 |
-
}
|
293 |
-
$csv_output = array_unique($listida);
|
294 |
-
} elseif ($tab == 'heading') {
|
295 |
-
|
296 |
-
$lista = array();
|
297 |
-
while ($loop->have_posts()) {
|
298 |
-
$loop->the_post();
|
299 |
-
$order_id = $loop->post->ID;
|
300 |
-
$order = new WC_Order($order_id);
|
301 |
-
if (!empty($optionname)) {
|
302 |
-
foreach ($optionname as $n) {
|
303 |
-
if (get_post_meta($order_id, $n['cow'], true)) {
|
304 |
-
$lista[] = $n['label'];
|
305 |
-
}
|
306 |
-
}
|
307 |
-
}
|
308 |
-
}
|
309 |
-
$csv_output = array_unique($lista);
|
310 |
-
}
|
311 |
-
}
|
312 |
-
return $csv_output;
|
313 |
-
}
|
314 |
-
|
315 |
-
/**
|
316 |
-
* Converting data to CSV [ SETTINGS DATA ]
|
317 |
-
*/
|
318 |
-
function wooccm_generate_csv($tab = '') {
|
319 |
-
|
320 |
-
$options = get_option('wccs_settings');
|
321 |
-
$options2 = get_option('wccs_settings2');
|
322 |
-
$options3 = get_option('wccs_settings3');
|
323 |
-
|
324 |
-
$csv_output = '';
|
325 |
-
switch ($tab) {
|
326 |
-
|
327 |
-
case 'additional':
|
328 |
-
if (!empty($options['buttons'])) {
|
329 |
-
$total = count($options['buttons']) - 1;
|
330 |
-
foreach ($options['buttons'] as $i => $btn) {
|
331 |
-
if ($i != 999 && !empty($btn['cow'])) {
|
332 |
-
$csv_output .= '[';
|
333 |
-
foreach ($btn as $n => $dataw) {
|
334 |
-
$csv_output .= '"' . $dataw . '",';
|
335 |
-
}
|
336 |
-
if ($i != $total) {
|
337 |
-
$csv_output .= '], ';
|
338 |
-
} else {
|
339 |
-
$csv_output .= ']';
|
340 |
-
}
|
341 |
-
}
|
342 |
-
}
|
343 |
-
}
|
344 |
-
break;
|
345 |
-
|
346 |
-
case 'billing':
|
347 |
-
if (!empty($options3['billing_buttons'])) {
|
348 |
-
$total = count($options3['billing_buttons']) - 1;
|
349 |
-
foreach ($options3['billing_buttons'] as $i => $btn) {
|
350 |
-
if ($i != 999 && !empty($btn['cow'])) {
|
351 |
-
$csv_output .= '[';
|
352 |
-
foreach ($btn as $n => $dataw) {
|
353 |
-
$csv_output .= '"' . $dataw . '",';
|
354 |
-
}
|
355 |
-
if ($i != $total) {
|
356 |
-
$csv_output .= '], ';
|
357 |
-
} else {
|
358 |
-
$csv_output .= ']';
|
359 |
-
}
|
360 |
-
}
|
361 |
-
}
|
362 |
-
}
|
363 |
-
break;
|
364 |
-
|
365 |
-
case 'shipping':
|
366 |
-
if (!empty($options2['shipping_buttons'])) {
|
367 |
-
$total = count($options2['shipping_buttons']) - 1;
|
368 |
-
foreach ($options2['shipping_buttons'] as $i => $btn) {
|
369 |
-
if ($i != 999 && !empty($btn['cow'])) {
|
370 |
-
$csv_output .= '[';
|
371 |
-
foreach ($btn as $n => $dataw) {
|
372 |
-
$csv_output .= '"' . $dataw . '",';
|
373 |
-
}
|
374 |
-
if ($i != $total) {
|
375 |
-
$csv_output .= '], ';
|
376 |
-
} else {
|
377 |
-
$csv_output .= ']';
|
378 |
-
}
|
379 |
-
}
|
380 |
-
}
|
381 |
-
}
|
382 |
-
break;
|
383 |
-
|
384 |
-
case 'general':
|
385 |
-
if (!empty($options['checkness'])) {
|
386 |
-
$csv_output .= '[';
|
387 |
-
foreach ($options['checkness'] as $i => $btn) {
|
388 |
-
$csv_output .= '"' . $btn . '",';
|
389 |
-
}
|
390 |
-
$csv_output .= ']';
|
391 |
-
}
|
392 |
-
break;
|
393 |
-
|
394 |
-
case 'heading':
|
395 |
-
if (!empty($options3['billing_buttons'])) {
|
396 |
-
$csv_output .= '[';
|
397 |
-
foreach ($options3['billing_buttons'][0] as $n => $dataw) {
|
398 |
-
$csv_output .= '"' . $n . '",';
|
399 |
-
}
|
400 |
-
$csv_output .= ']';
|
401 |
-
}
|
402 |
-
break;
|
403 |
-
|
404 |
-
case 'heading2':
|
405 |
-
if (!empty($options['checkness'])) {
|
406 |
-
$csv_output .= '[';
|
407 |
-
foreach ($options['checkness'] as $n => $btn) {
|
408 |
-
$csv_output .= '"' . $n . '",';
|
409 |
-
}
|
410 |
-
$csv_output .= ']';
|
411 |
-
}
|
412 |
-
break;
|
413 |
-
|
414 |
-
case 'heading3':
|
415 |
-
if (!empty($options['buttons'])) {
|
416 |
-
$csv_output .= '[';
|
417 |
-
foreach ($options['buttons'][0] as $n => $dataw) {
|
418 |
-
$csv_output .= '"' . $n . '",';
|
419 |
-
}
|
420 |
-
$csv_output .= ']';
|
421 |
-
}
|
422 |
-
break;
|
423 |
-
}
|
424 |
-
return $csv_output;
|
425 |
-
}
|
426 |
-
|
427 |
-
// --------------- END SETTINGS DATA ----------------
|
428 |
-
|
429 |
-
function wooccm_csvall_heading($heading) {
|
430 |
-
|
431 |
-
$csv_output = '';
|
432 |
-
$csv_output .= '["Name", ';
|
433 |
-
foreach ($heading as $data) {
|
434 |
-
$csv_output .= '"' . $data . '", ';
|
435 |
-
}
|
436 |
-
$csv_output .= ']';
|
437 |
-
return $csv_output;
|
438 |
-
}
|
439 |
-
|
440 |
-
function wooccm_csvall_info($orderids, $wooname = '') {
|
441 |
-
|
442 |
-
$options = get_option('wccs_settings');
|
443 |
-
$options2 = get_option('wccs_settings2');
|
444 |
-
$options3 = get_option('wccs_settings3');
|
445 |
-
|
446 |
-
$csv_output = '';
|
447 |
-
if (!empty($orderids)) {
|
448 |
-
foreach ($orderids as $order_id) {
|
449 |
-
$csv_output .= '["' . get_post_meta($order_id, '_billing_first_name', true) . ' ' . get_post_meta($order_id, '_billing_last_name', true) . '", ';
|
450 |
-
switch ($wooname) {
|
451 |
-
|
452 |
-
case 'additional':
|
453 |
-
if (!empty($options['buttons'])) {
|
454 |
-
foreach ($options['buttons'] as $name2) {
|
455 |
-
$csv_output .= '"' . get_post_meta($order_id, $name2['cow'], true) . '", ';
|
456 |
-
}
|
457 |
-
}
|
458 |
-
break;
|
459 |
-
|
460 |
-
case 'billing':
|
461 |
-
if (!empty($options3['billing_buttons'])) {
|
462 |
-
foreach ($options3['billing_buttons'] as $name2) {
|
463 |
-
$csv_output .= '"' . get_post_meta($order_id, $name2['cow'], true) . '", ';
|
464 |
-
}
|
465 |
-
}
|
466 |
-
break;
|
467 |
-
|
468 |
-
case 'shipping':
|
469 |
-
if (!empty($options2['shipping_buttons'])) {
|
470 |
-
foreach ($options2['shipping_buttons'] as $name2) {
|
471 |
-
$csv_output .= '"' . get_post_meta($order_id, $name2['cow'], true) . '", ';
|
472 |
-
}
|
473 |
-
}
|
474 |
-
break;
|
475 |
-
}
|
476 |
-
$csv_output .= '], ';
|
477 |
-
}
|
478 |
-
}
|
479 |
-
return $csv_output;
|
480 |
-
}
|
481 |
-
|
482 |
-
function wooccm_advance_export() {
|
483 |
-
|
484 |
-
$options = get_option('wccs_settings');
|
485 |
-
$options2 = get_option('wccs_settings2');
|
486 |
-
$options3 = get_option('wccs_settings3');
|
487 |
-
|
488 |
-
$single_download = ( isset($_POST['single-download']) ? sanitize_text_field($_POST['single-download']) : false );
|
489 |
-
if (!empty($single_download)) {
|
490 |
-
switch ($single_download) {
|
491 |
-
|
492 |
-
case 'additional':
|
493 |
-
$csv = wooccm_additional_gen('additional', ( isset($_POST['selectedval']) ? sanitize_text_field($_POST['selectedval']) : false), 1, 'additional');
|
494 |
-
$heading = wooccm_additional_gen('heading', ( isset($_POST['selectedval']) ? sanitize_text_field($_POST['selectedval']) : false), 1, 'additional');
|
495 |
-
break;
|
496 |
-
|
497 |
-
case 'shipping':
|
498 |
-
$csv = wooccm_additional_gen('shipping', ( isset($_POST['shippingselectedval']) ? sanitize_text_field($_POST['shippingselectedval']) : false), 1, 'shipping');
|
499 |
-
$heading = wooccm_additional_gen('heading', ( isset($_POST['shippingselectedval']) ? sanitize_text_field($_POST['shippingselectedval']) : false), 1, 'shipping');
|
500 |
-
break;
|
501 |
-
|
502 |
-
case 'billing':
|
503 |
-
$csv = wooccm_additional_gen('billing', ( isset($_POST['billingselectedval']) ? $_POST['billingselectedval'] : false), 1, 'billing');
|
504 |
-
$heading = wooccm_additional_gen('heading', ( isset($_POST['billingselectedval']) ? $_POST['billingselectedval'] : false), 1, 'billing');
|
505 |
-
break;
|
506 |
-
}
|
507 |
-
?>
|
508 |
-
|
509 |
-
<script type="text/javascript">
|
510 |
-
jQuery(document).ready(function ($) {
|
511 |
-
|
512 |
-
var A = [<?php echo $heading . ',' . $csv; ?>]; // initialize array of rows with header row as 1st item
|
513 |
-
|
514 |
-
var csvRows = [];
|
515 |
-
for (var i = 0, l = A.length; i < l; ++i) { // for each array( [..] ), join with commas for csv
|
516 |
-
for (index = 0; index < A[i].length; ++index) {
|
517 |
-
A[i][index] = '"' + A[i][index] + '"'; // add back quotes for each string, to store special characters and commas
|
518 |
-
}
|
519 |
-
csvRows.push(A[i]); // put data in a java useable array
|
520 |
-
}
|
521 |
-
|
522 |
-
var csvString = csvRows.join("\n"); // make rows for each array
|
523 |
-
|
524 |
-
var a = document.createElement('a');
|
525 |
-
|
526 |
-
a.href = 'data:attachment/csv,' + encodeURIComponent(csvString);
|
527 |
-
a.target = '_blank';
|
528 |
-
a.download = 'only_additional_fieldname.csv';
|
529 |
-
document.body.appendChild(a);
|
530 |
-
a.click();
|
531 |
-
|
532 |
-
});
|
533 |
-
</script>
|
534 |
-
|
535 |
-
<?php
|
536 |
-
}
|
537 |
-
|
538 |
-
// ----------- ALL DOWNLOAD ---------
|
539 |
-
$all_download = ( isset($_POST['all-download']) ? sanitize_text_field($_POST['all-download']) : false );
|
540 |
-
if (!empty($all_download)) {
|
541 |
-
|
542 |
-
$abbr = '';
|
543 |
-
switch ($all_download) {
|
544 |
-
|
545 |
-
case 'additional':
|
546 |
-
$csv = wooccm_additional_gen('additional', $abbr, 2);
|
547 |
-
$csv = wooccm_csvall_info($csv, 'additional');
|
548 |
-
$heading = wooccm_additional_gen('heading', $abbr, 2);
|
549 |
-
$heading = wooccm_csvall_heading($heading);
|
550 |
-
break;
|
551 |
-
|
552 |
-
case 'shipping':
|
553 |
-
$csv = wooccm_additional_gen('additional', $abbr, 2, 'shipping');
|
554 |
-
$csv = wooccm_csvall_info($csv, 'shipping');
|
555 |
-
$heading = wooccm_additional_gen('heading', $abbr, 2, 'shipping');
|
556 |
-
$heading = wooccm_csvall_heading($heading);
|
557 |
-
break;
|
558 |
-
|
559 |
-
case 'billing':
|
560 |
-
$csv = wooccm_additional_gen('billing', $abbr, 2, 'billing');
|
561 |
-
$csv = wooccm_csvall_info($csv, 'billing');
|
562 |
-
$heading = wooccm_additional_gen('heading', $abbr, 2, 'billing');
|
563 |
-
$heading = wooccm_csvall_heading($heading);
|
564 |
-
break;
|
565 |
-
}
|
566 |
-
?>
|
567 |
-
|
568 |
-
<script type="text/javascript">
|
569 |
-
jQuery(document).ready(function ($) {
|
570 |
-
|
571 |
-
var A = [<?php echo $heading . ',' . $csv; ?>]; // initialize array of rows with header row as 1st item
|
572 |
-
|
573 |
-
var csvRows = [];
|
574 |
-
for (var i = 0, l = A.length; i < l; ++i) { // for each array( [..] ), join with commas for csv
|
575 |
-
for (index = 0; index < A[i].length; ++index) {
|
576 |
-
A[i][index] = '"' + A[i][index] + '"'; // add back quotes for each string, to store special characters and commas
|
577 |
-
}
|
578 |
-
csvRows.push(A[i]); // put data in a java useable array
|
579 |
-
}
|
580 |
-
|
581 |
-
var csvString = csvRows.join("\n"); // make rows for each array
|
582 |
-
|
583 |
-
var a = document.createElement('a');
|
584 |
-
|
585 |
-
a.href = 'data:attachment/csv,' + encodeURIComponent(csvString);
|
586 |
-
a.target = '_blank';
|
587 |
-
a.download = 'only_additional_fieldname.csv';
|
588 |
-
document.body.appendChild(a);
|
589 |
-
a.click();
|
590 |
-
|
591 |
-
});
|
592 |
-
</script>
|
593 |
-
|
594 |
-
<?php
|
595 |
-
}
|
596 |
-
// ---------- END ALL DOWNLOAD --------------
|
597 |
-
// ---------- SETTING DOWNLOAD --------------
|
598 |
-
$setting_download = ( isset($_POST['setting-download']) ? sanitize_text_field($_POST['setting-download']) : false );
|
599 |
-
if (!empty($setting_download)) {
|
600 |
-
switch ($setting_download) {
|
601 |
-
|
602 |
-
case 'additional':
|
603 |
-
$csv = wooccm_generate_csv('additional');
|
604 |
-
$heading = wooccm_generate_csv('heading3');
|
605 |
-
break;
|
606 |
-
|
607 |
-
case 'billing':
|
608 |
-
$csv = wooccm_generate_csv('billing');
|
609 |
-
$heading = wooccm_generate_csv('heading');
|
610 |
-
break;
|
611 |
-
|
612 |
-
case 'shipping':
|
613 |
-
$csv = wooccm_generate_csv('shipping');
|
614 |
-
$heading = wooccm_generate_csv('heading');
|
615 |
-
break;
|
616 |
-
|
617 |
-
case 'general':
|
618 |
-
$csv = wooccm_generate_csv('general');
|
619 |
-
$heading = wooccm_generate_csv('heading2');
|
620 |
-
break;
|
621 |
-
}
|
622 |
-
?>
|
623 |
-
|
624 |
-
<script type="text/javascript">
|
625 |
-
jQuery(document).ready(function ($) {
|
626 |
-
|
627 |
-
var A = [<?php echo $heading . ',' . $csv; ?>]; // initialize array of rows with header row as 1st item
|
628 |
-
|
629 |
-
var csvRows = [];
|
630 |
-
for (var i = 0, l = A.length; i < l; ++i) { // for each array( [..] ), join with commas for csv
|
631 |
-
for (index = 0; index < A[i].length; ++index) {
|
632 |
-
A[i][index] = '"' + A[i][index] + '"'; // add back quotes for each string, to store special characters and commas
|
633 |
-
}
|
634 |
-
csvRows.push(A[i]); // put data in a java useable array
|
635 |
-
}
|
636 |
-
|
637 |
-
var csvString = csvRows.join("\n"); // make rows for each array
|
638 |
-
|
639 |
-
var a = document.createElement('a');
|
640 |
-
|
641 |
-
a.href = 'data:attachment/csv,' + encodeURIComponent(csvString);
|
642 |
-
a.target = '_blank';
|
643 |
-
a.download = 'only_additional_fieldname.csv';
|
644 |
-
document.body.appendChild(a);
|
645 |
-
a.click();
|
646 |
-
|
647 |
-
});
|
648 |
-
</script>
|
649 |
-
|
650 |
-
<?php
|
651 |
-
}
|
652 |
-
// ---------------- END SETTING DOWNLOAD --------------
|
653 |
-
?>
|
654 |
-
|
655 |
-
<script type="text/javascript">
|
656 |
-
jQuery(document).ready(function () {
|
657 |
-
jQuery(function () {
|
658 |
-
|
659 |
-
jQuery(".button.single-download.additional").click(function () {
|
660 |
-
jQuery("input[name=single-download]").val("additional");
|
661 |
-
jQuery("#additional_export").submit();
|
662 |
-
});
|
663 |
-
jQuery(".b utton.al l-download.additional").click(function () {
|
664 |
-
jQuery("input[name=all-download]").val("additional");
|
665 |
-
jQuery("#additional_export").submit();
|
666 |
-
});
|
667 |
-
jQuery(".button.setting-download.additional").click(function () {
|
668 |
-
jQuery("input[name=setting-download]").val("additional");
|
669 |
-
jQuery("#additional_export").submit();
|
670 |
-
});
|
671 |
-
< !-- shipping -- >
|
672 |
-
jQuery(".button.single-download.shipping").click(function () {
|
673 |
-
jQuery("input[name=single-download]").val("shipping");
|
674 |
-
jQuery("#additional_export").submit();
|
675 |
-
});
|
676 |
-
|
677 |
-
jQuery(".button.all-download.shipping").click(function () {
|
678 |
-
jQuery("input[name=all-download]").val("shipping");
|
679 |
-
jQuery("#additional_export").submit();
|
680 |
-
});
|
681 |
-
jQuery(".button.setting-download.additional").click(function () {
|
682 |
-
jQuery("input[name=setting-download]").val("shipping");
|
683 |
-
jQuery("#additional_export").submit();
|
684 |
-
});
|
685 |
-
<!-- end shipping -->
|
686 |
-
|
687 |
-
<!-- billing -->
|
688 |
-
jQuery(".button.single-download.billing").click(function () {
|
689 |
-
jQuery("input[name=single-download]").val("billing");
|
690 |
-
jQuery("#additional_export").submit();
|
691 |
-
});
|
692 |
-
|
693 |
-
jQuery(".button.all-download.billing").click(function () {
|
694 |
-
jQuery("input[name=all-download]").val("billing");
|
695 |
-
jQuery("#additional_export").submit();
|
696 |
-
});
|
697 |
-
|
698 |
-
jQuery(".button.setting-download.additional").click(function () {
|
699 |
-
jQuery("input[name=setting-download]").val("billing");
|
700 |
-
jQuery("#additional_export").submit();
|
701 |
-
});
|
702 |
-
<!-- end billing -->
|
703 |
-
|
704 |
-
});
|
705 |
-
|
706 |
-
});
|
707 |
-
</script>
|
708 |
-
|
709 |
-
<h2><?php _e('WooCommerce Checkout Manager', 'woocommerce-checkout-manager'); ?></h2>
|
710 |
-
<div class="wrap">
|
711 |
-
|
712 |
-
<div id="content">
|
713 |
-
|
714 |
-
<h2 class="nav-tab-wrapper add_tip_wrap">
|
715 |
-
<a class="nav-tab general-tab nav-tab-active"><?php _e('Export', 'woocommerce-checkout-manager'); ?></a>
|
716 |
-
<a class="nav-tab" href="<?php echo esc_url(WOOCCM_SUPPORT_URL); ?>" target="_blank">
|
717 |
-
<?php esc_html_e('Report a bug', 'woocommerce-checkout-manager'); ?>
|
718 |
-
</a>
|
719 |
-
<!--<a class="nav-tab star" href="https://wordpress.org/support/view/plugin-reviews/woocommerce-checkout-manager?filter=5" target="_blank">
|
720 |
-
<div id="star-five" title="<?php _e('Like the plugin? Rate it! On WordPress.org', 'woocommerce-checkout-manager'); ?>">
|
721 |
-
<div class="star-rating">
|
722 |
-
<div class="star star-full"></div>
|
723 |
-
<div class="star star-full"></div>
|
724 |
-
<div class="star star-full"></div>
|
725 |
-
<div class="star star-full"></div>
|
726 |
-
<div class="star star-full"></div>
|
727 |
-
</div>
|
728 |
-
</div>
|
729 |
-
</a>-->
|
730 |
-
</h2>
|
731 |
-
<!-- .nav-tab-wrapper -->
|
732 |
-
|
733 |
-
<ul class="subsubsub">
|
734 |
-
<li><a href="#billing-fields-section"><?php _e('Billing Fields', 'woocommerce-checkout-manager'); ?></a> |</li>
|
735 |
-
<li><a href="#shipping-fields-section"><?php _e('Shipping Fields', 'woocommerce-checkout-manager'); ?></a> |</li>
|
736 |
-
<li><a href="#additional-fields-section"><?php _e('Additional Fields', 'woocommerce-checkout-manager'); ?></a></li>
|
737 |
-
</ul>
|
738 |
-
<!-- .subsubsub -->
|
739 |
-
<br class="clear">
|
740 |
-
|
741 |
-
<h3><?php _e('Field Data Export', 'woocommerce-checkout-manager'); ?></h3>
|
742 |
-
|
743 |
-
<div id="welcome-panel" class="welcome-panel heading">
|
744 |
-
|
745 |
-
<form name="additionalexport" method="post" action="" id="additional_export">
|
746 |
-
|
747 |
-
<input type="hidden" name="single-download" val="" />
|
748 |
-
<input type="hidden" name="all-download" val="" />
|
749 |
-
<input type="hidden" name="setting-download" val="" />
|
750 |
-
|
751 |
-
<div id="welcome-panel" class="welcome-panel left billing">
|
752 |
-
|
753 |
-
<!-- BILLING SECTION -->
|
754 |
-
|
755 |
-
<p id="billing-fields-section" class="about-description heading"><?php _e('Billing Fields Section', 'woocommerce-checkout-manager'); ?></p>
|
756 |
-
<hr />
|
757 |
-
|
758 |
-
<?php if (!empty($options3['billing_buttons'])) { ?>
|
759 |
-
<div class="welcome-panel-content">
|
760 |
-
|
761 |
-
<p class="about-description inner"><?php _e('Export All Orders with abbreviation name : ', 'woocommerce-checkout-manager'); ?>
|
762 |
-
<select name="billingselectedval">
|
763 |
-
<?php foreach ($options3['billing_buttons'] as $name) { ?>
|
764 |
-
<option value="<?php echo $name['cow']; ?>"><?php echo $name['cow']; ?></option>
|
765 |
-
<?php } ?>
|
766 |
-
</select>
|
767 |
-
</p>
|
768 |
-
<!-- .about-description inner -->
|
769 |
-
|
770 |
-
<div class="welcome-panel-column-container">
|
771 |
-
<div class="welcome-panel-column">
|
772 |
-
<ul>
|
773 |
-
<li>
|
774 |
-
<a class="button button-primary button-hero single-download billing" href="#"><?php _e('Download', 'woocommerce-checkout-manager'); ?></a>
|
775 |
-
</li>
|
776 |
-
</ul>
|
777 |
-
</div>
|
778 |
-
</div>
|
779 |
-
<!-- .welcome-panel-column-container -->
|
780 |
-
<?php } ?>
|
781 |
-
|
782 |
-
<div class="sheet"></div>
|
783 |
-
<p style="clear:both;" class="about-description inner"><?php _e('Export All Orders', 'woocommerce-checkout-manager'); ?></p>
|
784 |
-
|
785 |
-
<div class="welcome-panel-column-container">
|
786 |
-
<div class="welcome-panel-column">
|
787 |
-
<ul>
|
788 |
-
<li>
|
789 |
-
<a class="button button-primary button-hero all-download billing" href="#"><?php _e('Download', 'woocommerce-checkout-manager'); ?></a>
|
790 |
-
</li>
|
791 |
-
</ul>
|
792 |
-
</div>
|
793 |
-
</div>
|
794 |
-
<!-- .welcome-panel-column-container -->
|
795 |
-
|
796 |
-
<div class="sheet"></div>
|
797 |
-
<p style="clear:both;" class="about-description inner"><?php _e('Export Settings', 'woocommerce-checkout-manager'); ?></p>
|
798 |
-
|
799 |
-
<div class="welcome-panel-column-container">
|
800 |
-
<div class="welcome-panel-column">
|
801 |
-
<ul>
|
802 |
-
<li>
|
803 |
-
<a class="button button-primary button-hero setting-download billing" href="#"><?php _e('Download', 'woocommerce-checkout-manager'); ?></a>
|
804 |
-
</li>
|
805 |
-
</ul>
|
806 |
-
</div>
|
807 |
-
</div>
|
808 |
-
<!-- .welcome-panel-column-container -->
|
809 |
-
|
810 |
-
</div>
|
811 |
-
<!-- .welcome-panel-content -->
|
812 |
-
</div>
|
813 |
-
<!-- #welcome-panel -->
|
814 |
-
|
815 |
-
<!-- END BILLING SECTION -->
|
816 |
-
|
817 |
-
<div id="welcome-panel" class="welcome-panel left shipping">
|
818 |
-
|
819 |
-
<!-- SHIPPING SECTION -->
|
820 |
-
|
821 |
-
<p id="shipping-fields-section" class="about-description heading"><?php _e('Shipping Fields Section', 'woocommerce-checkout-manager'); ?></p>
|
822 |
-
<hr />
|
823 |
-
|
824 |
-
<?php if (!empty($options2['shipping_buttons'])) { ?>
|
825 |
-
<div class="welcome-panel-content">
|
826 |
-
|
827 |
-
<p class="about-description inner"><?php _e('Export All Orders with abbreviation name : ', 'woocommerce-checkout-manager'); ?>
|
828 |
-
<select name="shippingselectedval">
|
829 |
-
<?php foreach ($options2['shipping_buttons'] as $name) { ?>
|
830 |
-
<option value="<?php echo $name['cow']; ?>"><?php echo $name['cow']; ?></option>
|
831 |
-
<?php } ?>
|
832 |
-
</select>
|
833 |
-
</p>
|
834 |
-
<!-- .about-description inner -->
|
835 |
-
|
836 |
-
<div class="welcome-panel-column-container">
|
837 |
-
<div class="welcome-panel-column">
|
838 |
-
<ul>
|
839 |
-
<li>
|
840 |
-
<a class="button button-primary button-hero single-download shipping" href="#"><?php _e('Download', 'woocommerce-checkout-manager'); ?></a>
|
841 |
-
</li>
|
842 |
-
</ul>
|
843 |
-
</div>
|
844 |
-
</div>
|
845 |
-
<!-- .welcome-panel-column-container -->
|
846 |
-
<?php } ?>
|
847 |
-
|
848 |
-
<div class="sheet"></div>
|
849 |
-
<p style="clear:both;" class="about-description inner"><?php _e('Export All Orders', 'woocommerce-checkout-manager'); ?></p>
|
850 |
-
|
851 |
-
<div class="welcome-panel-column-container">
|
852 |
-
<div class="welcome-panel-column">
|
853 |
-
<ul>
|
854 |
-
<li>
|
855 |
-
<a class="button button-primary button-hero all-download shipping" href="#"><?php _e('Download', 'woocommerce-checkout-manager'); ?></a>
|
856 |
-
</li>
|
857 |
-
</ul>
|
858 |
-
</div>
|
859 |
-
</div>
|
860 |
-
<!-- .welcome-panel-column-container -->
|
861 |
-
|
862 |
-
<div class="sheet"></div>
|
863 |
-
<p style="clear:both;" class="about-description inner"><?php _e('Export Settings', 'woocommerce-checkout-manager'); ?></p>
|
864 |
-
|
865 |
-
<div class="welcome-panel-column-container">
|
866 |
-
<div class="welcome-panel-column">
|
867 |
-
<ul>
|
868 |
-
<li>
|
869 |
-
<a class="button button-primary button-hero setting-download shipping" href="#"><?php _e('Download', 'woocommerce-checkout-manager'); ?></a>
|
870 |
-
</li>
|
871 |
-
</ul>
|
872 |
-
</div>
|
873 |
-
</div>
|
874 |
-
<!-- .welcome-panel-column-container -->
|
875 |
-
|
876 |
-
</div>
|
877 |
-
<!-- .welcome-panel-content -->
|
878 |
-
|
879 |
-
</div>
|
880 |
-
<!-- #welcome-panel -->
|
881 |
-
|
882 |
-
<!-- END SHIPPING SECTION -->
|
883 |
-
|
884 |
-
<?php if (!empty($options['buttons'])) { ?>
|
885 |
-
<div id="welcome-panel" class="welcome-panel left">
|
886 |
-
|
887 |
-
<!-- ADDITIONAL SECTION -->
|
888 |
-
<p id="additional-fields-section" class="about-description heading"><?php _e('Additional Fields Section', 'woocommerce-checkout-manager'); ?></p>
|
889 |
-
<hr />
|
890 |
-
<div class="welcome-panel-content">
|
891 |
-
|
892 |
-
<p class="about-description inner"><?php _e('Export All Orders with abbreviation name : ', 'woocommerce-checkout-manager'); ?>
|
893 |
-
<select name="selectedval">
|
894 |
-
<?php foreach ($options['buttons'] as $name) { ?>
|
895 |
-
<option value="<?php echo $name['cow']; ?>"><?php echo $name['cow']; ?></option>
|
896 |
-
<?php } ?>
|
897 |
-
</select>
|
898 |
-
</p>
|
899 |
-
<!-- .about-description inner -->
|
900 |
-
|
901 |
-
<div class="welcome-panel-column-container">
|
902 |
-
<div class="welcome-panel-column">
|
903 |
-
<ul>
|
904 |
-
<li>
|
905 |
-
<a class="button button-primary button-hero single-download additional" href="#"><?php _e('Download', 'woocommerce-checkout-manager'); ?></a>
|
906 |
-
</li>
|
907 |
-
</ul>
|
908 |
-
</div>
|
909 |
-
</div>
|
910 |
-
<!-- .welcome-panel-column-container -->
|
911 |
-
<?php } ?>
|
912 |
-
|
913 |
-
<div class="sheet"></div>
|
914 |
-
<p style="clear:both;" class="about-description inner"><?php _e('Export All Orders', 'woocommerce-checkout-manager'); ?></p>
|
915 |
-
|
916 |
-
<div class="welcome-panel-column-container">
|
917 |
-
<div class="welcome-panel-column">
|
918 |
-
<ul>
|
919 |
-
<li>
|
920 |
-
<a class="button button-primary button-hero all-download additional" href="#"><?php _e('Download', 'woocommerce-checkout-manager'); ?></a>
|
921 |
-
</li>
|
922 |
-
</ul>
|
923 |
-
</div>
|
924 |
-
</div>
|
925 |
-
<!-- .welcome-panel-column-container -->
|
926 |
-
|
927 |
-
<div class="sheet"></div>
|
928 |
-
<p style="clear:both;" class="about-description inner"><?php _e('Export Settings', 'woocommerce-checkout-manager'); ?></p>
|
929 |
-
|
930 |
-
<div class="welcome-panel-column-container">
|
931 |
-
<div class="welcome-panel-column">
|
932 |
-
<ul>
|
933 |
-
<li>
|
934 |
-
<a class="button button-primary button-hero setting-download additional" href="#"><?php _e('Download', 'woocommerce-checkout-manager'); ?></a>
|
935 |
-
</li>
|
936 |
-
</ul>
|
937 |
-
</div>
|
938 |
-
</div>
|
939 |
-
<!-- .welcome-panel-column-container -->
|
940 |
-
|
941 |
-
</div>
|
942 |
-
<!-- .welcome-panel-content -->
|
943 |
-
|
944 |
-
<!-- // END ADDITIONAL SECTION -->
|
945 |
-
|
946 |
-
</div>
|
947 |
-
<!-- #welcome-panel -->
|
948 |
-
|
949 |
-
</form>
|
950 |
-
<!-- #additional_export -->
|
951 |
-
|
952 |
-
</div>
|
953 |
-
<!-- #welcome-panel -->
|
954 |
-
|
955 |
-
</div>
|
956 |
-
<!-- #content -->
|
957 |
-
|
958 |
-
</div>
|
959 |
-
<!-- .wrap -->
|
960 |
-
<?php
|
961 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/formatting.php
DELETED
@@ -1,24 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
function wooccm_mul_array( $val, $array ) {
|
3 |
-
|
4 |
-
if( !empty( $array ) ) {
|
5 |
-
if( is_array( $array ) ) {
|
6 |
-
foreach( $array as $item ) {
|
7 |
-
if( isset( $item['cow'] ) && $item['cow'] == $val ) {
|
8 |
-
return true;
|
9 |
-
}
|
10 |
-
}
|
11 |
-
}
|
12 |
-
}
|
13 |
-
|
14 |
-
}
|
15 |
-
|
16 |
-
function wooccm_wpml_string( $input = '' ) {
|
17 |
-
|
18 |
-
if( function_exists( 'icl_t' ) ) {
|
19 |
-
return icl_t('WooCommerce Checkout Manager', $input, $input );
|
20 |
-
} else {
|
21 |
-
return $input;
|
22 |
-
}
|
23 |
-
|
24 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/functions.php
DELETED
@@ -1,14 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
function wooccm_get_woo_version() {
|
4 |
-
|
5 |
-
$version = false;
|
6 |
-
if( defined( 'WC_VERSION' ) ) {
|
7 |
-
$version = WC_VERSION;
|
8 |
-
// Backwards compatibility
|
9 |
-
} else if( defined( 'WOOCOMMERCE_VERSION' ) ) {
|
10 |
-
$version = WOOCOMMERCE_VERSION;
|
11 |
-
}
|
12 |
-
return $version;
|
13 |
-
|
14 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/install.php
DELETED
@@ -1,249 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
// Plugin activation script
|
4 |
-
function wooccm_install() {
|
5 |
-
|
6 |
-
$options = get_option('wccs_settings');
|
7 |
-
$options2 = get_option('wccs_settings2');
|
8 |
-
$options3 = get_option('wccs_settings3');
|
9 |
-
|
10 |
-
update_option(WOOCCM_PREFIX . '_update_notice', 0);
|
11 |
-
|
12 |
-
if (function_exists('icl_register_string'))
|
13 |
-
icl_register_string('WooCommerce Checkout Manager', 'is a required field.', 'is a required field.');
|
14 |
-
|
15 |
-
if (empty($options['checkness']['position'])) {
|
16 |
-
$options['checkness']['position'] = 'after_order_notes';
|
17 |
-
}
|
18 |
-
if (empty($options['checkness']['wooccm_notification_email'])) {
|
19 |
-
$options['checkness']['wooccm_notification_email'] = get_option('admin_email');
|
20 |
-
}
|
21 |
-
if (empty($options['checkness']['payment_method_d'])) {
|
22 |
-
$options['checkness']['payment_method_d'] = 'Payment Method';
|
23 |
-
}
|
24 |
-
if (empty($options['checkness']['time_stamp_title'])) {
|
25 |
-
$options['checkness']['time_stamp_title'] = 'Order Time';
|
26 |
-
}
|
27 |
-
if (empty($options['checkness']['payment_method_t'])) {
|
28 |
-
$options['checkness']['payment_method_t'] = '1';
|
29 |
-
}
|
30 |
-
if (empty($options['checkness']['shipping_method_d'])) {
|
31 |
-
$options['checkness']['shipping_method_d'] = 'Shipping Method';
|
32 |
-
}
|
33 |
-
if (empty($options['checkness']['shipping_method_t'])) {
|
34 |
-
$options['checkness']['shipping_method_t'] = '1';
|
35 |
-
}
|
36 |
-
/*if (empty($options2['shipping_buttons'])) {
|
37 |
-
$shipping = array(
|
38 |
-
'country' => 'Country',
|
39 |
-
'first_name' => 'First Name',
|
40 |
-
'last_name' => 'Last Name',
|
41 |
-
'company' => 'Company Name',
|
42 |
-
'address_1' => 'Address',
|
43 |
-
'address_2' => '',
|
44 |
-
'city' => 'Town/ City',
|
45 |
-
'state' => 'State',
|
46 |
-
'postcode' => 'Zip'
|
47 |
-
);
|
48 |
-
$ship = 0;
|
49 |
-
foreach ($shipping as $name => $value) {
|
50 |
-
|
51 |
-
$options2['shipping_buttons'][$ship]['label'] = (!empty($value) ? __($value, 'woocommerce-checkout-manager') : false );
|
52 |
-
$options2['shipping_buttons'][$ship]['cow'] = $name;
|
53 |
-
$options2['shipping_buttons'][$ship]['checkbox'] = 'true';
|
54 |
-
$options2['shipping_buttons'][$ship]['order'] = $ship + 1;
|
55 |
-
$options2['shipping_buttons'][$ship]['type'] = 'wooccmtext';
|
56 |
-
|
57 |
-
if ($name == 'country') {
|
58 |
-
$options2['shipping_buttons'][$ship]['position'] = 'form-row-wide';
|
59 |
-
}
|
60 |
-
|
61 |
-
if ($name == 'first_name') {
|
62 |
-
$options2['shipping_buttons'][$ship]['position'] = 'form-row-first';
|
63 |
-
}
|
64 |
-
|
65 |
-
if ($name == 'last_name') {
|
66 |
-
$options2['shipping_buttons'][$ship]['position'] = 'form-row-last';
|
67 |
-
$options2['shipping_buttons'][$ship]['clear_row'] = true;
|
68 |
-
}
|
69 |
-
|
70 |
-
if ($name == 'company') {
|
71 |
-
$options2['shipping_buttons'][$ship]['position'] = 'form-row-wide';
|
72 |
-
}
|
73 |
-
|
74 |
-
if ($name == 'address_1') {
|
75 |
-
$options2['shipping_buttons'][$ship]['position'] = 'form-row-wide';
|
76 |
-
$options2['shipping_buttons'][$ship]['placeholder'] = __('Street address', 'woocommerce-checkout-manager');
|
77 |
-
}
|
78 |
-
|
79 |
-
if ($name == 'address_2') {
|
80 |
-
$options2['shipping_buttons'][$ship]['position'] = 'form-row-wide';
|
81 |
-
$options2['shipping_buttons'][$ship]['placeholder'] = __('Apartment, suite, unit etc. (optional)', 'woocommerce-checkout-manager');
|
82 |
-
}
|
83 |
-
|
84 |
-
if ($name == 'city') {
|
85 |
-
$options2['shipping_buttons'][$ship]['position'] = 'form-row-wide';
|
86 |
-
$options2['shipping_buttons'][$ship]['placeholder'] = __('Town / City', 'woocommerce-checkout-manager');
|
87 |
-
}
|
88 |
-
|
89 |
-
if ($name == 'state') {
|
90 |
-
$options2['shipping_buttons'][$ship]['position'] = 'form-row-wide';
|
91 |
-
}
|
92 |
-
|
93 |
-
if ($name == 'postcode') {
|
94 |
-
$options2['shipping_buttons'][$ship]['position'] = 'form-row-wide';
|
95 |
-
$options2['shipping_buttons'][$ship]['placeholder'] = __('Postcode / Zip', 'woocommerce-checkout-manager');
|
96 |
-
$options2['shipping_buttons'][$ship]['clear_row'] = true;
|
97 |
-
}
|
98 |
-
|
99 |
-
$ship++;
|
100 |
-
}
|
101 |
-
}
|
102 |
-
|
103 |
-
if (empty($options3['billing_buttons'])) {
|
104 |
-
$billing = array(
|
105 |
-
'country' => 'Country',
|
106 |
-
'first_name' => 'First Name',
|
107 |
-
'last_name' => 'Last Name',
|
108 |
-
'company' => 'Company Name',
|
109 |
-
'address_1' => 'Address',
|
110 |
-
'address_2' => '',
|
111 |
-
'city' => 'Town/ City',
|
112 |
-
'state' => 'State',
|
113 |
-
'postcode' => 'Zip',
|
114 |
-
'email' => 'Email Address',
|
115 |
-
'phone' => 'Phone'
|
116 |
-
);
|
117 |
-
$bill = 0;
|
118 |
-
foreach ($billing as $name => $value) {
|
119 |
-
|
120 |
-
$options3['billing_buttons'][$bill]['label'] = (!empty($value) ? __($value, 'woocommerce-checkout-manager') : false );
|
121 |
-
$options3['billing_buttons'][$bill]['cow'] = $name;
|
122 |
-
$options3['billing_buttons'][$bill]['checkbox'] = 'true';
|
123 |
-
$options3['billing_buttons'][$bill]['order'] = $bill + 1;
|
124 |
-
$options3['billing_buttons'][$bill]['type'] = 'wooccmtext';
|
125 |
-
|
126 |
-
if ($name == 'country') {
|
127 |
-
$options3['billing_buttons'][$bill]['position'] = 'form-row-wide';
|
128 |
-
$options3['billing_buttons'][$bill]['type'] = 'wooccmcountry';
|
129 |
-
}
|
130 |
-
|
131 |
-
if ($name == 'first_name') {
|
132 |
-
$options3['billing_buttons'][$bill]['position'] = 'form-row-first';
|
133 |
-
}
|
134 |
-
|
135 |
-
if ($name == 'last_name') {
|
136 |
-
$options3['billing_buttons'][$bill]['position'] = 'form-row-last';
|
137 |
-
$options3['billing_buttons'][$bill]['clear_row'] = true;
|
138 |
-
}
|
139 |
-
|
140 |
-
if ($name == 'company') {
|
141 |
-
$options3['billing_buttons'][$bill]['position'] = 'form-row-wide';
|
142 |
-
}
|
143 |
-
|
144 |
-
if ($name == 'address_1') {
|
145 |
-
$options3['billing_buttons'][$bill]['position'] = 'form-row-wide';
|
146 |
-
$options3['billing_buttons'][$bill]['placeholder'] = __('Street address', 'woocommerce-checkout-manager');
|
147 |
-
}
|
148 |
-
|
149 |
-
if ($name == 'address_2') {
|
150 |
-
$options3['billing_buttons'][$bill]['position'] = 'form-row-wide';
|
151 |
-
$options3['billing_buttons'][$bill]['placeholder'] = __('Apartment, suite, unit etc. (optional)', 'woocommerce-checkout-manager');
|
152 |
-
$options3['billing_buttons'][$bill]['required'] = false;
|
153 |
-
}
|
154 |
-
|
155 |
-
if ($name == 'city') {
|
156 |
-
$options3['billing_buttons'][$bill]['position'] = 'form-row-wide';
|
157 |
-
$options3['billing_buttons'][$bill]['placeholder'] = __('Town / City', 'woocommerce-checkout-manager');
|
158 |
-
}
|
159 |
-
|
160 |
-
if ($name == 'state') {
|
161 |
-
$options3['billing_buttons'][$bill]['position'] = 'form-row-wide';
|
162 |
-
$options3['billing_buttons'][$bill]['type'] = 'wooccmstate';
|
163 |
-
}
|
164 |
-
|
165 |
-
if ($name == 'postcode') {
|
166 |
-
$options3['billing_buttons'][$bill]['position'] = 'form-row-wide';
|
167 |
-
$options3['billing_buttons'][$bill]['placeholder'] = __('Postcode / Zip', 'woocommerce-checkout-manager');
|
168 |
-
$options3['billing_buttons'][$bill]['clear_row'] = true;
|
169 |
-
}
|
170 |
-
|
171 |
-
if ($name == 'email') {
|
172 |
-
$options3['billing_buttons'][$bill]['position'] = 'form-row-first';
|
173 |
-
}
|
174 |
-
|
175 |
-
if ($name == 'phone') {
|
176 |
-
$options3['billing_buttons'][$bill]['position'] = 'form-row-last';
|
177 |
-
$options3['billing_buttons'][$bill]['clear_row'] = true;
|
178 |
-
}
|
179 |
-
|
180 |
-
$bill++;
|
181 |
-
}
|
182 |
-
}
|
183 |
-
|
184 |
-
if (!empty($options['buttons'])) {
|
185 |
-
foreach ($options['buttons'] as $i => $btn) {
|
186 |
-
|
187 |
-
if (!empty($btn['check_1']) || !empty($btn['check_2'])) {
|
188 |
-
$options['buttons'][$i]['option_array'] = implode('||', array(wooccm_wpml_string($btn['check_1']), wooccm_wpml_string($btn['check_2'])));
|
189 |
-
$options['buttons'][$i]['check_1'] = '';
|
190 |
-
$options['buttons'][$i]['check_2'] = '';
|
191 |
-
}
|
192 |
-
|
193 |
-
$options['buttons'][$i]['type'] = ( $btn['type'] == 'checkbox' ) ? 'checkbox_wccm' : $btn['type'];
|
194 |
-
$options['buttons'][$i]['type'] = ( $btn['type'] == 'text' ) ? 'wooccmtext' : $btn['type'];
|
195 |
-
$options['buttons'][$i]['type'] = ( $btn['type'] == 'select' ) ? 'wooccmselect' : $btn['type'];
|
196 |
-
$options['buttons'][$i]['type'] = ( $btn['type'] == 'date' ) ? 'datepicker' : $btn['type'];
|
197 |
-
|
198 |
-
if (empty($btn['option_array'])) {
|
199 |
-
$btn['option_array'] = '';
|
200 |
-
}
|
201 |
-
|
202 |
-
$mysecureop = explode('||', $btn['option_array']);
|
203 |
-
|
204 |
-
if (!empty($btn['option_a'])) {
|
205 |
-
array_push($mysecureop, $btn['option_a']);
|
206 |
-
}
|
207 |
-
|
208 |
-
if (!empty($btn['option_b'])) {
|
209 |
-
array_push($mysecureop, $btn['option_b']);
|
210 |
-
}
|
211 |
-
|
212 |
-
$uniqueThevalues = array_unique($mysecureop);
|
213 |
-
|
214 |
-
$options['buttons'][$i]['option_array'] = implode('||', $uniqueThevalues);
|
215 |
-
}
|
216 |
-
}
|
217 |
-
|
218 |
-
foreach ($options3['billing_buttons'] as $i => $btn) {
|
219 |
-
|
220 |
-
if (!empty($btn['check_1']) || !empty($btn['check_2'])) {
|
221 |
-
$options3['billing_buttons'][$i]['option_array'] = implode('||', array(wooccm_wpml_string($btn['check_1']), wooccm_wpml_string($btn['check_2'])));
|
222 |
-
$options3['billing_buttons'][$i]['check_1'] = '';
|
223 |
-
$options3['billing_buttons'][$i]['check_2'] = '';
|
224 |
-
}
|
225 |
-
|
226 |
-
$options3['billing_buttons'][$i]['type'] = ( $btn['type'] == 'checkbox' ) ? 'checkbox_wccm' : $btn['type'];
|
227 |
-
$options3['billing_buttons'][$i]['type'] = ( $btn['type'] == 'text' ) ? 'wooccmtext' : $btn['type'];
|
228 |
-
$options3['billing_buttons'][$i]['type'] = ( $btn['type'] == 'select' ) ? 'wooccmselect' : $btn['type'];
|
229 |
-
$options3['billing_buttons'][$i]['type'] = ( $btn['type'] == 'date' ) ? 'datepicker' : $btn['type'];
|
230 |
-
}
|
231 |
-
|
232 |
-
foreach ($options2['shipping_buttons'] as $i => $btn) {
|
233 |
-
|
234 |
-
if (!empty($btn['check_1']) || !empty($btn['check_2'])) {
|
235 |
-
$options2['shipping_buttons'][$i]['option_array'] = implode('||', array(wooccm_wpml_string($btn['check_1']), wooccm_wpml_string($btn['check_2'])));
|
236 |
-
$options2['shipping_buttons'][$i]['check_1'] = '';
|
237 |
-
$options2['shipping_buttons'][$i]['check_2'] = '';
|
238 |
-
}
|
239 |
-
|
240 |
-
$options2['shipping_buttons'][$i]['type'] = ( $btn['type'] == 'checkbox' ) ? 'checkbox_wccm' : $btn['type'];
|
241 |
-
$options2['shipping_buttons'][$i]['type'] = ( $btn['type'] == 'text' ) ? 'wooccmtext' : $btn['type'];
|
242 |
-
$options2['shipping_buttons'][$i]['type'] = ( $btn['type'] == 'select' ) ? 'wooccmselect' : $btn['type'];
|
243 |
-
$options2['shipping_buttons'][$i]['type'] = ( $btn['type'] == 'date' ) ? 'datepicker' : $btn['type'];
|
244 |
-
}*/
|
245 |
-
|
246 |
-
update_option('wccs_settings', $options);
|
247 |
-
//update_option('wccs_settings2', $options2);
|
248 |
-
//update_option('wccs_settings3', $options3);
|
249 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{new → includes}/model/class-wooccm-field-additional.php
RENAMED
@@ -2,11 +2,11 @@
|
|
2 |
|
3 |
if (!class_exists('WOOCCM_Field_Additional')) {
|
4 |
|
5 |
-
class WOOCCM_Field_Additional extends
|
6 |
|
7 |
-
|
8 |
protected $prefix = 'additional';
|
9 |
-
protected $option_name = '
|
10 |
|
11 |
public static function instance() {
|
12 |
if (is_null(self::$_instance)) {
|
2 |
|
3 |
if (!class_exists('WOOCCM_Field_Additional')) {
|
4 |
|
5 |
+
class WOOCCM_Field_Additional extends WOOCCM_Field {
|
6 |
|
7 |
+
protected static $_instance;
|
8 |
protected $prefix = 'additional';
|
9 |
+
protected $option_name = 'wooccm_additional';
|
10 |
|
11 |
public static function instance() {
|
12 |
if (is_null(self::$_instance)) {
|
{new → includes}/model/class-wooccm-field-billing.php
RENAMED
@@ -2,11 +2,12 @@
|
|
2 |
|
3 |
if (!class_exists('WOOCCM_Field_Billing')) {
|
4 |
|
5 |
-
class WOOCCM_Field_Billing extends
|
6 |
|
7 |
-
protected static $_instance;
|
|
|
8 |
protected $prefix = 'billing';
|
9 |
-
protected $option_name = '
|
10 |
protected $defaults = array(
|
11 |
'country',
|
12 |
'first_name',
|
2 |
|
3 |
if (!class_exists('WOOCCM_Field_Billing')) {
|
4 |
|
5 |
+
class WOOCCM_Field_Billing extends WOOCCM_Field {
|
6 |
|
7 |
+
protected static $_instance;
|
8 |
+
//protected $fields = array();
|
9 |
protected $prefix = 'billing';
|
10 |
+
protected $option_name = 'wooccm_billing';
|
11 |
protected $defaults = array(
|
12 |
'country',
|
13 |
'first_name',
|
{new → includes}/model/class-wooccm-field-shipping.php
RENAMED
@@ -2,11 +2,11 @@
|
|
2 |
|
3 |
if (!class_exists('WOOCCM_Field_Shipping')) {
|
4 |
|
5 |
-
class WOOCCM_Field_Shipping extends
|
6 |
|
7 |
protected static $_instance;
|
8 |
protected $prefix = 'shipping';
|
9 |
-
protected $option_name = '
|
10 |
protected $defaults = array(
|
11 |
'country',
|
12 |
'first_name',
|
2 |
|
3 |
if (!class_exists('WOOCCM_Field_Shipping')) {
|
4 |
|
5 |
+
class WOOCCM_Field_Shipping extends WOOCCM_Field {
|
6 |
|
7 |
protected static $_instance;
|
8 |
protected $prefix = 'shipping';
|
9 |
+
protected $option_name = 'wooccm_shipping';
|
10 |
protected $defaults = array(
|
11 |
'country',
|
12 |
'first_name',
|
includes/model/class-wooccm-field.php
ADDED
@@ -0,0 +1,466 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class WOOCCM_Field {
|
4 |
+
|
5 |
+
protected $fields = array();
|
6 |
+
protected $prefix = '';
|
7 |
+
protected $option_name = '';
|
8 |
+
protected $defaults = array();
|
9 |
+
|
10 |
+
protected function order_fields($a, $b) {
|
11 |
+
|
12 |
+
if (!isset($a['order']) || !isset($b['order']))
|
13 |
+
return 0;
|
14 |
+
|
15 |
+
if ($a['order'] == $b['order'])
|
16 |
+
return 0;
|
17 |
+
|
18 |
+
return ( $a['order'] < $b['order'] ) ? -1 : 1;
|
19 |
+
}
|
20 |
+
|
21 |
+
protected function duplicated_name($name, $fields) {
|
22 |
+
|
23 |
+
if (!empty($fields)) {
|
24 |
+
if (is_array($fields)) {
|
25 |
+
foreach ($fields as $item) {
|
26 |
+
if (isset($item['name']) && $item['name'] == $name) {
|
27 |
+
return true;
|
28 |
+
}
|
29 |
+
}
|
30 |
+
}
|
31 |
+
}
|
32 |
+
}
|
33 |
+
|
34 |
+
public function get_id($fields) {
|
35 |
+
return absint(key(array_slice($fields, -1, 1, true))) + 1;
|
36 |
+
}
|
37 |
+
|
38 |
+
public function get_name($field_id) {
|
39 |
+
return WOOCCM_PREFIX . $field_id;
|
40 |
+
}
|
41 |
+
|
42 |
+
public function get_key($prefix = '', $name) {
|
43 |
+
return sprintf("%s_%s", $prefix, $name);
|
44 |
+
}
|
45 |
+
|
46 |
+
public function get_conditional_types() {
|
47 |
+
|
48 |
+
$fields = self::get_types();
|
49 |
+
|
50 |
+
unset($fields['heading']);
|
51 |
+
unset($fields['button']);
|
52 |
+
|
53 |
+
return array_keys($fields);
|
54 |
+
}
|
55 |
+
|
56 |
+
public function get_option_types() {
|
57 |
+
|
58 |
+
return array(
|
59 |
+
'multicheckbox',
|
60 |
+
'multiselect',
|
61 |
+
'select',
|
62 |
+
'radio'
|
63 |
+
);
|
64 |
+
}
|
65 |
+
|
66 |
+
public function get_multiple_types() {
|
67 |
+
|
68 |
+
return array(
|
69 |
+
'multicheckbox',
|
70 |
+
'multiselect',
|
71 |
+
);
|
72 |
+
}
|
73 |
+
|
74 |
+
public function get_template_types() {
|
75 |
+
|
76 |
+
return array(
|
77 |
+
'heading',
|
78 |
+
'button',
|
79 |
+
'message',
|
80 |
+
'file',
|
81 |
+
'country',
|
82 |
+
'state'
|
83 |
+
);
|
84 |
+
}
|
85 |
+
|
86 |
+
public function get_types() {
|
87 |
+
|
88 |
+
return apply_filters('wooccm_fields_fields_types', array(
|
89 |
+
'heading' => 'Heading',
|
90 |
+
'text' => 'Text',
|
91 |
+
'textarea' => 'Textarea',
|
92 |
+
'password' => 'Password',
|
93 |
+
'select' => 'Select',
|
94 |
+
'radio' => 'Radio',
|
95 |
+
'checkbox' => 'Checkbox',
|
96 |
+
'country' => 'Country',
|
97 |
+
'state' => 'State',
|
98 |
+
'multiselect' => 'Multiselect',
|
99 |
+
'multicheckbox' => 'Multicheckbox',
|
100 |
+
'colorpicker' => 'Colorpicker',
|
101 |
+
'file' => 'File',
|
102 |
+
//'button' => 'Button',
|
103 |
+
//'datepicker' => 'Datepicker',
|
104 |
+
//'timepicker' => 'Timepicker',
|
105 |
+
));
|
106 |
+
}
|
107 |
+
|
108 |
+
function get_args() {
|
109 |
+
|
110 |
+
return array(
|
111 |
+
'id' => null,
|
112 |
+
'key' => '',
|
113 |
+
'name' => '',
|
114 |
+
'type' => 'text',
|
115 |
+
'disabled' => false,
|
116 |
+
'order' => null,
|
117 |
+
'priority' => null,
|
118 |
+
'label' => '',
|
119 |
+
'placeholder' => '',
|
120 |
+
'default' => '',
|
121 |
+
'position' => '',
|
122 |
+
'clear' => false,
|
123 |
+
'options' => array(
|
124 |
+
0 => array(
|
125 |
+
'label' => '',
|
126 |
+
'add_price_total' => 0,
|
127 |
+
'add_price_type' => 'fixed',
|
128 |
+
'add_price_tax' => 0,
|
129 |
+
'default' => ''
|
130 |
+
)
|
131 |
+
),
|
132 |
+
'required' => false,
|
133 |
+
'class' => array(),
|
134 |
+
// Display
|
135 |
+
// -------------------------------------------------------------------
|
136 |
+
'show_role' => array(),
|
137 |
+
'hide_role' => array(),
|
138 |
+
'more_product' => false,
|
139 |
+
'show_product' => array(),
|
140 |
+
'hide_product' => array(),
|
141 |
+
'show_product_cat' => array(),
|
142 |
+
'hide_product_cat' => array(),
|
143 |
+
// Timing
|
144 |
+
// -------------------------------------------------------------------
|
145 |
+
'time_limit_start' => null,
|
146 |
+
'time_limit_end' => null,
|
147 |
+
'time_limit_interval' => null,
|
148 |
+
'date_limit' => 'fixed',
|
149 |
+
'date_limit_variable_min' => 1,
|
150 |
+
'date_limit_variable_max' => 1,
|
151 |
+
'date_limit_fixed_min' => date('Y-m-d'),
|
152 |
+
'date_limit_fixed_max' => date('Y-m-d'),
|
153 |
+
// Price
|
154 |
+
// -------------------------------------------------------------------
|
155 |
+
'add_price' => false,
|
156 |
+
'add_price_name' => '',
|
157 |
+
'add_price_total' => null,
|
158 |
+
'add_price_type' => 'fixed',
|
159 |
+
'add_price_tax' => false,
|
160 |
+
'extra_class' => '',
|
161 |
+
// Conditional
|
162 |
+
// -------------------------------------------------------------------
|
163 |
+
'conditional' => false,
|
164 |
+
'conditional_parent_key' => '',
|
165 |
+
'conditional_parent_value' => '',
|
166 |
+
// State
|
167 |
+
// -------------------------------------------------------------------
|
168 |
+
'country' => '',
|
169 |
+
// Upload
|
170 |
+
// -------------------------------------------------------------------
|
171 |
+
'file_limit' => 1,
|
172 |
+
'file_types' => array(),
|
173 |
+
// Color
|
174 |
+
// -------------------------------------------------------------------
|
175 |
+
'pickertype' => '',
|
176 |
+
// Listing
|
177 |
+
// -------------------------------------------------------------------
|
178 |
+
'listable' => false,
|
179 |
+
'sortable' => false,
|
180 |
+
'filterable' => false,
|
181 |
+
);
|
182 |
+
}
|
183 |
+
|
184 |
+
public function sanitize_field_data($field_data) {
|
185 |
+
|
186 |
+
$args = $this->get_args();
|
187 |
+
|
188 |
+
foreach ($field_data as $key => $value) {
|
189 |
+
|
190 |
+
if (array_key_exists($key, $args)) {
|
191 |
+
|
192 |
+
$type = $args[$key];
|
193 |
+
|
194 |
+
if (is_null($type) && !is_numeric($value)) {
|
195 |
+
$field_data[$key] = (int) $value;
|
196 |
+
} elseif (is_bool($type) && !is_bool($value)) {
|
197 |
+
$field_data[$key] = ($value === 'true' || $value === '1' || $value === 1);
|
198 |
+
} elseif (is_string($type) && !is_string($value)) {
|
199 |
+
$field_data[$key] = strval($value);
|
200 |
+
} elseif (is_array($type) && !is_array($value)) {
|
201 |
+
$field_data[$key] = (array) $type;
|
202 |
+
}
|
203 |
+
} else {
|
204 |
+
unset($field_data[$key]);
|
205 |
+
}
|
206 |
+
}
|
207 |
+
|
208 |
+
return $field_data;
|
209 |
+
}
|
210 |
+
|
211 |
+
public function sanitize_field($field_id, $field, $fields) {
|
212 |
+
|
213 |
+
$field = wp_parse_args($field, $this->get_args());
|
214 |
+
|
215 |
+
$field['id'] = $field_id;
|
216 |
+
|
217 |
+
if (empty($field['name'])) {
|
218 |
+
|
219 |
+
$field['name'] = $this->get_name($field_id);
|
220 |
+
|
221 |
+
if ($this->duplicated_name($field['name'], $fields)) {
|
222 |
+
$field['name'] .= 'b';
|
223 |
+
}
|
224 |
+
}
|
225 |
+
|
226 |
+
$field['key'] = $this->get_key($this->prefix, $field['name']);
|
227 |
+
|
228 |
+
if (empty($field['position']) && is_array($field['class'])) {
|
229 |
+
if ($position = array_intersect((array) $field['class'], array('form-row-wide', 'form-row-first', 'form-row-last'))) {
|
230 |
+
$field['position'] = $position[0];
|
231 |
+
} else {
|
232 |
+
$field['position'] = 'form-row-wide';
|
233 |
+
}
|
234 |
+
}
|
235 |
+
|
236 |
+
if (empty($field['order'])) {
|
237 |
+
$field['order'] = $field_id + 1;
|
238 |
+
}
|
239 |
+
|
240 |
+
if (empty($field['order'])) {
|
241 |
+
$field['order'] = $field_id + 1;
|
242 |
+
}
|
243 |
+
|
244 |
+
|
245 |
+
if (!empty($field['conditional_parent_key'])) {
|
246 |
+
|
247 |
+
if (strpos($field['conditional_parent_key'], $this->prefix) === false) {
|
248 |
+
$field['conditional_parent_key'] = sprintf('%s_%s', $this->prefix, $field['conditional_parent_key']);
|
249 |
+
}
|
250 |
+
|
251 |
+
if ($field['conditional_parent_key'] == $field['key']) {
|
252 |
+
$field['conditional_parent_key'] = '';
|
253 |
+
}
|
254 |
+
|
255 |
+
}
|
256 |
+
|
257 |
+
return $field;
|
258 |
+
}
|
259 |
+
|
260 |
+
public function register_wpml_string($value) {
|
261 |
+
|
262 |
+
if (!empty($value) && function_exists('icl_register_string')) {
|
263 |
+
|
264 |
+
if (is_array($value)) {
|
265 |
+
|
266 |
+
foreach ($value as $key => $name) {
|
267 |
+
icl_register_string(WOOCCM_PLUGIN_NAME, $name, $name);
|
268 |
+
}
|
269 |
+
|
270 |
+
return $value;
|
271 |
+
}
|
272 |
+
|
273 |
+
if (is_string($value)) {
|
274 |
+
icl_register_string(WOOCCM_PLUGIN_NAME, $value, $value);
|
275 |
+
return $value;
|
276 |
+
}
|
277 |
+
}
|
278 |
+
|
279 |
+
return $value;
|
280 |
+
}
|
281 |
+
|
282 |
+
public function get_wpml_string($value) {
|
283 |
+
|
284 |
+
if (!empty($value) && function_exists('icl_t')) {
|
285 |
+
|
286 |
+
if (is_array($value)) {
|
287 |
+
|
288 |
+
foreach ($value as $key => $name) {
|
289 |
+
$value[$key] = icl_t(WOOCCM_PLUGIN_NAME, $name, $name);
|
290 |
+
}
|
291 |
+
}
|
292 |
+
|
293 |
+
if (is_string($value)) {
|
294 |
+
$value = icl_t(WOOCCM_PLUGIN_NAME, $value, $value);
|
295 |
+
}
|
296 |
+
}
|
297 |
+
|
298 |
+
return $value;
|
299 |
+
}
|
300 |
+
|
301 |
+
public function get_defaults() {
|
302 |
+
return $this->defaults;
|
303 |
+
}
|
304 |
+
|
305 |
+
public function get_default_fields() {
|
306 |
+
|
307 |
+
$fields = array();
|
308 |
+
|
309 |
+
if ($this->prefix !== 'additional') {
|
310 |
+
|
311 |
+
$prefix = sprintf('%s_', $this->prefix);
|
312 |
+
|
313 |
+
//$filters = WOOCCM_Fields_Register::instance();
|
314 |
+
//fix nesting level
|
315 |
+
//remove_filter('woocommerce_' . $prefix . 'fields', array($filters, 'add_' . $prefix . 'fields'));
|
316 |
+
remove_all_filters('woocommerce_' . $prefix . 'fields');
|
317 |
+
|
318 |
+
foreach (WC()->countries->get_address_fields('', $prefix) as $key => $field) {
|
319 |
+
|
320 |
+
$field['key'] = $key;
|
321 |
+
$field['name'] = str_replace($prefix, '', $key);
|
322 |
+
|
323 |
+
$fields[] = $field;
|
324 |
+
}
|
325 |
+
}
|
326 |
+
|
327 |
+
return $fields;
|
328 |
+
}
|
329 |
+
|
330 |
+
public function get_fields() {
|
331 |
+
// breakes re order after reload
|
332 |
+
// if (count($this->fields)) {
|
333 |
+
// return $this->fields;
|
334 |
+
// }
|
335 |
+
|
336 |
+
if ($fields = $this->get_option()) {
|
337 |
+
|
338 |
+
foreach ($fields as $field_id => $field) {
|
339 |
+
$this->fields[$field_id] = apply_filters('wooccm_checkout_field_filter', $this->sanitize_field($field_id, $field, $fields), $field_id);
|
340 |
+
}
|
341 |
+
|
342 |
+
// Resort the fields by order
|
343 |
+
uasort($this->fields, array(__CLASS__, 'order_fields'));
|
344 |
+
}
|
345 |
+
|
346 |
+
return apply_filters('wooccm_' . $this->prefix . '_fields', $this->fields);
|
347 |
+
}
|
348 |
+
|
349 |
+
public function update_fields($fields) {
|
350 |
+
|
351 |
+
if (is_array($fields)) {
|
352 |
+
|
353 |
+
foreach ($fields as $field_id => $field) {
|
354 |
+
if (!array_key_exists('name', $field)) {
|
355 |
+
return false;
|
356 |
+
}
|
357 |
+
}
|
358 |
+
|
359 |
+
if ($this->update_option($fields)) {
|
360 |
+
return $fields;
|
361 |
+
}
|
362 |
+
}
|
363 |
+
|
364 |
+
return false;
|
365 |
+
}
|
366 |
+
|
367 |
+
public function delete_fields() {
|
368 |
+
$this->delete_option();
|
369 |
+
}
|
370 |
+
|
371 |
+
// Field
|
372 |
+
// ---------------------------------------------------------------------------
|
373 |
+
|
374 |
+
public function get_field($field_id) {
|
375 |
+
|
376 |
+
if ($fields = $this->get_fields()) {
|
377 |
+
|
378 |
+
if (array_key_exists($field_id, $fields)) {
|
379 |
+
|
380 |
+
$field = $fields[$field_id];
|
381 |
+
|
382 |
+
return $this->sanitize_field($field_id, $field, $fields);
|
383 |
+
}
|
384 |
+
}
|
385 |
+
}
|
386 |
+
|
387 |
+
public function update_field($field_id, $field_data) {
|
388 |
+
|
389 |
+
$fields = $this->get_fields();
|
390 |
+
|
391 |
+
if (array_key_exists($field_id, $fields)) {
|
392 |
+
|
393 |
+
$field_data = $this->sanitize_field_data($field_data);
|
394 |
+
|
395 |
+
$fields[$field_id] = array_replace($fields[$field_id], $field_data);
|
396 |
+
|
397 |
+
if ($this->update_fields($fields)) {
|
398 |
+
return $fields[$field_id];
|
399 |
+
}
|
400 |
+
}
|
401 |
+
|
402 |
+
return false;
|
403 |
+
}
|
404 |
+
|
405 |
+
public function add_field($field_data) {
|
406 |
+
|
407 |
+
$fields = $this->get_fields();
|
408 |
+
|
409 |
+
$field_id = $this->get_id($fields);
|
410 |
+
|
411 |
+
$field_data = $this->sanitize_field_data($field_data);
|
412 |
+
|
413 |
+
$field_data = $this->sanitize_field($field_id, $field_data, $fields);
|
414 |
+
|
415 |
+
$field_data = wp_parse_args($field_data, $this->get_args());
|
416 |
+
|
417 |
+
$fields[] = $field_data;
|
418 |
+
|
419 |
+
if ($this->update_fields($fields)) {
|
420 |
+
return $field_data;
|
421 |
+
}
|
422 |
+
|
423 |
+
return false;
|
424 |
+
}
|
425 |
+
|
426 |
+
public function delete_field($field_id) {
|
427 |
+
|
428 |
+
$fields = $this->get_fields();
|
429 |
+
|
430 |
+
unset($fields[$field_id]);
|
431 |
+
|
432 |
+
if ($this->update_fields($fields)) {
|
433 |
+
return true;
|
434 |
+
}
|
435 |
+
|
436 |
+
return false;
|
437 |
+
}
|
438 |
+
|
439 |
+
// Core
|
440 |
+
// -------------------------------------------------------------------------
|
441 |
+
|
442 |
+
protected function get_option($defaults = array()) {
|
443 |
+
|
444 |
+
if ($fields = get_option($this->option_name, false)) {
|
445 |
+
return $fields;
|
446 |
+
}
|
447 |
+
|
448 |
+
return $this->get_default_fields();
|
449 |
+
}
|
450 |
+
|
451 |
+
protected function update_option($fields) {
|
452 |
+
|
453 |
+
update_option($this->option_name, $fields);
|
454 |
+
|
455 |
+
return true;
|
456 |
+
}
|
457 |
+
|
458 |
+
protected function delete_option() {
|
459 |
+
|
460 |
+
delete_option($this->option_name);
|
461 |
+
add_option($this->option_name);
|
462 |
+
|
463 |
+
return false;
|
464 |
+
}
|
465 |
+
|
466 |
+
}
|
includes/templates/admin/clean/woocheckout-billing-clone.php
DELETED
@@ -1,159 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* WooCommerce Checkout Manager
|
4 |
-
*
|
5 |
-
*/
|
6 |
-
|
7 |
-
// Exit if accessed directly
|
8 |
-
if ( !defined( 'ABSPATH' ) )
|
9 |
-
exit;
|
10 |
-
?>
|
11 |
-
|
12 |
-
<td style="display:none;text-align:center;" class="more_toggler1c"><input type="checkbox" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][more_content]" title="<?php esc_attr_e( 'More than two content', 'woocommerce-checkout-manager' ); ?>" value="" /></td>
|
13 |
-
|
14 |
-
<td style="display:none;" class="more_toggler1c"><input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][single_p]" placeholder="<?php _e('Product ID(s) e.g 1674||1233','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'Hide field from this Products Only', 'woocommerce-checkout-manager' ); ?>" value="" /></td>
|
15 |
-
|
16 |
-
<td style="display:none;" class="more_toggler1c"><input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][single_px]" placeholder="<?php _e('Product ID(s) e.g 1674||1233','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'Display Field for these Products Only', 'woocommerce-checkout-manager' ); ?>" value="" /></td>
|
17 |
-
|
18 |
-
<td style="display:none;" class="more_toggler1c"><input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][single_p_cat]" placeholder="<?php _e('Category Slug(s) e.g my-cat||my-cat2','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'Hide field from Category', 'woocommerce-checkout-manager' ); ?>" value="" /></td>
|
19 |
-
|
20 |
-
<td style="display:none;" class="more_toggler1c"><input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][single_px_cat]" placeholder="<?php _e('Category Slug(s) e.g my-cat||my-cat2','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'Show Field for Category', 'woocommerce-checkout-manager' ); ?>" value="" /></td>
|
21 |
-
|
22 |
-
<td style="display:none;" class="hide_stuff_time"><input type="text" placeholder="6" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][start_hour]" value="" /></td>
|
23 |
-
|
24 |
-
<td style="display:none;" class="hide_stuff_time"><input type="text" placeholder="9" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][end_hour]" value="" /></td>
|
25 |
-
|
26 |
-
<td style="display:none;" class="hide_stuff_time"><input type="text" placeholder="15" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][interval_min]" value="" /></td>
|
27 |
-
|
28 |
-
<td style="display:none;" class="hide_stuff_time"><input type="text" placeholder="0, 10, 20, 30, 40" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][manual_min]" value="" /></td>
|
29 |
-
|
30 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days"><input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][format_date]" placeholder="dd-mm-yy" title="dd-mm-yy" value="" /></td>
|
31 |
-
|
32 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days"><input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][min_before]" placeholder="+3" title="Days Before" value="" /></td>
|
33 |
-
|
34 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days"><input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][max_after]" placeholder="3" title="Days After" value="" /></td>
|
35 |
-
|
36 |
-
<td style="display:none;text-align:center;" class="hide_stuff_color daoo"><input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][days_disabler]" type="checkbox" value="" /></td>
|
37 |
-
|
38 |
-
<td style="display:none;text-align:center;" class="hide_stuff_days"><input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][days_disabler0]" type="checkbox" value="" /></td>
|
39 |
-
|
40 |
-
<td style="display:none;text-align:center;" class="hide_stuff_days"><input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][days_disabler1]" type="checkbox" value="" /></td>
|
41 |
-
|
42 |
-
<td style="display:none;text-align:center;" class="hide_stuff_days"><input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][days_disabler2]" type="checkbox" value="" /></td>
|
43 |
-
|
44 |
-
<td style="display:none;text-align:center;" class="hide_stuff_days"><input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][days_disabler3]" type="checkbox" value="" /></td>
|
45 |
-
|
46 |
-
<td style="display:none;text-align:center;" class="hide_stuff_days"><input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][days_disabler4]" type="checkbox" value="" /></td>
|
47 |
-
|
48 |
-
<td style="display:none;text-align:center;" class="hide_stuff_days"><input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][days_disabler5]" type="checkbox" value="" /></td>
|
49 |
-
|
50 |
-
<td style="display:none;text-align:center;" class="hide_stuff_days"><input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][days_disabler6]" type="checkbox" value="" /></td>
|
51 |
-
|
52 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days" title="<?php esc_attr_e( 'Min Date', 'woocommerce-checkout-manager' ); ?>"><span class="spongagge"><?php _e( 'Min Date', 'woocommerce-checkout-manager' ); ?></span></td>
|
53 |
-
|
54 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days"><input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][single_yy]" placeholder="<?php _e('2013','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'yy', 'woocommerce-checkout-manager' ); ?>" value="" /></td>
|
55 |
-
|
56 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days"><input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][single_mm]" placeholder="<?php _e('10','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'mm', 'woocommerce-checkout-manager' ); ?>" value="" /></td>
|
57 |
-
|
58 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days"><input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][single_dd]" placeholder="<?php _e('25','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'dd', 'woocommerce-checkout-manager' ); ?>" value="" /></td>
|
59 |
-
|
60 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days" title="<?php esc_attr_e( 'Max Date', 'woocommerce-checkout-manager' ); ?>"><span class="spongagge"><?php _e( 'Max Date', 'woocommerce-checkout-manager' ); ?></span></td>
|
61 |
-
|
62 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days"><input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][single_max_yy]" placeholder="<?php _e('2013','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'yy', 'woocommerce-checkout-manager' ); ?>" value="" /></td>
|
63 |
-
|
64 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days"><input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][single_max_mm]" placeholder="<?php _e('10','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'mm', 'woocommerce-checkout-manager' ); ?>" value="" /></td>
|
65 |
-
|
66 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days"><input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][single_max_dd]" placeholder="<?php _e('25','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'dd', 'woocommerce-checkout-manager' ); ?>" value="" /></td>
|
67 |
-
|
68 |
-
<td class="more_toggler1" style="text-align:center;"><input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][checkbox]" type="checkbox" title="<?php esc_attr_e( 'Add/Remove Required Attribute', 'woocommerce-checkout-manager' ); ?>" value="" /></td>
|
69 |
-
|
70 |
-
<td class="more_toggler1" style="text-align:center;">
|
71 |
-
<select name="wccs_settings3[billing_buttons][<?php echo $i; ?>][position]" > <!--Call run() function-->
|
72 |
-
<option value="form-row-wide" ><?php _e( 'Wide','woocommerce-checkout-manager' ); ?></option>
|
73 |
-
<option value="form-row-first" ><?php _e( 'Left','woocommerce-checkout-manager' ); ?></option>
|
74 |
-
<option value="form-row-last" ><?php _e( 'Right','woocommerce-checkout-manager' ); ?></option>
|
75 |
-
</select>
|
76 |
-
</td>
|
77 |
-
|
78 |
-
<td class="more_toggler1" style="text-align:center;"><input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][clear_row]" type="checkbox" title="<?php esc_attr_e( 'Clear Row', 'woocommerce-checkout-manager' ); ?>" value=" " /></td>
|
79 |
-
|
80 |
-
<td class="filter_field" style="display:none;text-align:center;"><input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][deny_checkout]" type="checkbox" title="<?php esc_attr_e( 'Deny Checkout', 'woocommerce-checkout-manager' ); ?>" value=" " /></td>
|
81 |
-
|
82 |
-
<td class="filter_field_tog add_amount_field condition_tick hide_stuff_time hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c" style="display:none;"><?php _e('Filter Toggler', 'woocommerce-checkout-manager' ); ?></td>
|
83 |
-
|
84 |
-
<td class="filter_field" style="display:none;text-align:center;"><input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][tax_remove]" type="checkbox" title="<?php esc_attr_e( 'Remove tax', 'woocommerce-checkout-manager' ); ?>" value=" " /></td>
|
85 |
-
|
86 |
-
<td class="filter_field" style="display:none;text-align:center;"><input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][deny_receipt]" type="checkbox" title="<?php esc_attr_e( 'Deny Receipt', 'woocommerce-checkout-manager' ); ?>" value=" " /></td>
|
87 |
-
<!--
|
88 |
-
<td class="filter_field condition_tick hide_stuff_change hide_stuff_time hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c" style="display:none;text-align:center;"><input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][add_amount]" type="checkbox" title="<?php esc_attr_e( 'Add Amount', 'woocommerce-checkout-manager' ); ?>" value=" " /></td>
|
89 |
-
-->
|
90 |
-
<td class="add_amount_field" style="display:none;text-align:center;"><input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][fee_name]" type="text" title="<?php esc_attr_e( 'Amount Name', 'woocommerce-checkout-manager' ); ?>" value="" placeholder="<?php _e('My Custom Charge','woocommerce-checkout-manager'); ?>" /></td>
|
91 |
-
|
92 |
-
<td class="add_amount_field" style="display:none;text-align:center;"><input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][add_amount_field]" type="text" title="<?php esc_attr_e( 'Add Amount Field', 'woocommerce-checkout-manager' ); ?>" value="" placeholder="50" /></td>
|
93 |
-
|
94 |
-
<td class="filter_field add_amount_field hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_time hide_stuff_color more_toggler1 more_toggler1c" style="display:none;text-align:center;"><input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][conditional_parent_use]" type="checkbox" title="<?php esc_attr_e( 'Conditional Field On', 'woocommerce-checkout-manager' ); ?>" value=" " /></td>
|
95 |
-
|
96 |
-
<td class="condition_tick" style="display:none;text-align:center;"><input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][conditional_parent]" type="checkbox" title="<?php esc_attr_e( 'Conditional Parent', 'woocommerce-checkout-manager' ); ?>" value=" " /></td>
|
97 |
-
|
98 |
-
<td class="more_toggler1"><input placeholder="<?php _e('My Field Name','woocommerce-checkout-manager'); ?>" type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][label]" title="<?php esc_attr_e( 'Label of the New Field', 'woocommerce-checkout-manager' ); ?>" value="" /></td>
|
99 |
-
|
100 |
-
<td class="more_toggler1"><input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][placeholder]" placeholder="<?php _e('Example red','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'Placeholder - Preview of Data to Input', 'woocommerce-checkout-manager' ); ?>" value="" /></td>
|
101 |
-
|
102 |
-
<td style="display:none;" class="filter_field add_amount_field hide_stuff_time hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c condition_tick add_amount_field"><input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][chosen_valt]" placeholder="<?php _e('Yes','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'Chosen value for conditional', 'woocommerce-checkout-manager' ); ?>" value="" /></td>
|
103 |
-
|
104 |
-
<td style="display:none;" class="condition_tick"><input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][conditional_tie]" placeholder="<?php _e('Parent Abbr. Name','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'Parent Abbr. Name', 'woocommerce-checkout-manager' ); ?>" value="" /></td>
|
105 |
-
|
106 |
-
<td style="display:none;" class="filter_field"><input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][colorpickerd]" id="billing-colorpic<?php echo $i; ?>" title="<?php esc_attr_e( 'Default Color', 'woocommerce-checkout-manager' ); ?>" value="#000000" /></td>
|
107 |
-
|
108 |
-
<td style="display:none;" class="filter_field">
|
109 |
-
<select name="wccs_settings3[billing_buttons][<?php echo $i; ?>][colorpickertype]" > <!--Call run() function-->
|
110 |
-
<option value="farbtastic" ><?php _e('Farbtastic','woocommerce-checkout-manager'); ?></option>
|
111 |
-
<option value="iris" ><?php _e('Iris','woocommerce-checkout-manager'); ?></option>
|
112 |
-
</select>
|
113 |
-
</td>
|
114 |
-
|
115 |
-
<td style="display:none;text-align:center;" class="filter_field"><input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][user_role]" type="checkbox" value="" /></td>
|
116 |
-
|
117 |
-
<td class="filter_field" style="display:none;"><input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][role_options]" placeholder="Option 1||Option 2||Option 3" value="" /></td>
|
118 |
-
|
119 |
-
<td class="filter_field" style="display:none;"><input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][role_options2]" placeholder="Option 1||Option 2||Option 3" value="" /></td>
|
120 |
-
|
121 |
-
<td style="display:none;" class="filter_field add_amount_field hide_stuff_change hide_stuff_time hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c condition_tick add_amount_field"><input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][extra_class]" value="" /></td>
|
122 |
-
|
123 |
-
<td style="display:none;text-align:center;" class="hide_stuff_op wccm1"><input type="checkbox" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][fancy]" title="<?php esc_attr_e( 'Adapt to woocommerce style', 'woocommerce-checkout-manager' ); ?>" value="" /></td>
|
124 |
-
|
125 |
-
<td class="hide_stuff_op wccm1" style="display:none;"><input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][force_title2]" value="" placeholder="<?php _e('Name Guide','woocommerce-checkout-manager'); ?>" /></td>
|
126 |
-
|
127 |
-
<td class="hide_stuff_op wccm1" style="display:none;"><input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][option_array]" value="" placeholder="Option 1||Option 2||Option 3" /></td>
|
128 |
-
|
129 |
-
<td class="filter_field add_amount_field hide_stuff_time condition_tick hide_stuff_change hide_stuff_opcheck hide_stuff_color more_toggler1 more_toggler1c" style="display:none;"><?php _e('Options Toggler', 'woocommerce-checkout-manager' ); ?></td>
|
130 |
-
<!--
|
131 |
-
<td class="filter_field add_amount_field condition_tick hide_stuff_change hide_stuff_timef hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c" style="display:none;"><?php _e('Time Toggler', 'woocommerce-checkout-manager' ); ?></td>
|
132 |
-
|
133 |
-
<td class="filter_field add_amount_field hide_stuff_time condition_tick hide_stuff_change hide_stuff_opcheck hide_stuff_op more_toggler1 more_toggler1c hide_stuff_days" style="display:none;"><?php _e('Date Toggler', 'woocommerce-checkout-manager' ); ?></td>
|
134 |
-
-->
|
135 |
-
<td style="display:none;" class="filter_field add_amount_field hide_stuff_time condition_tick hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1"><?php _e('Hidden Toggler', 'woocommerce-checkout-manager' ); ?></td>
|
136 |
-
|
137 |
-
<td class="filter_field add_amount_field condition_tick hide_stuff_time hide_stuff_change hide_stuff_opcheck hide_stuff_color hide_stuff_op more_toggler more_toggler1c"><?php _e('More Toggler', 'woocommerce-checkout-manager' ); ?></td>
|
138 |
-
|
139 |
-
<td class="more_toggler1">
|
140 |
-
<select name="wccs_settings3[billing_buttons][<?php echo $i; ?>][type]" > <!--Call run() function-->
|
141 |
-
<option value="wooccmtext" ><?php _e('Text Input','woocommerce-checkout-manager'); ?></option>
|
142 |
-
<option value="wooccmtextarea" ><?php _e('Textarea','woocommerce-checkout-manager'); ?></option>
|
143 |
-
<option value="wooccmpassword" ><?php _e('Password','woocommerce-checkout-manager'); ?></option>
|
144 |
-
<option value="wooccmradio" ><?php _e('Radio Buttons','woocommerce-checkout-manager'); ?></option>
|
145 |
-
<option value="checkbox_wccm" ><?php _e('Check Box','woocommerce-checkout-manager'); ?></option>
|
146 |
-
<option value="wooccmselect" ><?php _e('Select Options','woocommerce-checkout-manager'); ?></option>
|
147 |
-
<!--<option value="datepicker" ><?php _e('Date Picker','woocommerce-checkout-manager'); ?></option>
|
148 |
-
<option value="time" ><?php _e('Time Picker','woocommerce-checkout-manager'); ?></option>-->
|
149 |
-
<option value="colorpicker" ><?php _e('Color Picker','woocommerce-checkout-manager'); ?></option>
|
150 |
-
<option value="heading" ><?php _e('Heading','woocommerce-checkout-manager'); ?></option>
|
151 |
-
<option value="multiselect" ><?php _e('Multi-Select','woocommerce-checkout-manager'); ?></option>
|
152 |
-
<option value="multicheckbox" ><?php _e('Multi-Checkbox','woocommerce-checkout-manager'); ?></option>
|
153 |
-
<option value="wooccmcountry" ><?php _e('Country','woocommerce-checkout-manager'); ?></option>
|
154 |
-
<option value="wooccmstate" ><?php _e('State','woocommerce-checkout-manager'); ?></option>
|
155 |
-
<option value="wooccmupload"><?php _e('File Picker','woocommerce-checkout-manager'); ?></option>
|
156 |
-
</select>
|
157 |
-
</td>
|
158 |
-
|
159 |
-
<td class="more_toggler1"><input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][cow]" placeholder="MyField" title="<?php esc_attr_e( 'Abbreviation (No spaces)', 'woocommerce-checkout-manager' ); ?>" value="" <?php if ( empty($options['checkness']['abbreviation'])) { echo 'readonly="readonly"'; } ?> /></td>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/templates/admin/clean/woocheckout-billing-tbody.php
DELETED
@@ -1,273 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* WooCommerce Checkout Manager
|
4 |
-
*
|
5 |
-
*/
|
6 |
-
|
7 |
-
// Exit if accessed directly
|
8 |
-
if ( !defined( 'ABSPATH' ) ) exit;
|
9 |
-
?>
|
10 |
-
|
11 |
-
<td style="display:none; text-align:center;" class="more_toggler1c">
|
12 |
-
<input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][more_content]" type="checkbox" value="1" <?php if ( !empty ($field['more_content'])) echo "checked='checked'"; ?> />
|
13 |
-
</td>
|
14 |
-
|
15 |
-
<td style="display:none;" class="more_toggler1c">
|
16 |
-
<input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][single_p]" placeholder="<?php _e('Product ID(s) e.g 1674||1233','woocommerce-checkout-manager'); ?>" value="<?php echo ( !empty( $field['single_p'] ) ? $field['single_p'] : '' ); ?>" />
|
17 |
-
</td>
|
18 |
-
|
19 |
-
<td style="display:none;" class="more_toggler1c">
|
20 |
-
<input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][single_px]" placeholder="<?php _e('Product ID(s) e.g 1674||1233','woocommerce-checkout-manager'); ?>" value="<?php echo ( !empty( $field['single_px'] ) ? $field['single_px'] : '' ); ?>" />
|
21 |
-
</td>
|
22 |
-
|
23 |
-
<td style="display:none;" class="more_toggler1c">
|
24 |
-
<input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][single_p_cat]" placeholder="<?php _e('Category Slug(s) e.g my-cat||my-cat2','woocommerce-checkout-manager'); ?>" value="<?php echo ( !empty( $field['single_p_cat'] ) ? $field['single_p_cat'] : '' ); ?>" />
|
25 |
-
</td>
|
26 |
-
|
27 |
-
<td style="display:none;" class="more_toggler1c">
|
28 |
-
<input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][single_px_cat]" placeholder="<?php _e('Category Slug(s) e.g my-cat||my-cat2','woocommerce-checkout-manager'); ?>" value="<?php echo ( !empty( $field['single_px_cat'] ) ? $field['single_px_cat'] : '' ); ?>" />
|
29 |
-
</td>
|
30 |
-
|
31 |
-
<td style="display:none;" class="hide_stuff_time">
|
32 |
-
<input type="text" placeholder="6" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][start_hour]" value="<?php echo ( !empty( $field['start_hour'] ) ? $field['start_hour'] : '' ); ?>" />
|
33 |
-
</td>
|
34 |
-
|
35 |
-
<td style="display:none;" class="hide_stuff_time">
|
36 |
-
<input type="text" placeholder="9" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][end_hour]" value="<?php echo ( !empty( $field['end_hour'] ) ? $field['end_hour'] : '' ); ?>" />
|
37 |
-
</td>
|
38 |
-
|
39 |
-
<td style="display:none;" class="hide_stuff_time">
|
40 |
-
<input type="text" placeholder="15" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][interval_min]" value="<?php echo ( !empty( $field['interval_min'] ) ? $field['interval_min'] : '' ); ?>" />
|
41 |
-
</td>
|
42 |
-
|
43 |
-
<td style="display:none;" class="hide_stuff_time">
|
44 |
-
<input type="text" placeholder="0, 10, 20, 30, 40" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][manual_min]" value="<?php echo ( !empty( $field['manual_min'] ) ? $field['manual_min'] : '' ); ?>" />
|
45 |
-
</td>
|
46 |
-
|
47 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days">
|
48 |
-
<input type="text" placeholder="dd-mm-yy" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][format_date]" value="<?php echo ( !empty( $field['format_date'] ) ? $field['format_date'] : '' ); ?>" />
|
49 |
-
</td>
|
50 |
-
|
51 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days">
|
52 |
-
<input type="text" placeholder="+3" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][min_before]" value="<?php echo ( !empty( $field['min_before'] ) ? $field['min_before'] : '' ); ?>" />
|
53 |
-
</td>
|
54 |
-
|
55 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days">
|
56 |
-
<input type="text" placeholder="3" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][max_after]" value="<?php echo ( !empty( $field['max_after'] ) ? $field['max_after'] : '' ); ?>" />
|
57 |
-
</td>
|
58 |
-
|
59 |
-
<td style="display:none; text-align:center;" class="hide_stuff_color daoo">
|
60 |
-
<input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][days_disabler]" type="checkbox" value="true" <?php if ( !empty ($field['days_disabler'])) echo "checked='checked'"; ?> />
|
61 |
-
</td>
|
62 |
-
|
63 |
-
<td style="display:none; text-align:center;" class="hide_stuff_days">
|
64 |
-
<input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][days_disabler0]" type="checkbox" value="1" <?php if ( !empty ($field['days_disabler0'])) echo "checked='checked'"; ?> />
|
65 |
-
</td>
|
66 |
-
|
67 |
-
<td style="display:none; text-align:center;" class="hide_stuff_days">
|
68 |
-
<input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][days_disabler1]" type="checkbox" value="1" <?php if ( !empty ($field['days_disabler1'])) echo "checked='checked'"; ?> />
|
69 |
-
</td>
|
70 |
-
|
71 |
-
<td style="display:none; text-align:center;" class="hide_stuff_days">
|
72 |
-
<input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][days_disabler2]" type="checkbox" value="1" <?php if ( !empty ($field['days_disabler2'])) echo "checked='checked'"; ?> />
|
73 |
-
</td>
|
74 |
-
|
75 |
-
<td style="display:none; text-align:center;" class="hide_stuff_days">
|
76 |
-
<input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][days_disabler3]" type="checkbox" value="1" <?php if ( !empty ($field['days_disabler3'])) echo "checked='checked'"; ?> />
|
77 |
-
</td>
|
78 |
-
|
79 |
-
<td style="display:none; text-align:center;" class="hide_stuff_days">
|
80 |
-
<input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][days_disabler4]" type="checkbox" value="1" <?php if ( !empty ($field['days_disabler4'])) echo "checked='checked'"; ?> />
|
81 |
-
</td>
|
82 |
-
|
83 |
-
<td style="display:none; text-align:center;" class="hide_stuff_days">
|
84 |
-
<input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][days_disabler5]" type="checkbox" value="1" <?php if ( !empty ($field['days_disabler5'])) echo "checked='checked'"; ?> />
|
85 |
-
</td>
|
86 |
-
|
87 |
-
<td style="display:none; text-align:center;" class="hide_stuff_days">
|
88 |
-
<input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][days_disabler6]" type="checkbox" value="1" <?php if ( !empty ($field['days_disabler6'])) echo "checked='checked'"; ?> />
|
89 |
-
</td>
|
90 |
-
|
91 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days">
|
92 |
-
<span class="spongagge"><?php _e( 'Min Date', 'woocommerce-checkout-manager' ); ?></span>
|
93 |
-
</td>
|
94 |
-
|
95 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days">
|
96 |
-
<input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][single_yy]" placeholder="<?php _e('2013','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'yy', 'woocommerce-checkout-manager' ); ?>" value="<?php echo ( !empty( $field['single_yy'] ) ? $field['single_yy'] : '' ); ?>" />
|
97 |
-
</td>
|
98 |
-
|
99 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days">
|
100 |
-
<input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][single_mm]" placeholder="<?php _e('10','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'mm', 'woocommerce-checkout-manager' ); ?>" value="<?php echo ( !empty( $field['single_mm'] ) ? $field['single_mm'] : '' ); ?>" />
|
101 |
-
</td>
|
102 |
-
|
103 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days">
|
104 |
-
<input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][single_dd]" placeholder="<?php _e('25','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'dd', 'woocommerce-checkout-manager' ); ?>" value="<?php echo ( !empty( $field['single_dd'] ) ? $field['single_dd'] : '' ); ?>" />
|
105 |
-
</td>
|
106 |
-
|
107 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days">
|
108 |
-
<span class="spongagge"><?php _e( 'Max Date', 'woocommerce-checkout-manager' ); ?></span>
|
109 |
-
</td>
|
110 |
-
|
111 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days">
|
112 |
-
<input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][single_max_yy]" placeholder="<?php _e('2013','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'yy', 'woocommerce-checkout-manager' ); ?>" value="<?php echo ( !empty( $field['single_max_yy'] ) ? $field['single_max_yy'] : '' ); ?>" />
|
113 |
-
</td>
|
114 |
-
|
115 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days">
|
116 |
-
<input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][single_max_mm]" placeholder="<?php _e('10','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'mm', 'woocommerce-checkout-manager' ); ?>" value="<?php echo ( !empty( $field['single_max_mm'] ) ? $field['single_max_mm'] : '' ); ?>" />
|
117 |
-
</td>
|
118 |
-
|
119 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days">
|
120 |
-
<input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][single_max_dd]" placeholder="<?php _e('25','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'dd', 'woocommerce-checkout-manager' ); ?>" value="<?php echo ( !empty( $field['single_max_dd'] ) ? $field['single_max_dd'] : '' ); ?>" />
|
121 |
-
</td>
|
122 |
-
|
123 |
-
<td class="more_toggler1" style="text-align:center;">
|
124 |
-
<input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][checkbox]" type="checkbox" title="<?php _e( 'Whether or not the Checkout field is required', 'woocommerce-checkout-manager' ); ?>" value="true" <?php if ( !empty( $field['checkbox'] ) ) echo "checked='checked'"; ?> />
|
125 |
-
</td>
|
126 |
-
|
127 |
-
<td class="more_toggler1" style="text-align:center;">
|
128 |
-
<select name="wccs_settings3[billing_buttons][<?php echo $i; ?>][position]" title="<?php _e( 'Placement of the Checkout field', 'woocommerce-checkout-manager' ); ?>"> <!--Call run() function-->
|
129 |
-
<option value="form-row-wide" <?php ( !isset( $field['position'] ) ) ? '' : selected( $field['position'], 'form-row-wide' ); ?>><?php _e( 'Wide','woocommerce-checkout-manager' ); ?></option>
|
130 |
-
<option value="form-row-first" <?php ( !isset( $field['position'] ) ) ? '' : selected( $field['position'], 'form-row-first' ); ?>><?php _e( 'Left','woocommerce-checkout-manager' ); ?></option>
|
131 |
-
<option value="form-row-last" <?php ( !isset( $field['position'] ) ) ? '' : selected( $field['position'], 'form-row-last' ); ?>><?php _e( 'Right','woocommerce-checkout-manager' ); ?></option>
|
132 |
-
</select>
|
133 |
-
</td>
|
134 |
-
|
135 |
-
<td class="more_toggler1" style="text-align:center;">
|
136 |
-
<input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][clear_row]" type="checkbox" title="<?php _e( 'Applies a clear fix to the Checkout field', 'woocommerce-checkout-manager' ); ?>" value="true" <?php if ( !empty( $field['clear_row'] ) ) echo "checked='checked'"; ?> />
|
137 |
-
</td>
|
138 |
-
|
139 |
-
<td class="filter_field" style="display:none;text-align:center;">
|
140 |
-
<input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][deny_checkout]" type="checkbox" value="true" <?php if( !empty( $field['deny_checkout'] ) ) echo "checked='checked'"; ?> />
|
141 |
-
</td>
|
142 |
-
|
143 |
-
<td class="filter_field_tog add_amount_field condition_tick hide_stuff_time hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c" style="display:none;">
|
144 |
-
<?php _e('Filter Toggler', 'woocommerce-checkout-manager' ); ?>
|
145 |
-
</td>
|
146 |
-
|
147 |
-
<td class="filter_field" style="display:none;text-align:center;">
|
148 |
-
<input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][tax_remove]" type="checkbox" value="true" <?php if ( !empty ($field['tax_remove'])) echo "checked='checked'"; ?> />
|
149 |
-
</td>
|
150 |
-
|
151 |
-
<td class="filter_field" style="display:none;text-align:center;">
|
152 |
-
<input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][deny_receipt]" type="checkbox" value="true" <?php if ( !empty ($field['deny_receipt'])) echo "checked='checked'"; ?> />
|
153 |
-
</td>
|
154 |
-
<!--
|
155 |
-
<td class="filter_field condition_tick hide_stuff_change hide_stuff_time hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c" style="display:none;text-align:center;">
|
156 |
-
<input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][add_amount]" type="checkbox" value="true" <?php if ( !empty ($field['add_amount'])) echo "checked='checked'"; ?> />
|
157 |
-
</td>
|
158 |
-
-->
|
159 |
-
<td class="add_amount_field" style="display:none;text-align:center;">
|
160 |
-
<input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][fee_name]" type="text" value="<?php echo ( !empty( $field['fee_name'] ) ? $field['fee_name'] : '' ); ?>" placeholder="<?php _e('My Custom Charge','woocommerce-checkout-manager'); ?>" />
|
161 |
-
</td>
|
162 |
-
|
163 |
-
<td class="add_amount_field" style="display:none;text-align:center;">
|
164 |
-
<input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][add_amount_field]" type="text" value="<?php echo ( !empty( $field['add_amount_field'] ) ? $field['add_amount_field'] : '' ); ?>" placeholder="50" />
|
165 |
-
</td>
|
166 |
-
|
167 |
-
<td class="filter_field add_amount_field hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_time hide_stuff_color more_toggler1 more_toggler1c" style="display:none;text-align:center;">
|
168 |
-
<input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][conditional_parent_use]" type="checkbox" value="true" <?php if ( !empty ($field['conditional_parent_use'])) echo "checked='checked'"; ?> />
|
169 |
-
</td>
|
170 |
-
|
171 |
-
<td class="condition_tick" style="display:none;text-align:center;">
|
172 |
-
<input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][conditional_parent]" type="checkbox" value="true" <?php if ( !empty ($field['conditional_parent'])) echo "checked='checked'"; ?> />
|
173 |
-
</td>
|
174 |
-
|
175 |
-
<td class="more_toggler1">
|
176 |
-
<input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][label]" title="<?php _e( 'Label text for the Checkout field', 'woocommerce-checkout-manager' ); ?>" placeholder="<?php _e('My Field Name','woocommerce-checkout-manager'); ?>" value="<?php echo esc_attr( $field['label'] ); ?>" />
|
177 |
-
</td>
|
178 |
-
|
179 |
-
<td class="more_toggler1">
|
180 |
-
<input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][placeholder]" title="<?php _e( 'Placeholder text for the Checkout field', 'woocommerce-checkout-manager' ); ?>" placeholder="<?php _e('Example red','woocommerce-checkout-manager'); ?>" value="<?php echo ( !empty( $field['placeholder'] ) ? $field['placeholder'] : '' ); ?>" <?php if( $field['cow'] == 'country' || $field['cow'] == 'state' ) { echo 'readonly="readonly"'; } ?> />
|
181 |
-
</td>
|
182 |
-
|
183 |
-
<td style="display:none;" class="filter_field add_amount_field hide_stuff_time hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c condition_tick add_amount_field">
|
184 |
-
<input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][chosen_valt]" placeholder="<?php _e('Yes','woocommerce-checkout-manager'); ?>" value="<?php echo ( !empty( $field['chosen_valt'] ) ? $field['chosen_valt'] : '' ); ?>" />
|
185 |
-
</td>
|
186 |
-
|
187 |
-
<td style="display:none;" class="condition_tick">
|
188 |
-
<input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][conditional_tie]" placeholder="<?php _e('Parent Abbr. Name','woocommerce-checkout-manager'); ?>" value="<?php echo ( !empty( $field['conditional_tie'] ) ? $field['conditional_tie'] : '' ); ?>" />
|
189 |
-
</td>
|
190 |
-
|
191 |
-
<td style="display:none;" class="filter_field">
|
192 |
-
<input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][colorpickerd]" id="billing-colorpic<?php echo $i; ?>" placeholder="<?php _e('#000000','woocommerce-checkout-manager'); ?>" value="<?php echo ( !empty( $field['colorpickerd'] ) ? $field['colorpickerd'] : '' ); ?>" />
|
193 |
-
</td>
|
194 |
-
|
195 |
-
<td style="display:none;" class="filter_field">
|
196 |
-
<select name="wccs_settings3[billing_buttons][<?php echo $i; ?>][colorpickertype]">
|
197 |
-
<option value="farbtastic" <?php (!isset($field['colorpickertype'])) ? '' : selected( $field['colorpickertype'], 'farbtastic' ); ?>><?php _e('Farbtastic','woocommerce-checkout-manager'); ?></option>
|
198 |
-
<option value="iris" <?php (!isset($field['colorpickertype'])) ? '' : selected( $field['colorpickertype'], 'iris' ); ?>><?php _e('Iris','woocommerce-checkout-manager'); ?></option>
|
199 |
-
</select>
|
200 |
-
</td>
|
201 |
-
|
202 |
-
<td style="display:none;text-align:center;" class="filter_field">
|
203 |
-
<input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][user_role]" type="checkbox" value="user_role" <?php if ( !empty ($field['user_role'])) echo "checked='checked'"; ?> />
|
204 |
-
</td>
|
205 |
-
|
206 |
-
<td class="filter_field" style="display:none;">
|
207 |
-
<input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][role_options]" placeholder="Option 1||Option 2||Option 3" value="<?php echo ( !empty( $field['role_options'] ) ? $field['role_options'] : '' ); ?>" />
|
208 |
-
</td>
|
209 |
-
|
210 |
-
<td class="filter_field" style="display:none;">
|
211 |
-
<input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][role_options2]" placeholder="Option 1||Option 2||Option 3" value="<?php echo ( !empty( $field['role_options2'] ) ? $field['role_options2'] : '' ); ?>" />
|
212 |
-
</td>
|
213 |
-
|
214 |
-
<td style="display:none;" class="filter_field add_amount_field hide_stuff_time hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c condition_tick add_amount_field">
|
215 |
-
<input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][extra_class]" value="<?php echo ( !empty( $field['extra_class'] ) ? $field['extra_class'] : '' ); ?>" />
|
216 |
-
</td>
|
217 |
-
|
218 |
-
<td style="display:none;text-align:center;" class="hide_stuff_op wccm1">
|
219 |
-
<input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][fancy]" type="checkbox" value="country_select" <?php if ( !empty ($field['fancy'])) echo "checked='checked'"; ?> />
|
220 |
-
</td>
|
221 |
-
|
222 |
-
<td class="hide_stuff_op wccm1" style="display:none;">
|
223 |
-
<input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][force_title2]" placeholder="<?php _e('Name Guide','woocommerce-checkout-manager'); ?>" value="<?php echo ( !empty( $field['force_title2'] ) ? $field['force_title2'] : '' ); ?>" />
|
224 |
-
</td>
|
225 |
-
|
226 |
-
<td class="hide_stuff_op wccm1" style="display:none;">
|
227 |
-
<input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][option_array]" placeholder="Option 1||Option 2||Option 3" value="<?php echo ( !empty( $field['option_array'] ) ? $field['option_array'] : '' ); ?>" />
|
228 |
-
</td>
|
229 |
-
|
230 |
-
<td class="filter_field add_amount_field hide_stuff_time condition_tick hide_stuff_change hide_stuff_opcheck hide_stuff_color more_toggler1 more_toggler1c" style="display:none;">
|
231 |
-
<?php _e('Options Toggler', 'woocommerce-checkout-manager' ); ?>
|
232 |
-
</td>
|
233 |
-
<!--
|
234 |
-
<td class="filter_field add_amount_field condition_tick hide_stuff_change hide_stuff_timef hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c" style="display:none;">
|
235 |
-
<?php _e('Time Toggler', 'woocommerce-checkout-manager' ); ?>
|
236 |
-
</td>
|
237 |
-
|
238 |
-
<td class="filter_field add_amount_field hide_stuff_time condition_tick hide_stuff_change hide_stuff_opcheck hide_stuff_op more_toggler1 more_toggler1c hide_stuff_days" style="display:none;">
|
239 |
-
<?php _e('Date Toggler', 'woocommerce-checkout-manager' ); ?>
|
240 |
-
</td>
|
241 |
-
-->
|
242 |
-
|
243 |
-
<td style="display:none;" class="filter_field add_amount_field hide_stuff_time condition_tick hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1">
|
244 |
-
<?php _e('Hidden Toggler', 'woocommerce-checkout-manager' ); ?>
|
245 |
-
</td>
|
246 |
-
|
247 |
-
<td class="filter_field add_amount_field condition_tick hide_stuff_time hide_stuff_change hide_stuff_opcheck hide_stuff_color hide_stuff_op more_toggler more_toggler1c" title="<?php _e( 'Open additional options for this Checkout field', 'woocommerce-checkout-manager' ); ?>">
|
248 |
-
<?php _e('More Toggler', 'woocommerce-checkout-manager' ); ?>
|
249 |
-
</td>
|
250 |
-
|
251 |
-
<td class="more_toggler1">
|
252 |
-
<select name="wccs_settings3[billing_buttons][<?php echo $i; ?>][type]" title="<?php _e( 'Type of the Checkout field', 'woocommerce-checkout-manager' ); ?>" <?php if ( $field['cow'] == 'country' || $field['cow'] == 'state' ) { echo 'readonly="readonly" style="pointer-events:none;"'; } ?> > <!--Call run() function-->
|
253 |
-
<option value="wooccmtext" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'wooccmtext' ); ?>><?php _e('Text Input','woocommerce-checkout-manager'); ?></option>
|
254 |
-
<option value="wooccmtextarea" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'wooccmtextarea' ); ?>><?php _e('Textarea','woocommerce-checkout-manager'); ?></option>
|
255 |
-
<option value="wooccmpassword" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'wooccmpassword' ); ?>><?php _e('Password','woocommerce-checkout-manager'); ?></option>
|
256 |
-
<option value="wooccmradio" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'wooccmradio' ); ?>><?php _e('Radio Buttons','woocommerce-checkout-manager'); ?></option>
|
257 |
-
<option value="checkbox_wccm" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'checkbox_wccm' ); ?>><?php _e('Check Box','woocommerce-checkout-manager'); ?></option>
|
258 |
-
<option value="wooccmselect" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'wooccmselect' ); ?>><?php _e('Select Options','woocommerce-checkout-manager'); ?></option>
|
259 |
-
<!--<option value="datepicker" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'datepicker' ); ?>><?php _e('Date Picker','woocommerce-checkout-manager'); ?></option>
|
260 |
-
<option value="time" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'time' ); ?>><?php _e('Time Picker','woocommerce-checkout-manager'); ?></option>-->
|
261 |
-
<option value="colorpicker" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'colorpicker' ); ?>><?php _e('Color Picker','woocommerce-checkout-manager'); ?></option>
|
262 |
-
<option value="heading" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'heading' ); ?>><?php _e('Heading','woocommerce-checkout-manager'); ?></option>
|
263 |
-
<option value="multiselect" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'multiselect' ); ?>><?php _e('Multi-Select','woocommerce-checkout-manager'); ?></option>
|
264 |
-
<option value="multicheckbox" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'multicheckbox' ); ?>><?php _e('Multi-Checkbox','woocommerce-checkout-manager'); ?></option>
|
265 |
-
<option <?php if ( $field['cow'] == 'country' ) { echo 'selected="selected"'; } ?> value="wooccmcountry" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'wooccmcountry' ); ?>><?php _e('Country','woocommerce-checkout-manager'); ?></option>
|
266 |
-
<option <?php if ( $field['cow'] == 'state' ) { echo 'selected="selected"'; } ?> value="wooccmstate" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'wooccmstate' ); ?>><?php _e('State','woocommerce-checkout-manager'); ?></option>
|
267 |
-
<option value="wooccmupload" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'wooccmupload' ); ?>><?php _e('File Picker','woocommerce-checkout-manager'); ?></option>
|
268 |
-
</select>
|
269 |
-
</td>
|
270 |
-
|
271 |
-
<td class="more_toggler1">
|
272 |
-
<input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][cow]" placeholder="MyField" title="<?php _e( 'To edit Abbreviations open General > Switches > Editing Of Abbreviation Fields.', 'woocommerce-checkout-manager' ); ?>" value="<?php echo $field['cow']; ?>" <?php if ( empty($options['checkness']['abbreviation'])) { echo 'readonly="readonly"'; } ?> <?php if ( in_array($field['cow'],$htmlbillingabbr) ) { echo 'readonly="readonly" style="pointer-events:none;"'; } ?> />
|
273 |
-
</td>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/templates/admin/clean/woocheckout-billing-thead.php
DELETED
@@ -1,131 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* WooCommerce Checkout Manager
|
4 |
-
*/
|
5 |
-
|
6 |
-
// Exit if accessed directly
|
7 |
-
if ( !defined( 'ABSPATH' ) ) exit;
|
8 |
-
?>
|
9 |
-
|
10 |
-
|
11 |
-
<th class="more_toggler1c" style="display:none;width: 5%;"><?php _e('More' , 'woocommerce-checkout-manager' ); ?></th>
|
12 |
-
|
13 |
-
<th class="more_toggler1c hidefieldproduct" style="display:none;width: 17%;"><?php _e('Hide Field from Product' , 'woocommerce-checkout-manager' ); ?></th>
|
14 |
-
|
15 |
-
<th class="more_toggler1c" style="display:none;width: 17%;"><?php _e('Show Field for Product' , 'woocommerce-checkout-manager' ); ?></th>
|
16 |
-
|
17 |
-
<th class="more_toggler1c hidefieldcat" style="display:none;width: 20%;"><?php _e('Hide Field from Category' , 'woocommerce-checkout-manager' ); ?></th>
|
18 |
-
|
19 |
-
<th class="more_toggler1c" style="display:none;width: 20%;"><?php _e('Show Field for Category' , 'woocommerce-checkout-manager' ); ?></th>
|
20 |
-
|
21 |
-
<th class="hide_stuff_time" style="display:none;width: 16%;"><?php _e('Start Hour' , 'woocommerce-checkout-manager' ); ?></th>
|
22 |
-
|
23 |
-
<th class="hide_stuff_time" style="display:none;width: 16%;"><?php _e('End Hour' , 'woocommerce-checkout-manager' ); ?></th>
|
24 |
-
|
25 |
-
<th class="hide_stuff_time" style="display:none;width: 16%;"><?php _e('Interval Min.' , 'woocommerce-checkout-manager' ); ?></th>
|
26 |
-
|
27 |
-
<th class="hide_stuff_time" style="display:none;width: 16%;"><?php _e('Manual Min.' , 'woocommerce-checkout-manager' ); ?></th>
|
28 |
-
|
29 |
-
<th class="hide_stuff_color hide_stuff_days" style="display:none;width: 16%;"><?php _e('Date Format' , 'woocommerce-checkout-manager' ); ?></th>
|
30 |
-
|
31 |
-
<th class="hide_stuff_color hide_stuff_days" style="display:none;width: 5%;"><?php _e('Days before' , 'woocommerce-checkout-manager' ); ?></th>
|
32 |
-
|
33 |
-
<th class="hide_stuff_color hide_stuff_days" style="display:none;width: 5%;"><?php _e('Days After' , 'woocommerce-checkout-manager' ); ?></th>
|
34 |
-
|
35 |
-
<th class="hide_stuff_color daoo" style="display:none;width: 7%;"><?php _e('Days Enabler' , 'woocommerce-checkout-manager' ); ?></th>
|
36 |
-
|
37 |
-
<th class="hide_stuff_days" style="display:none;width: 7%;"><?php _e('Sundays' , 'woocommerce-checkout-manager' ); ?></th>
|
38 |
-
|
39 |
-
<th class="hide_stuff_days" style="display:none;width: 7%;"><?php _e('Mondays' , 'woocommerce-checkout-manager' ); ?></th>
|
40 |
-
|
41 |
-
<th class="hide_stuff_days" style="display:none;width: 7%;"><?php _e('Tuesdays' , 'woocommerce-checkout-manager' ); ?></th>
|
42 |
-
|
43 |
-
<th class="hide_stuff_days" style="display:none;width: 7%;"><?php _e('Wednesdays' , 'woocommerce-checkout-manager' ); ?></th>
|
44 |
-
|
45 |
-
<th class="hide_stuff_days" style="display:none;width: 7%;"><?php _e('Thursdays' , 'woocommerce-checkout-manager' ); ?></th>
|
46 |
-
|
47 |
-
<th class="hide_stuff_days" style="display:none;width: 7%;"><?php _e('Fridays' , 'woocommerce-checkout-manager' ); ?></th>
|
48 |
-
|
49 |
-
<th class="hide_stuff_days" style="display:none;width: 7%;"><?php _e('Satudays' , 'woocommerce-checkout-manager' ); ?></th>
|
50 |
-
|
51 |
-
<th class="hide_stuff_color separator hide_stuff_days" style="display:none;" width="3%"><?php _e('' , 'woocommerce-checkout-manager' ); ?></th>
|
52 |
-
|
53 |
-
<th class="hide_stuff_color hide_stuff_days" style="display:none;text-align:center;" width="5%"><?php _e('YY' , 'woocommerce-checkout-manager' ); ?></th>
|
54 |
-
|
55 |
-
<th class="hide_stuff_color hide_stuff_days" style="display:none;" width="4%"><?php _e('MM' , 'woocommerce-checkout-manager' ); ?></th>
|
56 |
-
|
57 |
-
<th class="hide_stuff_color hide_stuff_days" style="display:none;" width="4%"><?php _e('DD' , 'woocommerce-checkout-manager' ); ?></th>
|
58 |
-
|
59 |
-
<th class="hide_stuff_color separator hide_stuff_days" style="display:none;" width="3%"><?php _e('' , 'woocommerce-checkout-manager' ); ?></th>
|
60 |
-
|
61 |
-
<th class="hide_stuff_color hide_stuff_days" style="display:none;text-align:center;" width="5%"><?php _e('YY' , 'woocommerce-checkout-manager' ); ?></th>
|
62 |
-
|
63 |
-
<th class="hide_stuff_color hide_stuff_days" style="display:none;" width="4%"><?php _e('MM' , 'woocommerce-checkout-manager' ); ?></th>
|
64 |
-
|
65 |
-
<th class="hide_stuff_color hide_stuff_days" style="display:none;" width="4%"><?php _e('DD' , 'woocommerce-checkout-manager' ); ?></th>
|
66 |
-
|
67 |
-
<th class="more_toggler1" width="8%"><?php _e('Required' , 'woocommerce-checkout-manager' ); ?></th>
|
68 |
-
|
69 |
-
<th class="more_toggler1" width="5%"><?php _e('Position' , 'woocommerce-checkout-manager' ); ?></th>
|
70 |
-
|
71 |
-
<th class="more_toggler1" width="5%"><?php _e('Clear' , 'woocommerce-checkout-manager' ); ?></th>
|
72 |
-
|
73 |
-
<th class="filter_field" style="display:none;" width="5%"><?php _e('Deny Checkout' , 'woocommerce-checkout-manager' ); ?></th>
|
74 |
-
|
75 |
-
<th style="cursor: pointer; text-align: center; font-size: 30px;display:none;" class="filter_field_tog add_amount_field condition_tick hide_stuff_time hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c" style="display:none;" width="5%"><span class="toggle_shower">≡</span></th>
|
76 |
-
|
77 |
-
<th class="filter_field" style="display:none;" width="5%"><?php _e('Remove Tax' , 'woocommerce-checkout-manager' ); ?></th>
|
78 |
-
|
79 |
-
<th class="filter_field" style="display:none;" width="5%"><?php _e('Deny Receipt' , 'woocommerce-checkout-manager' ); ?></th>
|
80 |
-
<!--
|
81 |
-
<th class="filter_field condition_tick hide_stuff_change hide_stuff_time hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c add_amount" style="display:none;" width="5%"><?php _e('Add Amount' , 'woocommerce-checkout-manager' ); ?></th>
|
82 |
-
-->
|
83 |
-
<th class="add_amount_field" style="display:none;" width="5%"><?php _e('Amount Name' , 'woocommerce-checkout-manager' ); ?></th>
|
84 |
-
|
85 |
-
<th class="add_amount_field" style="display:none;" width="5%"><?php _e('Enter Amount' , 'woocommerce-checkout-manager' ); ?></th>
|
86 |
-
|
87 |
-
<th class="filter_field add_amount_field hide_stuff_change hide_stuff_time hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c apply_tick" style="display:none;" width="9%"><?php _e('Conditional' , 'woocommerce-checkout-manager' ); ?></th>
|
88 |
-
|
89 |
-
<th class="condition_tick" style="display:none;" width="9%"><?php _e('Conditional Parent' , 'woocommerce-checkout-manager' ); ?></th>
|
90 |
-
|
91 |
-
<th class="more_toggler1"><?php _e('Label' , 'woocommerce-checkout-manager' ); ?></th>
|
92 |
-
|
93 |
-
<th class="more_toggler1"><?php _e('Placeholder' , 'woocommerce-checkout-manager' ); ?></th>
|
94 |
-
|
95 |
-
<th style="display:none; width: 10%;" class="filter_field add_amount_field hide_stuff_time hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c condition_tick add_amount_field"><?php _e('Chosen Value' , 'woocommerce-checkout-manager' ); ?></th>
|
96 |
-
|
97 |
-
<th style="display:none;" class="condition_tick" width="16%"><?php _e('Conditional Tie' , 'woocommerce-checkout-manager' ); ?></th>
|
98 |
-
|
99 |
-
<th style="display:none;width:5%;" class="filter_field" width="1%"><?php _e('Default Color' , 'woocommerce-checkout-manager' ); ?></th>
|
100 |
-
|
101 |
-
<th style="display:none;" class="filter_field" width="5%"><?php _e('Picker Type' , 'woocommerce-checkout-manager' ); ?></th>
|
102 |
-
|
103 |
-
<th style="display:none;" class="filter_field" width="5%"><?php _e('User Role' , 'woocommerce-checkout-manager' ); ?></th>
|
104 |
-
|
105 |
-
<th class="filter_field roles" style="display:none;" width="15%"><?php _e('Show for Roles (Separated by ' , 'woocommerce-checkout-manager' ); ?><span class="toggle_shower current_opener">||</span> )</th>
|
106 |
-
|
107 |
-
<th class="filter_field" style="display:none;" width="15%"><?php _e('Hide from Roles (Separated by ' , 'woocommerce-checkout-manager' ); ?><span class="toggle_shower current_opener">||</span> )</th>
|
108 |
-
|
109 |
-
<th style="display:none;" class="filter_field add_amount_field hide_stuff_time hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c condition_tick add_amount_field" width="13%"><?php _e('Class' , 'woocommerce-checkout-manager' ); ?></th>
|
110 |
-
|
111 |
-
<th class="hide_stuff_op wccm1" style="display:none;" width="10%"><?php _e('Adapt' , 'woocommerce-checkout-manager' ); ?></th>
|
112 |
-
|
113 |
-
<th class="hide_stuff_op wccm1" style="display:none;" width="10%"><?php _e('Title' , 'woocommerce-checkout-manager' ); ?></th>
|
114 |
-
|
115 |
-
<th class="hide_stuff_op wccm1" style="display:none;" width="60%"><?php _e('List of Options (Separated by ' , 'woocommerce-checkout-manager' ); ?><span class="toggle_shower current_opener">||</span> )</th>
|
116 |
-
|
117 |
-
<th style="cursor:pointer;text-align:center;font-size:30px;display:none;" class="filter_field add_amount_field condition_tick hide_stuff_change hide_stuff_time hide_stuff_opcheck hide_stuff_tog hide_stuff_color more_toggler1 more_toggler1c" width="2%"><span class="toggle_shower">≡</span></th>
|
118 |
-
|
119 |
-
<!--
|
120 |
-
<th style="cursor:pointer;text-align:center;font-size:30px;display:none;" class="filter_field add_amount_field condition_tick hide_stuff_opcheck hide_stuff_op hide_stuff_change hide_stuff_time_tog hide_stuff_color more_toggler1 more_toggler1c" width="2%"><span class="toggle_shower">≡</span></th>
|
121 |
-
|
122 |
-
<th style="cursor:pointer;text-align:center;font-size:30px;display:none;" class="filter_field add_amount_field hide_stuff_time condition_tick hide_stuff_change hide_stuff_opcheck hide_stuff_days hide_stuff_color_tog hide_stuff_op more_toggler1 more_toggler1c" width="2%"><span class="toggle_shower">≡</span></th>
|
123 |
-
-->
|
124 |
-
<th style="display:none;cursor:pointer;text-align:center;font-size:30px;" class="filter_field add_amount_field condition_tick hide_stuff_change hide_stuff_opcheck hide_stuff_time hide_stuff_op hide_stuff_color more_toggler1 more_toggler1a" width="2%"><span class="toggle_shower">≡</span></th>
|
125 |
-
|
126 |
-
<th style="cursor:pointer;text-align:center;font-size:30px;" class="filter_field add_amount_field hide_stuff_time condition_tick hide_stuff_change hide_stuff_opcheck hide_stuff_color more_toggler hide_stuff_op more_toggler1c" width="2%"><span class="toggle_shower">≡</span></th>
|
127 |
-
|
128 |
-
<th class="more_toggler1" style="width:10%;"><?php _e('Choose Type' , 'woocommerce-checkout-manager' ); ?></th>
|
129 |
-
|
130 |
-
<th class="more_toggler1" style="width:5%"><?php _e('Abbreviation' , 'woocommerce-checkout-manager' ); ?></th>
|
131 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/templates/admin/woocheckout-additional-clone.php
DELETED
@@ -1,167 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* WooCommerce Checkout Manager
|
4 |
-
*
|
5 |
-
*/
|
6 |
-
// Exit if accessed directly
|
7 |
-
if (!defined('ABSPATH'))
|
8 |
-
exit;
|
9 |
-
?>
|
10 |
-
|
11 |
-
<td style="display:none;text-align:center;" class="more_toggler1c"><input type="checkbox" name="wccs_settings[buttons][<?php echo $i; ?>][more_content]" title="<?php esc_attr_e('More than two content', 'woocommerce-checkout-manager'); ?>" value="" /></td>
|
12 |
-
|
13 |
-
<td style="display:none;" class="more_toggler1c"><input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][single_p]" placeholder="<?php _e('Product ID(s) e.g 1674||1233', 'woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e('Hide field from this Products Only', 'woocommerce-checkout-manager'); ?>" value="" /></td>
|
14 |
-
|
15 |
-
<td style="display:none;" class="more_toggler1c"><input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][single_px]" placeholder="<?php _e('Product ID(s) e.g 1674||1233', 'woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e('Display Field for these Products Only', 'woocommerce-checkout-manager'); ?>" value="" /></td>
|
16 |
-
|
17 |
-
<td style="display:none;" class="more_toggler1c"><input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][single_p_cat]" placeholder="<?php _e('Category Slug(s) e.g my-cat||my-cat2', 'woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e('Hide field from Category', 'woocommerce-checkout-manager'); ?>" value="" /></td>
|
18 |
-
|
19 |
-
<td style="display:none;" class="more_toggler1c"><input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][single_px_cat]" placeholder="<?php _e('Category Slug(s) e.g my-cat||my-cat2', 'woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e('Show Field for Category', 'woocommerce-checkout-manager'); ?>" value="" /></td>
|
20 |
-
|
21 |
-
<td style="display:none;" class="hide_stuff_time"><input type="text" placeholder="6" name="wccs_settings[buttons][<?php echo $i; ?>][start_hour]" value="" /></td>
|
22 |
-
|
23 |
-
<td style="display:none;" class="hide_stuff_time"><input type="text" placeholder="9" name="wccs_settings[buttons][<?php echo $i; ?>][end_hour]" value="" /></td>
|
24 |
-
|
25 |
-
<td style="display:none;" class="hide_stuff_time"><input type="text" placeholder="15" name="wccs_settings[buttons][<?php echo $i; ?>][interval_min]" value="" /></td>
|
26 |
-
|
27 |
-
<td style="display:none;" class="hide_stuff_time"><input type="text" placeholder="0, 10, 20, 30, 40" name="wccs_settings[buttons][<?php echo $i; ?>][manual_min]" value="" /></td>
|
28 |
-
|
29 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days"><input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][format_date]" placeholder="dd-mm-yy" title="dd-mm-yy" value="" /></td>
|
30 |
-
|
31 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days"><input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][min_before]" placeholder="+3" title="Days Before" value="" /></td>
|
32 |
-
|
33 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days"><input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][max_after]" placeholder="3" title="Days After" value="" /></td>
|
34 |
-
|
35 |
-
<td style="display:none;text-align:center;" class="hide_stuff_color daoo"><input name="wccs_settings[buttons][<?php echo $i; ?>][days_disabler]" type="checkbox" value="" /></td>
|
36 |
-
|
37 |
-
<td style="display:none;text-align:center;" class="hide_stuff_days"><input name="wccs_settings[buttons][<?php echo $i; ?>][days_disabler0]" type="checkbox" value="" /></td>
|
38 |
-
|
39 |
-
<td style="display:none;text-align:center;" class="hide_stuff_days"><input name="wccs_settings[buttons][<?php echo $i; ?>][days_disabler1]" type="checkbox" value="" /></td>
|
40 |
-
|
41 |
-
<td style="display:none;text-align:center;" class="hide_stuff_days"><input name="wccs_settings[buttons][<?php echo $i; ?>][days_disabler2]" type="checkbox" value="" /></td>
|
42 |
-
|
43 |
-
<td style="display:none;text-align:center;" class="hide_stuff_days"><input name="wccs_settings[buttons][<?php echo $i; ?>][days_disabler3]" type="checkbox" value="" /></td>
|
44 |
-
|
45 |
-
<td style="display:none;text-align:center;" class="hide_stuff_days"><input name="wccs_settings[buttons][<?php echo $i; ?>][days_disabler4]" type="checkbox" value="" /></td>
|
46 |
-
|
47 |
-
<td style="display:none;text-align:center;" class="hide_stuff_days"><input name="wccs_settings[buttons][<?php echo $i; ?>][days_disabler5]" type="checkbox" value="" /></td>
|
48 |
-
|
49 |
-
<td style="display:none;text-align:center;" class="hide_stuff_days"><input name="wccs_settings[buttons][<?php echo $i; ?>][days_disabler6]" type="checkbox" value="" /></td>
|
50 |
-
|
51 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days" title="<?php esc_attr_e('Min Date', 'woocommerce-checkout-manager'); ?>"><span class="spongagge"><?php _e('Min Date', 'woocommerce-checkout-manager'); ?></span></td>
|
52 |
-
|
53 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days"><input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][single_yy]" placeholder="<?php _e('2013', 'woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e('yy', 'woocommerce-checkout-manager'); ?>" value="" /></td>
|
54 |
-
|
55 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days"><input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][single_mm]" placeholder="<?php _e('10', 'woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e('mm', 'woocommerce-checkout-manager'); ?>" value="" /></td>
|
56 |
-
|
57 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days"><input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][single_dd]" placeholder="<?php _e('25', 'woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e('dd', 'woocommerce-checkout-manager'); ?>" value="" /></td>
|
58 |
-
|
59 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days" title="<?php esc_attr_e('Max Date', 'woocommerce-checkout-manager'); ?>"><span class="spongagge"><?php _e('Max Date', 'woocommerce-checkout-manager'); ?></span></td>
|
60 |
-
|
61 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days"><input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][single_max_yy]" placeholder="<?php _e('2013', 'woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e('yy', 'woocommerce-checkout-manager'); ?>" value="" /></td>
|
62 |
-
|
63 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days"><input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][single_max_mm]" placeholder="<?php _e('10', 'woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e('mm', 'woocommerce-checkout-manager'); ?>" value="" /></td>
|
64 |
-
|
65 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days"><input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][single_max_dd]" placeholder="<?php _e('25', 'woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e('dd', 'woocommerce-checkout-manager'); ?>" value="" /></td>
|
66 |
-
|
67 |
-
<td class="more_toggler1" style="text-align:center;"><input name="wccs_settings[buttons][<?php echo $i; ?>][checkbox]" type="checkbox" title="<?php esc_attr_e('Add/Remove Required Attribute', 'woocommerce-checkout-manager'); ?>" value="" /></td>
|
68 |
-
|
69 |
-
<td class="more_toggler1" style="text-align:center;">
|
70 |
-
<select name="wccs_settings[buttons][<?php echo $i; ?>][position]" > <!--Call run() function-->
|
71 |
-
<option value="form-row-wide" ><?php _e('Wide', 'woocommerce-checkout-manager'); ?></option>
|
72 |
-
<option value="form-row-first" ><?php _e('Left', 'woocommerce-checkout-manager'); ?></option>
|
73 |
-
<option value="form-row-last" ><?php _e('Right', 'woocommerce-checkout-manager'); ?></option>
|
74 |
-
</select>
|
75 |
-
</td>
|
76 |
-
|
77 |
-
<td class="more_toggler1" style="text-align:center;"><input name="wccs_settings[buttons][<?php echo $i; ?>][clear_row]" type="checkbox" title="<?php esc_attr_e('Clear Row', 'woocommerce-checkout-manager'); ?>" value=" " /></td>
|
78 |
-
|
79 |
-
<td class="filter_field" style="display:none;text-align:center;"><input name="wccs_settings[buttons][<?php echo $i; ?>][deny_checkout]" type="checkbox" title="<?php esc_attr_e('Deny Checkout', 'woocommerce-checkout-manager'); ?>" value=" " /></td>
|
80 |
-
|
81 |
-
<td class="filter_field_tog add_amount_field condition_tick hide_stuff_time hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c" style="display:none;"><?php _e('Filter Toggler', 'woocommerce-checkout-manager'); ?></td>
|
82 |
-
|
83 |
-
<td class="filter_field" style="display:none;text-align:center;"><input name="wccs_settings[buttons][<?php echo $i; ?>][tax_remove]" type="checkbox" title="<?php esc_attr_e('Remove tax', 'woocommerce-checkout-manager'); ?>" value=" " /></td>
|
84 |
-
|
85 |
-
<td class="filter_field" style="display:none;text-align:center;"><input name="wccs_settings[buttons][<?php echo $i; ?>][deny_receipt]" type="checkbox" title="<?php esc_attr_e('Deny Receipt', 'woocommerce-checkout-manager'); ?>" value=" " /></td>
|
86 |
-
<!--
|
87 |
-
<td class="filter_field condition_tick hide_stuff_change hide_stuff_time hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c" style="display:none;text-align:center;"><input name="wccs_settings[buttons][<?php echo $i; ?>][add_amount]" type="checkbox" title="<?php esc_attr_e('Add Amount', 'woocommerce-checkout-manager'); ?>" value=" " /></td>
|
88 |
-
-->
|
89 |
-
<td class="add_amount_field" style="display:none;text-align:center;"><input name="wccs_settings[buttons][<?php echo $i; ?>][fee_name]" type="text" title="<?php esc_attr_e('Amount Name', 'woocommerce-checkout-manager'); ?>" value="" placeholder="<?php _e('My Custom Charge', 'woocommerce-checkout-manager'); ?>" /></td>
|
90 |
-
|
91 |
-
<td class="add_amount_field" style="display:none;text-align:center;"><input name="wccs_settings[buttons][<?php echo $i; ?>][add_amount_field]" type="text" title="<?php esc_attr_e('Add Amount Field', 'woocommerce-checkout-manager'); ?>" value="" placeholder="50" /></td>
|
92 |
-
|
93 |
-
<td class="filter_field add_amount_field hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_time hide_stuff_color more_toggler1 more_toggler1c" style="display:none;text-align:center;"><input name="wccs_settings[buttons][<?php echo $i; ?>][conditional_parent_use]" type="checkbox" title="<?php esc_attr_e('Conditional Field On', 'woocommerce-checkout-manager'); ?>" value=" " /></td>
|
94 |
-
|
95 |
-
<td class="condition_tick" style="display:none;text-align:center;"><input name="wccs_settings[buttons][<?php echo $i; ?>][conditional_parent]" type="checkbox" title="<?php esc_attr_e('Conditional Parent', 'woocommerce-checkout-manager'); ?>" value=" " /></td>
|
96 |
-
|
97 |
-
<td class="more_toggler1"><input placeholder="<?php _e('My Field Name', 'woocommerce-checkout-manager'); ?>" type="text" name="wccs_settings[buttons][<?php echo $i; ?>][label]" title="<?php esc_attr_e('Label of the New Field', 'woocommerce-checkout-manager'); ?>" value="" /></td>
|
98 |
-
|
99 |
-
<td class="more_toggler1"><input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][placeholder]" placeholder="<?php _e('Example red', 'woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e('Placeholder - Preview of Data to Input', 'woocommerce-checkout-manager'); ?>" value="" /></td>
|
100 |
-
|
101 |
-
<td style="display:none;" class="filter_field add_amount_field hide_stuff_time hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c condition_tick add_amount_field"><input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][chosen_valt]" placeholder="<?php _e('Yes', 'woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e('Chosen value for conditional', 'woocommerce-checkout-manager'); ?>" value="" /></td>
|
102 |
-
|
103 |
-
<td style="display:none;" class="condition_tick"><input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][conditional_tie]" placeholder="<?php _e('Parent Abbr. Name', 'woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e('Parent Abbr. Name', 'woocommerce-checkout-manager'); ?>" value="" /></td>
|
104 |
-
|
105 |
-
<td style="display:none;" class="filter_field"><input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][colorpickerd]" id="billing-colorpic<?php echo $i; ?>" title="<?php esc_attr_e('Default Color', 'woocommerce-checkout-manager'); ?>" value="#000000" /></td>
|
106 |
-
|
107 |
-
<td style="display:none;" class="filter_field">
|
108 |
-
<select name="wccs_settings[buttons][<?php echo $i; ?>][colorpickertype]" > <!--Call run() function-->
|
109 |
-
<option value="farbtastic" ><?php _e('Farbtastic', 'woocommerce-checkout-manager'); ?></option>
|
110 |
-
<option value="iris" ><?php _e('Iris', 'woocommerce-checkout-manager'); ?></option>
|
111 |
-
</select>
|
112 |
-
</td>
|
113 |
-
|
114 |
-
<td style="display:none;text-align:center;" class="filter_field"><input name="wccs_settings[buttons][<?php echo $i; ?>][user_role]" type="checkbox" value="" /></td>
|
115 |
-
|
116 |
-
<td class="filter_field" style="display:none;"><input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][role_options]" placeholder="Option 1||Option 2||Option 3" value="" /></td>
|
117 |
-
|
118 |
-
<td class="filter_field" style="display:none;"><input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][role_options2]" placeholder="Option 1||Option 2||Option 3" value="" /></td>
|
119 |
-
|
120 |
-
<td style="display:none;" class="filter_field add_amount_field hide_stuff_change hide_stuff_time hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c condition_tick add_amount_field"><input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][extra_class]" value="" /></td>
|
121 |
-
|
122 |
-
<td style="display:none;" class="hide_stuff_change"><input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][changenamep]" id="billing-colorpic<?php echo $i; ?>" placeholder="<?php _e('Billing Details', 'woocommerce-checkout-manager'); ?>" value="" /></td>
|
123 |
-
|
124 |
-
<td style="display:none;" class="hide_stuff_change"><input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][changename]" id="billing-colorpic<?php echo $i; ?>" placeholder="<?php _e('Bill Form', 'woocommerce-checkout-manager'); ?>" value="" /></td>
|
125 |
-
|
126 |
-
<td style="display:none;text-align:center;" class="hide_stuff_op wccm1"><input type="checkbox" name="wccs_settings[buttons][<?php echo $i; ?>][fancy]" title="<?php esc_attr_e('Adapt to woocommerce style', 'woocommerce-checkout-manager'); ?>" value="" /></td>
|
127 |
-
|
128 |
-
<td class="hide_stuff_op wccm1" style="display:none;"><input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][force_title2]" value="" placeholder="<?php _e('Name Guide', 'woocommerce-checkout-manager'); ?>" /></td>
|
129 |
-
|
130 |
-
<td class="hide_stuff_op wccm1" style="display:none;"><input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][option_array]" value="" placeholder="Option 1 || Option 2 || Option 3 || Option 4" /></td>
|
131 |
-
|
132 |
-
<td class="filter_field add_amount_field hide_stuff_time condition_tick hide_stuff_change hide_stuff_opcheck hide_stuff_color more_toggler1 more_toggler1c" style="display:none;"><?php _e('Options Toggler', 'woocommerce-checkout-manager'); ?></td>
|
133 |
-
|
134 |
-
<td class="filter_field add_amount_field hide_stuff_time condition_tick hide_stuff_change_tog hide_stuff_timef hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c" style="display:none;"><?php _e('Swapper Toggler', 'woocommerce-checkout-manager'); ?></td>
|
135 |
-
<!--
|
136 |
-
<td class="filter_field add_amount_field condition_tick hide_stuff_change hide_stuff_timef hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c" style="display:none;"><?php _e('Time Toggler', 'woocommerce-checkout-manager'); ?></td>
|
137 |
-
|
138 |
-
<td class="filter_field add_amount_field hide_stuff_time condition_tick hide_stuff_change hide_stuff_opcheck hide_stuff_op more_toggler1 more_toggler1c hide_stuff_days" style="display:none;"><?php _e('Date Toggler', 'woocommerce-checkout-manager'); ?></td>
|
139 |
-
-->
|
140 |
-
<td style="display:none;" class="filter_field add_amount_field hide_stuff_time condition_tick hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1"><?php _e('Hidden Toggler', 'woocommerce-checkout-manager'); ?></td>
|
141 |
-
|
142 |
-
<td class="filter_field add_amount_field condition_tick hide_stuff_time hide_stuff_change hide_stuff_opcheck hide_stuff_color hide_stuff_op more_toggler more_toggler1c"><?php _e('More Toggler', 'woocommerce-checkout-manager'); ?></td>
|
143 |
-
|
144 |
-
<td class="more_toggler1">
|
145 |
-
<select name="wccs_settings[buttons][<?php echo $i; ?>][type]"> <!--Call run() function-->
|
146 |
-
<option value="wooccmtext"><?php _e('Text Input', 'woocommerce-checkout-manager'); ?></option>
|
147 |
-
<option value="wooccmtextarea"><?php _e('Textarea', 'woocommerce-checkout-manager'); ?></option>
|
148 |
-
<option value="wooccmpassword"><?php _e('Password', 'woocommerce-checkout-manager'); ?></option>
|
149 |
-
<option value="wooccmradio"><?php _e('Radio Buttons', 'woocommerce-checkout-manager'); ?></option>
|
150 |
-
<option value="checkbox_wccm"><?php _e('Check Box', 'woocommerce-checkout-manager'); ?></option>
|
151 |
-
<option value="wooccmselect"><?php _e('Select Options', 'woocommerce-checkout-manager'); ?></option>
|
152 |
-
<!--<option value="datepicker"><?php _e('Date Picker', 'woocommerce-checkout-manager'); ?></option>
|
153 |
-
<option value="time"><?php _e('Time Picker', 'woocommerce-checkout-manager'); ?></option>-->
|
154 |
-
<option value="changename"><?php _e('Text/ Html Swapper', 'woocommerce-checkout-manager'); ?></option>
|
155 |
-
<option value="colorpicker"><?php _e('Color Picker', 'woocommerce-checkout-manager'); ?></option>
|
156 |
-
<option value="heading"><?php _e('Heading', 'woocommerce-checkout-manager'); ?></option>
|
157 |
-
<option value="multiselect"><?php _e('Multi-Select', 'woocommerce-checkout-manager'); ?></option>
|
158 |
-
<option value="multicheckbox" ><?php _e('Multi-Checkbox', 'woocommerce-checkout-manager'); ?></option>
|
159 |
-
<option value="wooccmcountry"><?php _e('Country', 'woocommerce-checkout-manager'); ?></option>
|
160 |
-
<option value="wooccmstate"><?php _e('State', 'woocommerce-checkout-manager'); ?></option>
|
161 |
-
<option value="wooccmupload"><?php _e('File Picker', 'woocommerce-checkout-manager'); ?></option>
|
162 |
-
</select>
|
163 |
-
</td>
|
164 |
-
|
165 |
-
<td class="more_toggler1"><input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][cow]" placeholder="MyField" title="<?php esc_attr_e('Abbreviation (No spaces)', 'woocommerce-checkout-manager'); ?>" value="" <?php if (empty($options['checkness']['abbreviation'])) {
|
166 |
-
echo 'readonly="readonly"';
|
167 |
-
} ?> /></td>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/templates/admin/woocheckout-additional-tbody.php
DELETED
@@ -1,285 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* WooCommerce Checkout Manager
|
4 |
-
*
|
5 |
-
*/
|
6 |
-
|
7 |
-
// Exit if accessed directly
|
8 |
-
if ( !defined( 'ABSPATH' ) ) exit;
|
9 |
-
?>
|
10 |
-
|
11 |
-
<td style="display:none; text-align:center;" class="more_toggler1c">
|
12 |
-
<input name="wccs_settings[buttons][<?php echo $i; ?>][more_content]" type="checkbox" value="1" <?php if ( !empty ($field['more_content'])) echo "checked='checked'"; ?> />
|
13 |
-
</td>
|
14 |
-
|
15 |
-
<td style="display:none;" class="more_toggler1c">
|
16 |
-
<input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][single_p]" placeholder="<?php _e('Product ID(s) e.g 1674||1233','woocommerce-checkout-manager'); ?>" value="<?php echo (empty( $field['single_p'])) ? '' : $field['single_p']; ?>" />
|
17 |
-
</td>
|
18 |
-
|
19 |
-
<td style="display:none;" class="more_toggler1c">
|
20 |
-
<input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][single_px]" placeholder="<?php _e('Product ID(s) e.g 1674||1233','woocommerce-checkout-manager'); ?>" value="<?php echo (empty( $field['single_px'])) ? '' : $field['single_px']; ?>" />
|
21 |
-
</td>
|
22 |
-
|
23 |
-
<td style="display:none;" class="more_toggler1c">
|
24 |
-
<input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][single_p_cat]" placeholder="<?php _e('Category Slug(s) e.g my-cat||my-cat2','woocommerce-checkout-manager'); ?>" value="<?php echo (empty( $field['single_p_cat'])) ? '' : $field['single_p_cat']; ?>" />
|
25 |
-
</td>
|
26 |
-
|
27 |
-
<td style="display:none;" class="more_toggler1c">
|
28 |
-
<input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][single_px_cat]" placeholder="<?php _e('Category Slug(s) e.g my-cat||my-cat2','woocommerce-checkout-manager'); ?>" value="<?php echo (empty( $field['single_px_cat'])) ? '' : $field['single_px_cat']; ?>" />
|
29 |
-
</td>
|
30 |
-
|
31 |
-
<td style="display:none;" class="hide_stuff_time">
|
32 |
-
<input type="text" placeholder="6" name="wccs_settings[buttons][<?php echo $i; ?>][start_hour]" value="<?php echo (empty($field['start_hour'])) ? '' : $field['start_hour']; ?>" />
|
33 |
-
</td>
|
34 |
-
|
35 |
-
<td style="display:none;" class="hide_stuff_time">
|
36 |
-
<input type="text" placeholder="9" name="wccs_settings[buttons][<?php echo $i; ?>][end_hour]" value="<?php echo (empty($field['end_hour'])) ? '' : $field['end_hour']; ?>" />
|
37 |
-
</td>
|
38 |
-
|
39 |
-
<td style="display:none;" class="hide_stuff_time">
|
40 |
-
<input type="text" placeholder="15" name="wccs_settings[buttons][<?php echo $i; ?>][interval_min]" value="<?php echo (empty($field['interval_min'])) ? '' : $field['interval_min']; ?>" />
|
41 |
-
</td>
|
42 |
-
|
43 |
-
<td style="display:none;" class="hide_stuff_time">
|
44 |
-
<input type="text" placeholder="0, 10, 20, 30, 40" name="wccs_settings[buttons][<?php echo $i; ?>][manual_min]" value="<?php echo (empty($field['manual_min'])) ? '' : $field['manual_min']; ?>" />
|
45 |
-
</td>
|
46 |
-
|
47 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days">
|
48 |
-
<input type="text" placeholder="dd-mm-yy" name="wccs_settings[buttons][<?php echo $i; ?>][format_date]" value="<?php echo (empty($field['format_date'])) ? '' : $field['format_date']; ?>" />
|
49 |
-
</td>
|
50 |
-
|
51 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days">
|
52 |
-
<input type="text" placeholder="+3" name="wccs_settings[buttons][<?php echo $i; ?>][min_before]" value="<?php echo (empty($field['min_before'])) ? '' : $field['min_before']; ?>" />
|
53 |
-
</td>
|
54 |
-
|
55 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days">
|
56 |
-
<input type="text" placeholder="3" name="wccs_settings[buttons][<?php echo $i; ?>][max_after]" value="<?php echo (empty( $field['max_after'])) ? '' : $field['max_after']; ?>" />
|
57 |
-
</td>
|
58 |
-
|
59 |
-
<td style="display:none; text-align:center;" class="hide_stuff_color daoo">
|
60 |
-
<input name="wccs_settings[buttons][<?php echo $i; ?>][days_disabler]" type="checkbox" value="true" <?php if ( !empty ($field['days_disabler'])) echo "checked='checked'"; ?> />
|
61 |
-
</td>
|
62 |
-
|
63 |
-
<td style="display:none; text-align:center;" class="hide_stuff_days">
|
64 |
-
<input name="wccs_settings[buttons][<?php echo $i; ?>][days_disabler0]" type="checkbox" value="1" <?php if ( !empty ($field['days_disabler0'])) echo "checked='checked'"; ?> />
|
65 |
-
</td>
|
66 |
-
|
67 |
-
<td style="display:none; text-align:center;" class="hide_stuff_days">
|
68 |
-
<input name="wccs_settings[buttons][<?php echo $i; ?>][days_disabler1]" type="checkbox" value="1" <?php if ( !empty ($field['days_disabler1'])) echo "checked='checked'"; ?> />
|
69 |
-
</td>
|
70 |
-
|
71 |
-
<td style="display:none; text-align:center;" class="hide_stuff_days">
|
72 |
-
<input name="wccs_settings[buttons][<?php echo $i; ?>][days_disabler2]" type="checkbox" value="1" <?php if ( !empty ($field['days_disabler2'])) echo "checked='checked'"; ?> />
|
73 |
-
</td>
|
74 |
-
|
75 |
-
<td style="display:none; text-align:center;" class="hide_stuff_days">
|
76 |
-
<input name="wccs_settings[buttons][<?php echo $i; ?>][days_disabler3]" type="checkbox" value="1" <?php if ( !empty ($field['days_disabler3'])) echo "checked='checked'"; ?> />
|
77 |
-
</td>
|
78 |
-
|
79 |
-
<td style="display:none; text-align:center;" class="hide_stuff_days">
|
80 |
-
<input name="wccs_settings[buttons][<?php echo $i; ?>][days_disabler4]" type="checkbox" value="1" <?php if ( !empty ($field['days_disabler4'])) echo "checked='checked'"; ?> />
|
81 |
-
</td>
|
82 |
-
|
83 |
-
<td style="display:none; text-align:center;" class="hide_stuff_days">
|
84 |
-
<input name="wccs_settings[buttons][<?php echo $i; ?>][days_disabler5]" type="checkbox" value="1" <?php if ( !empty ($field['days_disabler5'])) echo "checked='checked'"; ?> />
|
85 |
-
</td>
|
86 |
-
|
87 |
-
<td style="display:none; text-align:center;" class="hide_stuff_days">
|
88 |
-
<input name="wccs_settings[buttons][<?php echo $i; ?>][days_disabler6]" type="checkbox" value="1" <?php if ( !empty ($field['days_disabler6'])) echo "checked='checked'"; ?> />
|
89 |
-
</td>
|
90 |
-
|
91 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days">
|
92 |
-
<span class="spongagge"><?php _e( 'Min Date', 'woocommerce-checkout-manager' ); ?></span>
|
93 |
-
</td>
|
94 |
-
|
95 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days">
|
96 |
-
<input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][single_yy]" placeholder="<?php _e('2013','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'yy', 'woocommerce-checkout-manager' ); ?>" value="<?php echo (empty($field['single_yy'])) ? '' : $field['single_yy']; ?>" />
|
97 |
-
</td>
|
98 |
-
|
99 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days">
|
100 |
-
<input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][single_mm]" placeholder="<?php _e('10','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'mm', 'woocommerce-checkout-manager' ); ?>" value="<?php echo (empty($field['single_mm'])) ? '' : $field['single_mm']; ?>" />
|
101 |
-
</td>
|
102 |
-
|
103 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days">
|
104 |
-
<input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][single_dd]" placeholder="<?php _e('25','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'dd', 'woocommerce-checkout-manager' ); ?>" value="<?php echo (empty($field['single_dd'])) ? '' : $field['single_dd']; ?>" />
|
105 |
-
</td>
|
106 |
-
|
107 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days">
|
108 |
-
<span class="spongagge"><?php _e( 'Max Date', 'woocommerce-checkout-manager' ); ?></span>
|
109 |
-
</td>
|
110 |
-
|
111 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days">
|
112 |
-
<input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][single_max_yy]" placeholder="<?php _e('2013','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'yy', 'woocommerce-checkout-manager' ); ?>" value="<?php echo (empty( $field['single_max_yy'])) ? '' : $field['single_max_yy']; ?>" />
|
113 |
-
</td>
|
114 |
-
|
115 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days">
|
116 |
-
<input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][single_max_mm]" placeholder="<?php _e('10','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'mm', 'woocommerce-checkout-manager' ); ?>" value="<?php echo (empty( $field['single_max_mm'])) ? '' : $field['single_max_mm']; ?>" />
|
117 |
-
</td>
|
118 |
-
|
119 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days">
|
120 |
-
<input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][single_max_dd]" placeholder="<?php _e('25','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'dd', 'woocommerce-checkout-manager' ); ?>" value="<?php echo (empty( $field['single_max_dd'])) ? '' : $field['single_max_dd']; ?>" />
|
121 |
-
</td>
|
122 |
-
|
123 |
-
<td class="more_toggler1" style="text-align:center;">
|
124 |
-
<input name="wccs_settings[buttons][<?php echo $i; ?>][checkbox]" type="checkbox" title="<?php _e( 'Whether or not the Checkout field is required', 'woocommerce-checkout-manager' ); ?>" value="true" <?php if ( !empty ($field['checkbox'])) echo "checked='checked'"; ?> />
|
125 |
-
</td>
|
126 |
-
|
127 |
-
<td class="more_toggler1" style="text-align:center;">
|
128 |
-
<select name="wccs_settings[buttons][<?php echo $i; ?>][position]" title="<?php _e( 'Placement of the Checkout field', 'woocommerce-checkout-manager' ); ?>"> <!--Call run() function-->
|
129 |
-
<option value="form-row-wide" <?php ( !isset( $field['position'] ) ) ? '' : selected( $field['position'], 'form-row-wide' ); ?>><?php _e( 'Wide','woocommerce-checkout-manager' ); ?></option>
|
130 |
-
<option value="form-row-first" <?php ( !isset( $field['position'] ) ) ? '' : selected( $field['position'], 'form-row-first' ); ?>><?php _e( 'Left','woocommerce-checkout-manager' ); ?></option>
|
131 |
-
<option value="form-row-last" <?php ( !isset( $field['position'] ) ) ? '' : selected( $field['position'], 'form-row-last' ); ?>><?php _e( 'Right','woocommerce-checkout-manager' ); ?></option>
|
132 |
-
</select>
|
133 |
-
</td>
|
134 |
-
|
135 |
-
<td class="more_toggler1" style="text-align:center;">
|
136 |
-
<input name="wccs_settings[buttons][<?php echo $i; ?>][clear_row]" type="checkbox" title="<?php _e( 'Applies a clear fix to the Checkout field', 'woocommerce-checkout-manager' ); ?>" value="true" <?php if ( !empty ($field['clear_row'])) echo "checked='checked'"; ?> />
|
137 |
-
</td>
|
138 |
-
|
139 |
-
<td class="filter_field" style="display:none;text-align:center;">
|
140 |
-
<input name="wccs_settings[buttons][<?php echo $i; ?>][deny_checkout]" type="checkbox" value="true" <?php if( !empty( $field['deny_checkout'] ) ) echo "checked='checked'"; ?> />
|
141 |
-
</td>
|
142 |
-
|
143 |
-
<td class="filter_field_tog add_amount_field condition_tick hide_stuff_time hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c" style="display:none;">
|
144 |
-
<?php _e('Filter Toggler', 'woocommerce-checkout-manager' ); ?>
|
145 |
-
</td>
|
146 |
-
|
147 |
-
<td class="filter_field" style="display:none;text-align:center;">
|
148 |
-
<input name="wccs_settings[buttons][<?php echo $i; ?>][tax_remove]" type="checkbox" value="true" <?php if ( !empty ($field['tax_remove'])) echo "checked='checked'"; ?> />
|
149 |
-
</td>
|
150 |
-
|
151 |
-
<td class="filter_field" style="display:none;text-align:center;">
|
152 |
-
<input name="wccs_settings[buttons][<?php echo $i; ?>][deny_receipt]" type="checkbox" value="true" <?php if ( !empty ($field['deny_receipt'])) echo "checked='checked'"; ?> />
|
153 |
-
</td>
|
154 |
-
<!--
|
155 |
-
<td class="filter_field condition_tick hide_stuff_change hide_stuff_time hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c" style="display:none;text-align:center;">
|
156 |
-
<input name="wccs_settings[buttons][<?php echo $i; ?>][add_amount]" type="checkbox" value="true" <?php if ( !empty ($field['add_amount'])) echo "checked='checked'"; ?> />
|
157 |
-
</td>
|
158 |
-
-->
|
159 |
-
<td class="add_amount_field" style="display:none;text-align:center;">
|
160 |
-
<input name="wccs_settings[buttons][<?php echo $i; ?>][fee_name]" type="text" value="<?php echo $field['fee_name']; ?>" placeholder="<?php _e('My Custom Charge','woocommerce-checkout-manager'); ?>" />
|
161 |
-
</td>
|
162 |
-
|
163 |
-
<td class="add_amount_field" style="display:none;text-align:center;">
|
164 |
-
<input name="wccs_settings[buttons][<?php echo $i; ?>][add_amount_field]" type="text" value="<?php echo $field['add_amount_field']; ?>" placeholder="50" />
|
165 |
-
</td>
|
166 |
-
|
167 |
-
<td class="filter_field add_amount_field hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_time hide_stuff_color more_toggler1 more_toggler1c" style="display:none;text-align:center;">
|
168 |
-
<input name="wccs_settings[buttons][<?php echo $i; ?>][conditional_parent_use]" type="checkbox" value="true" <?php if ( !empty ($field['conditional_parent_use'])) echo "checked='checked'"; ?> />
|
169 |
-
</td>
|
170 |
-
|
171 |
-
<td class="condition_tick" style="display:none;text-align:center;">
|
172 |
-
<input name="wccs_settings[buttons][<?php echo $i; ?>][conditional_parent]" type="checkbox" value="true" <?php if ( !empty ($field['conditional_parent'])) echo "checked='checked'"; ?> />
|
173 |
-
</td>
|
174 |
-
|
175 |
-
<td class="more_toggler1">
|
176 |
-
<input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][label]" title="<?php _e( 'Label text for the Checkout field', 'woocommerce-checkout-manager' ); ?>" placeholder="<?php _e('My Field Name','woocommerce-checkout-manager'); ?>" value="<?php echo esc_attr( $field['label'] ); ?>" />
|
177 |
-
</td>
|
178 |
-
|
179 |
-
<td class="more_toggler1">
|
180 |
-
<input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][placeholder]" title="<?php _e( 'Placeholder text for the Checkout field', 'woocommerce-checkout-manager' ); ?>" placeholder="<?php _e('Example red','woocommerce-checkout-manager'); ?>" value="<?php echo (empty($field['placeholder'])) ? '' : $field['placeholder']; ?>" <?php if ( $field['cow'] == 'country' || $field['cow'] == 'state' ) { echo 'readonly="readonly"'; } ?> />
|
181 |
-
</td>
|
182 |
-
|
183 |
-
<td style="display:none;" class="filter_field add_amount_field hide_stuff_time hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c condition_tick add_amount_field">
|
184 |
-
<input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][chosen_valt]" placeholder="<?php _e('Yes','woocommerce-checkout-manager'); ?>" value="<?php echo $field['chosen_valt']; ?>" />
|
185 |
-
</td>
|
186 |
-
|
187 |
-
<td style="display:none;" class="condition_tick">
|
188 |
-
<input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][conditional_tie]" placeholder="<?php _e('Parent Abbr. Name','woocommerce-checkout-manager'); ?>" value="<?php echo $field['conditional_tie']; ?>" />
|
189 |
-
</td>
|
190 |
-
|
191 |
-
<td style="display:none;" class="filter_field">
|
192 |
-
<input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][colorpickerd]" id="billing-colorpic<?php echo $i; ?>" placeholder="<?php _e('#000000','woocommerce-checkout-manager'); ?>" value="<?php echo $field['colorpickerd']; ?>" />
|
193 |
-
</td>
|
194 |
-
|
195 |
-
<td style="display:none;" class="filter_field">
|
196 |
-
<select name="wccs_settings[buttons][<?php echo $i; ?>][colorpickertype]">
|
197 |
-
<option value="farbtastic" <?php (!isset($field['colorpickertype'])) ? '' : selected( $field['colorpickertype'], 'farbtastic' ); ?>><?php _e('Farbtastic','woocommerce-checkout-manager'); ?></option>
|
198 |
-
<option value="iris" <?php (!isset($field['colorpickertype'])) ? '' : selected( $field['colorpickertype'], 'iris' ); ?>><?php _e('Iris','woocommerce-checkout-manager'); ?></option>
|
199 |
-
</select>
|
200 |
-
</td>
|
201 |
-
|
202 |
-
<td style="display:none;text-align:center;" class="filter_field">
|
203 |
-
<input name="wccs_settings[buttons][<?php echo $i; ?>][user_role]" type="checkbox" value="user_role" <?php if ( !empty ($field['user_role'])) echo "checked='checked'"; ?> />
|
204 |
-
</td>
|
205 |
-
|
206 |
-
<td class="filter_field" style="display:none;">
|
207 |
-
<input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][role_options]" placeholder="Option 1||Option 2||Option 3" value="<?php echo $field['role_options']; ?>" />
|
208 |
-
</td>
|
209 |
-
|
210 |
-
<td class="filter_field" style="display:none;">
|
211 |
-
<input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][role_options2]" placeholder="Option 1||Option 2||Option 3" value="<?php echo $field['role_options2']; ?>" />
|
212 |
-
</td>
|
213 |
-
|
214 |
-
<td style="display:none;" class="filter_field add_amount_field hide_stuff_time hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c condition_tick add_amount_field">
|
215 |
-
<input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][extra_class]" value="<?php echo $field['extra_class']; ?>" />
|
216 |
-
</td>
|
217 |
-
|
218 |
-
<td style="display:none;" class="hide_stuff_change">
|
219 |
-
<input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][changenamep]" id="billing-colorpic<?php echo $i; ?>" placeholder="<?php _e( 'Billing Details', 'woocommerce-checkout-manager' ); ?>" value="<?php echo $field['changenamep']; ?>" />
|
220 |
-
</td>
|
221 |
-
|
222 |
-
<td style="display:none;" class="hide_stuff_change">
|
223 |
-
<input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][changename]" id="billing-colorpic<?php echo $i; ?>" placeholder="<?php _e( 'Bill Form', 'woocommerce-checkout-manager' ); ?>" value="<?php echo $field['changename']; ?>" />
|
224 |
-
</td>
|
225 |
-
|
226 |
-
<td style="display:none;text-align:center;" class="hide_stuff_op wccm1">
|
227 |
-
<input name="wccs_settings[buttons][<?php echo $i; ?>][fancy]" type="checkbox" value="country_select" <?php if ( !empty ($field['fancy'])) echo "checked='checked'"; ?> />
|
228 |
-
</td>
|
229 |
-
|
230 |
-
<td class="hide_stuff_op wccm1" style="display:none;">
|
231 |
-
<input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][force_title2]" placeholder="<?php _e( 'Name Guide', 'woocommerce-checkout-manager' ); ?>" value="<?php echo (empty($field['force_title2'])) ? '' : $field['force_title2']; ?>" />
|
232 |
-
</td>
|
233 |
-
|
234 |
-
<td class="hide_stuff_op wccm1" style="display:none;">
|
235 |
-
<input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][option_array]" placeholder="Option 1||Option 2||Option 3" value="<?php echo $field['option_array']; ?>" />
|
236 |
-
</td>
|
237 |
-
|
238 |
-
<td class="filter_field add_amount_field hide_stuff_time condition_tick hide_stuff_change hide_stuff_opcheck hide_stuff_color more_toggler1 more_toggler1c" style="display:none;">
|
239 |
-
<?php _e('Options Toggler', 'woocommerce-checkout-manager' ); ?>
|
240 |
-
</td>
|
241 |
-
|
242 |
-
<td class="filter_field add_amount_field hide_stuff_time condition_tick hide_stuff_change_tog hide_stuff_timef hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c" style="display:none;">
|
243 |
-
<?php _e('Swapper Toggler', 'woocommerce-checkout-manager' ); ?>
|
244 |
-
</td>
|
245 |
-
|
246 |
-
<!--<td class="filter_field add_amount_field condition_tick hide_stuff_change hide_stuff_timef hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c" style="display:none;">
|
247 |
-
<?php _e('Time Toggler', 'woocommerce-checkout-manager' ); ?>
|
248 |
-
</td>
|
249 |
-
|
250 |
-
<td class="filter_field add_amount_field hide_stuff_time condition_tick hide_stuff_change hide_stuff_opcheck hide_stuff_op more_toggler1 more_toggler1c hide_stuff_days" style="display:none;">
|
251 |
-
<?php _e('Date Toggler', 'woocommerce-checkout-manager' ); ?>
|
252 |
-
</td>-->
|
253 |
-
|
254 |
-
<td style="display:none;" class="filter_field add_amount_field hide_stuff_time condition_tick hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1">
|
255 |
-
<?php _e('Hidden Toggler', 'woocommerce-checkout-manager' ); ?>
|
256 |
-
</td>
|
257 |
-
|
258 |
-
<td class="filter_field add_amount_field condition_tick hide_stuff_time hide_stuff_change hide_stuff_opcheck hide_stuff_color hide_stuff_op more_toggler more_toggler1c" title="<?php _e( 'Open additional options for this Checkout field', 'woocommerce-checkout-manager' ); ?>">
|
259 |
-
<?php _e('More Toggler', 'woocommerce-checkout-manager' ); ?>
|
260 |
-
</td>
|
261 |
-
|
262 |
-
<td class="more_toggler1">
|
263 |
-
<select name="wccs_settings[buttons][<?php echo $i; ?>][type]" title="<?php _e( 'Type of the Checkout field', 'woocommerce-checkout-manager' ); ?>">
|
264 |
-
<option value="wooccmtext" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'wooccmtext' ); ?>><?php _e('Text Input','woocommerce-checkout-manager'); ?></option>
|
265 |
-
<option value="wooccmtextarea" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'wooccmtextarea' ); ?>><?php _e('Textarea','woocommerce-checkout-manager'); ?></option>
|
266 |
-
<option value="wooccmpassword" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'wooccmpassword' ); ?>><?php _e('Password','woocommerce-checkout-manager'); ?></option>
|
267 |
-
<option value="wooccmradio" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'wooccmradio' ); ?>><?php _e('Radio Buttons','woocommerce-checkout-manager'); ?></option>
|
268 |
-
<option value="checkbox_wccm" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'checkbox_wccm' ); ?>><?php _e('Check Box','woocommerce-checkout-manager'); ?></option>
|
269 |
-
<option value="wooccmselect" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'wooccmselect' ); ?>><?php _e('Select Options','woocommerce-checkout-manager'); ?></option>
|
270 |
-
<!--<option value="datepicker" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'datepicker' ); ?>><?php _e('Date Picker','woocommerce-checkout-manager'); ?></option>
|
271 |
-
<option value="changename" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'changename' ); ?>><?php _e('Text/ Html Swapper','woocommerce-checkout-manager'); ?></option>-->
|
272 |
-
<option value="time" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'time' ); ?>><?php _e('Time Picker','woocommerce-checkout-manager'); ?></option>
|
273 |
-
<option value="colorpicker" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'colorpicker' ); ?>><?php _e('Color Picker','woocommerce-checkout-manager'); ?></option>
|
274 |
-
<option value="heading" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'heading' ); ?>><?php _e('Heading','woocommerce-checkout-manager'); ?></option>
|
275 |
-
<option value="multiselect" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'multiselect' ); ?>><?php _e('Multi-Select','woocommerce-checkout-manager'); ?></option>
|
276 |
-
<option value="multicheckbox" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'multicheckbox' ); ?>><?php _e('Multi-Checkbox','woocommerce-checkout-manager'); ?></option>
|
277 |
-
<option value="wooccmcountry" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'wooccmcountry' ); ?>><?php _e('Country','woocommerce-checkout-manager'); ?></option>
|
278 |
-
<option value="wooccmstate" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'wooccmstate' ); ?>><?php _e('State','woocommerce-checkout-manager'); ?></option>
|
279 |
-
<option value="wooccmupload" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'wooccmupload' ); ?>><?php _e('File Picker','woocommerce-checkout-manager'); ?></option>
|
280 |
-
</select>
|
281 |
-
</td>
|
282 |
-
|
283 |
-
<td class="more_toggler1">
|
284 |
-
<input type="text" name="wccs_settings[buttons][<?php echo $i; ?>][cow]" placeholder="MyField" title="<?php _e( 'To edit Abbreviations open General > Switches > Editing Of Abbreviation Fields.', 'woocommerce-checkout-manager' ); ?>" value="<?php echo $field['cow']; ?>" <?php if ( empty($options['checkness']['abbreviation'])) { echo 'readonly="readonly"'; } ?> />
|
285 |
-
</td>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/templates/admin/woocheckout-additional-thead.php
DELETED
@@ -1,154 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* WooCommerce Checkout Manager
|
4 |
-
*/
|
5 |
-
|
6 |
-
// Exit if accessed directly
|
7 |
-
if ( !defined( 'ABSPATH' ) ) exit;
|
8 |
-
?>
|
9 |
-
|
10 |
-
<th class="more_toggler1c" style="display:none;width: 5%;"><?php _e('More' , 'woocommerce-checkout-manager' ); ?></th>
|
11 |
-
|
12 |
-
<th class="more_toggler1c hidefieldproduct" style="display:none;width: 17%;"><?php _e('Hide Field from Product' , 'woocommerce-checkout-manager' ); ?></th>
|
13 |
-
|
14 |
-
<th class="more_toggler1c" style="display:none;width: 17%;"><?php _e('Show Field for Product' , 'woocommerce-checkout-manager' ); ?></th>
|
15 |
-
|
16 |
-
<th class="more_toggler1c hidefieldcat" style="display:none;width: 20%;"><?php _e('Hide Field from Category' , 'woocommerce-checkout-manager' ); ?></th>
|
17 |
-
|
18 |
-
<th class="more_toggler1c" style="display:none;width: 20%;"><?php _e('Show Field for Category' , 'woocommerce-checkout-manager' ); ?></th>
|
19 |
-
|
20 |
-
<th class="hide_stuff_time" style="display:none;width: 16%;"><?php _e('Start Hour' , 'woocommerce-checkout-manager' ); ?></th>
|
21 |
-
|
22 |
-
<th class="hide_stuff_time" style="display:none;width: 16%;"><?php _e('End Hour' , 'woocommerce-checkout-manager' ); ?></th>
|
23 |
-
|
24 |
-
<th class="hide_stuff_time" style="display:none;width: 16%;"><?php _e('Interval Min.' , 'woocommerce-checkout-manager' ); ?></th>
|
25 |
-
|
26 |
-
<th class="hide_stuff_time" style="display:none;width: 16%;"><?php _e('Manual Min.' , 'woocommerce-checkout-manager' ); ?></th>
|
27 |
-
|
28 |
-
<th class="hide_stuff_color hide_stuff_days" style="display:none;width: 16%;"><?php _e('Date Format' , 'woocommerce-checkout-manager' ); ?></th>
|
29 |
-
|
30 |
-
<th class="hide_stuff_color hide_stuff_days" style="display:none;width: 5%;"><?php _e('Days before' , 'woocommerce-checkout-manager' ); ?></th>
|
31 |
-
|
32 |
-
<th class="hide_stuff_color hide_stuff_days" style="display:none;width: 5%;"><?php _e('Days After' , 'woocommerce-checkout-manager' ); ?></th>
|
33 |
-
|
34 |
-
<th class="hide_stuff_color daoo" style="display:none;width: 7%;"><?php _e('Days Enabler' , 'woocommerce-checkout-manager' ); ?></th>
|
35 |
-
|
36 |
-
<th class="hide_stuff_days" style="display:none;width: 7%;"><?php _e('Sundays' , 'woocommerce-checkout-manager' ); ?></th>
|
37 |
-
|
38 |
-
<th class="hide_stuff_days" style="display:none;width: 7%;"><?php _e('Mondays' , 'woocommerce-checkout-manager' ); ?></th>
|
39 |
-
|
40 |
-
<th class="hide_stuff_days" style="display:none;width: 7%;"><?php _e('Tuesdays' , 'woocommerce-checkout-manager' ); ?></th>
|
41 |
-
|
42 |
-
<th class="hide_stuff_days" style="display:none;width: 7%;"><?php _e('Wednesdays' , 'woocommerce-checkout-manager' ); ?></th>
|
43 |
-
|
44 |
-
<th class="hide_stuff_days" style="display:none;width: 7%;"><?php _e('Thursdays' , 'woocommerce-checkout-manager' ); ?></th>
|
45 |
-
|
46 |
-
<th class="hide_stuff_days" style="display:none;width: 7%;"><?php _e('Fridays' , 'woocommerce-checkout-manager' ); ?></th>
|
47 |
-
|
48 |
-
<th class="hide_stuff_days" style="display:none;width: 7%;"><?php _e('Satudays' , 'woocommerce-checkout-manager' ); ?></th>
|
49 |
-
|
50 |
-
<th class="hide_stuff_color separator hide_stuff_days" style="display:none;" width="3%"><?php _e('' , 'woocommerce-checkout-manager' ); ?></th>
|
51 |
-
|
52 |
-
<th class="hide_stuff_color hide_stuff_days" style="display:none;text-align:center;" width="5%"><?php _e('YY' , 'woocommerce-checkout-manager' ); ?></th>
|
53 |
-
|
54 |
-
<th class="hide_stuff_color hide_stuff_days" style="display:none;" width="4%"><?php _e('MM' , 'woocommerce-checkout-manager' ); ?></th>
|
55 |
-
|
56 |
-
<th class="hide_stuff_color hide_stuff_days" style="display:none;" width="4%"><?php _e('DD' , 'woocommerce-checkout-manager' ); ?></th>
|
57 |
-
|
58 |
-
<th class="hide_stuff_color separator hide_stuff_days" style="display:none;" width="3%"><?php _e('' , 'woocommerce-checkout-manager' ); ?></th>
|
59 |
-
|
60 |
-
<th class="hide_stuff_color hide_stuff_days" style="display:none;text-align:center;" width="5%"><?php _e('YY' , 'woocommerce-checkout-manager' ); ?></th>
|
61 |
-
|
62 |
-
<th class="hide_stuff_color hide_stuff_days" style="display:none;" width="4%"><?php _e('MM' , 'woocommerce-checkout-manager' ); ?></th>
|
63 |
-
|
64 |
-
<th class="hide_stuff_color hide_stuff_days" style="display:none;" width="4%"><?php _e('DD' , 'woocommerce-checkout-manager' ); ?></th>
|
65 |
-
|
66 |
-
<th class="more_toggler1" width="8%"><?php _e('Required' , 'woocommerce-checkout-manager' ); ?></th>
|
67 |
-
|
68 |
-
<th class="more_toggler1" width="5%"><?php _e('Position' , 'woocommerce-checkout-manager' ); ?></th>
|
69 |
-
|
70 |
-
<th class="more_toggler1" width="5%"><?php _e('Clear' , 'woocommerce-checkout-manager' ); ?></th>
|
71 |
-
|
72 |
-
<th class="filter_field" style="display:none;" width="5%"><?php _e('Deny Checkout' , 'woocommerce-checkout-manager' ); ?></th>
|
73 |
-
|
74 |
-
<th style="cursor: pointer; text-align: center; font-size: 30px;display:none;" class="filter_field_tog add_amount_field condition_tick hide_stuff_time hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c" style="display:none;" width="5%">
|
75 |
-
<span class="toggle_shower">≡</span>
|
76 |
-
</th>
|
77 |
-
|
78 |
-
<th class="filter_field" style="display:none;" width="5%"><?php _e('Remove Tax' , 'woocommerce-checkout-manager' ); ?></th>
|
79 |
-
|
80 |
-
<th class="filter_field" style="display:none;" width="5%"><?php _e('Deny Receipt' , 'woocommerce-checkout-manager' ); ?></th>
|
81 |
-
<!--
|
82 |
-
<th class="filter_field condition_tick hide_stuff_change hide_stuff_time hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c add_amount" style="display:none;" width="5%"><?php _e('Add Amount' , 'woocommerce-checkout-manager' ); ?></th>
|
83 |
-
-->
|
84 |
-
<th class="add_amount_field" style="display:none;" width="5%"><?php _e('Amount Name' , 'woocommerce-checkout-manager' ); ?></th>
|
85 |
-
|
86 |
-
<th class="add_amount_field" style="display:none;" width="5%"><?php _e('Enter Amount' , 'woocommerce-checkout-manager' ); ?></th>
|
87 |
-
|
88 |
-
<th class="filter_field add_amount_field hide_stuff_change hide_stuff_time hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c apply_tick" style="display:none;" width="9%"><?php _e('Conditional' , 'woocommerce-checkout-manager' ); ?></th>
|
89 |
-
|
90 |
-
<th class="condition_tick" style="display:none;" width="9%"><?php _e('Conditional Parent' , 'woocommerce-checkout-manager' ); ?></th>
|
91 |
-
|
92 |
-
<th class="more_toggler1"><?php _e('Label' , 'woocommerce-checkout-manager' ); ?></th>
|
93 |
-
|
94 |
-
<th class="more_toggler1"><?php _e('Placeholder' , 'woocommerce-checkout-manager' ); ?></th>
|
95 |
-
|
96 |
-
<th style="display:none; width: 10%;" class="filter_field add_amount_field hide_stuff_time hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c condition_tick add_amount_field"><?php _e('Chosen Value' , 'woocommerce-checkout-manager' ); ?></th>
|
97 |
-
|
98 |
-
<th style="display:none;" class="condition_tick" width="16%"><?php _e('Conditional Tie' , 'woocommerce-checkout-manager' ); ?></th>
|
99 |
-
|
100 |
-
<th style="display:none;width:5%;" class="filter_field" width="1%"><?php _e('Default Color' , 'woocommerce-checkout-manager' ); ?></th>
|
101 |
-
|
102 |
-
<th style="display:none;" class="filter_field" width="5%"><?php _e('Picker Type' , 'woocommerce-checkout-manager' ); ?></th>
|
103 |
-
|
104 |
-
<th style="display:none;" class="filter_field" width="5%"><?php _e('User Role' , 'woocommerce-checkout-manager' ); ?></th>
|
105 |
-
|
106 |
-
<th class="filter_field roles" style="display:none;" width="15%">
|
107 |
-
<?php _e('Show for Roles (Separated by ' , 'woocommerce-checkout-manager' ); ?><span class="toggle_shower current_opener">||</span> )
|
108 |
-
</th>
|
109 |
-
|
110 |
-
<th class="filter_field" style="display:none;" width="15%">
|
111 |
-
<?php _e('Hide from Roles (Separated by ' , 'woocommerce-checkout-manager' ); ?><span class="toggle_shower current_opener">||</span> )
|
112 |
-
</th>
|
113 |
-
|
114 |
-
<th style="display:none;" class="filter_field add_amount_field hide_stuff_time hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c condition_tick add_amount_field" width="13%"><?php _e('Class' , 'woocommerce-checkout-manager' ); ?></th>
|
115 |
-
|
116 |
-
<th class="hide_stuff_change" style="display:none;"><?php _e('Input Name' , 'woocommerce-checkout-manager' ); ?></th>
|
117 |
-
|
118 |
-
<th class="hide_stuff_change" style="display:none;"><?php _e('Change Name to' , 'woocommerce-checkout-manager' ); ?></th>
|
119 |
-
|
120 |
-
<th class="hide_stuff_op wccm1" style="display:none;" width="10%"><?php _e('Adapt' , 'woocommerce-checkout-manager' ); ?></th>
|
121 |
-
|
122 |
-
<th class="hide_stuff_op wccm1" style="display:none;" width="10%"><?php _e('Title' , 'woocommerce-checkout-manager' ); ?></th>
|
123 |
-
|
124 |
-
<th class="hide_stuff_op wccm1" style="display:none;" width="60%">
|
125 |
-
<?php _e('List of Options (Separated by ' , 'woocommerce-checkout-manager' ); ?> <span class="toggle_shower current_opener">||</span> )
|
126 |
-
</th>
|
127 |
-
|
128 |
-
<th style="cursor:pointer;text-align:center;font-size:30px;display:none;" class="filter_field add_amount_field condition_tick hide_stuff_change hide_stuff_time hide_stuff_opcheck hide_stuff_tog hide_stuff_color more_toggler1 more_toggler1c" width="2%">
|
129 |
-
<span class="toggle_shower">≡</span>
|
130 |
-
</th>
|
131 |
-
|
132 |
-
<th style="cursor:pointer;text-align:center;font-size:30px;display:none;" class="filter_field add_amount_field condition_tick hide_stuff_opcheck hide_stuff_time hide_stuff_op hide_stuff_change_tog hide_stuff_color more_toggler1 more_toggler1c" width="2%">
|
133 |
-
<span class="toggle_shower">≡</span>
|
134 |
-
</th>
|
135 |
-
<!--
|
136 |
-
<th style="cursor:pointer;text-align:center;font-size:30px;display:none;" class="filter_field add_amount_field condition_tick hide_stuff_opcheck hide_stuff_op hide_stuff_change hide_stuff_time_tog hide_stuff_color more_toggler1 more_toggler1c" width="2%">
|
137 |
-
<span class="toggle_shower">≡</span>
|
138 |
-
</th>
|
139 |
-
|
140 |
-
<th style="cursor:pointer;text-align:center;font-size:30px;display:none;" class="filter_field add_amount_field hide_stuff_time condition_tick hide_stuff_change hide_stuff_opcheck hide_stuff_days hide_stuff_color_tog hide_stuff_op more_toggler1 more_toggler1c" width="2%">
|
141 |
-
<span class="toggle_shower">≡</span>
|
142 |
-
</th>
|
143 |
-
-->
|
144 |
-
<th style="display:none;cursor:pointer;text-align:center;font-size:30px;" class="filter_field add_amount_field condition_tick hide_stuff_change hide_stuff_opcheck hide_stuff_time hide_stuff_op hide_stuff_color more_toggler1 more_toggler1a" width="2%">
|
145 |
-
<span class="toggle_shower">≡</span>
|
146 |
-
</th>
|
147 |
-
|
148 |
-
<th style="cursor:pointer;text-align:center;font-size:30px;" class="filter_field add_amount_field hide_stuff_time condition_tick hide_stuff_change hide_stuff_opcheck hide_stuff_color more_toggler hide_stuff_op more_toggler1c" width="2%">
|
149 |
-
<span class="toggle_shower">≡</span>
|
150 |
-
</th>
|
151 |
-
|
152 |
-
<th class="more_toggler1" style="width:10%;"><?php _e('Choose Type' , 'woocommerce-checkout-manager' ); ?></th>
|
153 |
-
|
154 |
-
<th class="more_toggler1" style="width:5%"><?php _e('Abbreviation' , 'woocommerce-checkout-manager' ); ?></th>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/templates/admin/woocheckout-additional.php
DELETED
@@ -1,65 +0,0 @@
|
|
1 |
-
<table class="widefat wccs-table additional-semi" style="display:none;" border="1" name="additional_table">
|
2 |
-
<thead>
|
3 |
-
|
4 |
-
<tr>
|
5 |
-
<th style="width:3%;" class="wccs-order" title="<?php esc_attr_e('Change the order of Checkout fields', 'woocommerce-checkout-manager'); ?>">#</th>
|
6 |
-
|
7 |
-
<?php require( WOOCCM_PLUGIN_DIR . 'includes/templates/admin/woocheckout-additional-thead.php' ); ?>
|
8 |
-
|
9 |
-
<th width="1%" scope="col" title="<?php esc_attr_e('Remove button', 'woocommerce-checkout-manager'); ?>"><strong>X</strong><!-- remove --></th>
|
10 |
-
</tr>
|
11 |
-
|
12 |
-
</thead>
|
13 |
-
<tbody>
|
14 |
-
|
15 |
-
<?php
|
16 |
-
if ($fields = WOOCCM()->field->additional->get_fields('old')) {
|
17 |
-
|
18 |
-
foreach ($fields as $i => $field) {
|
19 |
-
?>
|
20 |
-
|
21 |
-
<tr valign="top" id="wccs-additional-id-<?php echo $i; ?>" class="wccs-row">
|
22 |
-
|
23 |
-
<td style="display:none;" class="wccs-order-hidden" >
|
24 |
-
<input type="hidden" name="wccs_settings[buttons][<?php echo $i; ?>][order]" value="<?php echo ( empty($field['order']) ) ? $i : $field['order']; ?>" />
|
25 |
-
</td>
|
26 |
-
<td class="wccs-order" title="<?php esc_attr_e('Drag-and-drop this Checkout field to adjust its ordering', 'woocommerce-checkout-manager'); ?>"><?php echo $i + 1; ?></td>
|
27 |
-
|
28 |
-
<?php require( WOOCCM_PLUGIN_DIR . 'includes/templates/admin/woocheckout-additional-tbody.php' ); ?>
|
29 |
-
|
30 |
-
<td class="wccs-remove"><a class="wccs-remove-button" href="javascript:;" title="<?php esc_attr_e('Delete this Checkout field', 'woocommerce-checkout-manager'); ?>">×</a></td>
|
31 |
-
|
32 |
-
</tr>
|
33 |
-
<!-- #wccs-additional-id-<?php echo $i; ?> .wccs-row -->
|
34 |
-
|
35 |
-
<?php
|
36 |
-
}
|
37 |
-
}
|
38 |
-
?>
|
39 |
-
|
40 |
-
<?php
|
41 |
-
$i = 999;
|
42 |
-
?>
|
43 |
-
|
44 |
-
<tr valign="top" id="wccs-additional-id-<?php echo $i; ?>" class="wccs-clone">
|
45 |
-
|
46 |
-
<td style="display:none;" class="wccs-order-hidden">
|
47 |
-
<input type="hidden" name="wccs_settings[buttons][<?php echo $i; ?>][order]" value="<?php echo $i; ?>" />
|
48 |
-
</td>
|
49 |
-
|
50 |
-
<td class="wccs-order" title="<?php esc_attr_e('Drag-and-drop this Checkout field to adjust its ordering', 'woocommerce-checkout-manager'); ?>"><?php echo $i; ?></td>
|
51 |
-
|
52 |
-
<?php require( WOOCCM_PLUGIN_DIR . 'includes/templates/admin/woocheckout-additional-clone.php' ); ?>
|
53 |
-
|
54 |
-
<td class="wccs-remove"><a class="wccs-remove-button" href="javascript:;" title="<?php esc_attr_e('Delete this Checkout field', 'woocommerce-checkout-manager'); ?>">×</a></td>
|
55 |
-
|
56 |
-
</tr>
|
57 |
-
<!-- #wccs-additional-id-<?php echo $i; ?> .wccs-clone -->
|
58 |
-
</tbody>
|
59 |
-
</table>
|
60 |
-
<!-- .widefat -->
|
61 |
-
|
62 |
-
<div class="wccs-table-footer additional-semi" style="display:none;">
|
63 |
-
<a href="javascript:;" id="wccs-add-button" class="button-secondary"><?php _e('+ Add New Field', 'woocommerce-checkout-manager'); ?></a>
|
64 |
-
</div>
|
65 |
-
<!-- .wccs-table-footer -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/templates/admin/woocheckout-billing-clone.php
DELETED
@@ -1,160 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* WooCommerce Checkout Manager
|
4 |
-
*
|
5 |
-
*/
|
6 |
-
|
7 |
-
// Exit if accessed directly
|
8 |
-
if ( !defined( 'ABSPATH' ) )
|
9 |
-
exit;
|
10 |
-
?>
|
11 |
-
|
12 |
-
<td style="display:none;text-align:center;" class="more_toggler1c"><input type="checkbox" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][more_content]" title="<?php esc_attr_e( 'More than two content', 'woocommerce-checkout-manager' ); ?>" value="" /></td>
|
13 |
-
|
14 |
-
<td style="display:none;" class="more_toggler1c"><input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][single_p]" placeholder="<?php _e('Product ID(s) e.g 1674||1233','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'Hide field from this Products Only', 'woocommerce-checkout-manager' ); ?>" value="" /></td>
|
15 |
-
|
16 |
-
<td style="display:none;" class="more_toggler1c"><input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][single_px]" placeholder="<?php _e('Product ID(s) e.g 1674||1233','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'Display Field for these Products Only', 'woocommerce-checkout-manager' ); ?>" value="" /></td>
|
17 |
-
|
18 |
-
<td style="display:none;" class="more_toggler1c"><input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][single_p_cat]" placeholder="<?php _e('Category Slug(s) e.g my-cat||my-cat2','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'Hide field from Category', 'woocommerce-checkout-manager' ); ?>" value="" /></td>
|
19 |
-
|
20 |
-
<td style="display:none;" class="more_toggler1c"><input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][single_px_cat]" placeholder="<?php _e('Category Slug(s) e.g my-cat||my-cat2','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'Show Field for Category', 'woocommerce-checkout-manager' ); ?>" value="" /></td>
|
21 |
-
|
22 |
-
<td style="display:none;" class="hide_stuff_time"><input type="text" placeholder="6" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][start_hour]" value="" /></td>
|
23 |
-
|
24 |
-
<td style="display:none;" class="hide_stuff_time"><input type="text" placeholder="9" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][end_hour]" value="" /></td>
|
25 |
-
|
26 |
-
<td style="display:none;" class="hide_stuff_time"><input type="text" placeholder="15" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][interval_min]" value="" /></td>
|
27 |
-
|
28 |
-
<td style="display:none;" class="hide_stuff_time"><input type="text" placeholder="0, 10, 20, 30, 40" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][manual_min]" value="" /></td>
|
29 |
-
|
30 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days"><input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][format_date]" placeholder="dd-mm-yy" title="dd-mm-yy" value="" /></td>
|
31 |
-
|
32 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days"><input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][min_before]" placeholder="+3" title="Days Before" value="" /></td>
|
33 |
-
|
34 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days"><input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][max_after]" placeholder="3" title="Days After" value="" /></td>
|
35 |
-
|
36 |
-
<td style="display:none;text-align:center;" class="hide_stuff_color daoo"><input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][days_disabler]" type="checkbox" value="" /></td>
|
37 |
-
|
38 |
-
<td style="display:none;text-align:center;" class="hide_stuff_days"><input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][days_disabler0]" type="checkbox" value="" /></td>
|
39 |
-
|
40 |
-
<td style="display:none;text-align:center;" class="hide_stuff_days"><input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][days_disabler1]" type="checkbox" value="" /></td>
|
41 |
-
|
42 |
-
<td style="display:none;text-align:center;" class="hide_stuff_days"><input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][days_disabler2]" type="checkbox" value="" /></td>
|
43 |
-
|
44 |
-
<td style="display:none;text-align:center;" class="hide_stuff_days"><input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][days_disabler3]" type="checkbox" value="" /></td>
|
45 |
-
|
46 |
-
<td style="display:none;text-align:center;" class="hide_stuff_days"><input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][days_disabler4]" type="checkbox" value="" /></td>
|
47 |
-
|
48 |
-
<td style="display:none;text-align:center;" class="hide_stuff_days"><input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][days_disabler5]" type="checkbox" value="" /></td>
|
49 |
-
|
50 |
-
<td style="display:none;text-align:center;" class="hide_stuff_days"><input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][days_disabler6]" type="checkbox" value="" /></td>
|
51 |
-
|
52 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days" title="<?php esc_attr_e( 'Min Date', 'woocommerce-checkout-manager' ); ?>"><span class="spongagge"><?php _e( 'Min Date', 'woocommerce-checkout-manager' ); ?></span></td>
|
53 |
-
|
54 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days"><input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][single_yy]" placeholder="<?php _e('2013','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'yy', 'woocommerce-checkout-manager' ); ?>" value="" /></td>
|
55 |
-
|
56 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days"><input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][single_mm]" placeholder="<?php _e('10','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'mm', 'woocommerce-checkout-manager' ); ?>" value="" /></td>
|
57 |
-
|
58 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days"><input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][single_dd]" placeholder="<?php _e('25','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'dd', 'woocommerce-checkout-manager' ); ?>" value="" /></td>
|
59 |
-
|
60 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days" title="<?php esc_attr_e( 'Max Date', 'woocommerce-checkout-manager' ); ?>"><span class="spongagge"><?php _e( 'Max Date', 'woocommerce-checkout-manager' ); ?></span></td>
|
61 |
-
|
62 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days"><input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][single_max_yy]" placeholder="<?php _e('2013','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'yy', 'woocommerce-checkout-manager' ); ?>" value="" /></td>
|
63 |
-
|
64 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days"><input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][single_max_mm]" placeholder="<?php _e('10','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'mm', 'woocommerce-checkout-manager' ); ?>" value="" /></td>
|
65 |
-
|
66 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days"><input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][single_max_dd]" placeholder="<?php _e('25','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'dd', 'woocommerce-checkout-manager' ); ?>" value="" /></td>
|
67 |
-
|
68 |
-
<td class="more_toggler1" style="text-align:center;"><input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][checkbox]" type="checkbox" title="<?php esc_attr_e( 'Add/Remove Required Attribute', 'woocommerce-checkout-manager' ); ?>" value="" /></td>
|
69 |
-
|
70 |
-
<td class="more_toggler1" style="text-align:center;">
|
71 |
-
<select name="wccs_settings3[billing_buttons][<?php echo $i; ?>][position]" > <!--Call run() function-->
|
72 |
-
<option value="form-row-wide" ><?php _e( 'Wide','woocommerce-checkout-manager' ); ?></option>
|
73 |
-
<option value="form-row-first" ><?php _e( 'Left','woocommerce-checkout-manager' ); ?></option>
|
74 |
-
<option value="form-row-last" ><?php _e( 'Right','woocommerce-checkout-manager' ); ?></option>
|
75 |
-
</select>
|
76 |
-
</td>
|
77 |
-
|
78 |
-
<td class="more_toggler1" style="text-align:center;"><input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][clear_row]" type="checkbox" title="<?php esc_attr_e( 'Clear Row', 'woocommerce-checkout-manager' ); ?>" value=" " /></td>
|
79 |
-
|
80 |
-
<td class="filter_field" style="display:none;text-align:center;"><input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][deny_checkout]" type="checkbox" title="<?php esc_attr_e( 'Deny Checkout', 'woocommerce-checkout-manager' ); ?>" value=" " /></td>
|
81 |
-
|
82 |
-
<td class="filter_field_tog add_amount_field condition_tick hide_stuff_time hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c" style="display:none;"><?php _e('Filter Toggler', 'woocommerce-checkout-manager' ); ?></td>
|
83 |
-
|
84 |
-
<td class="filter_field" style="display:none;text-align:center;"><input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][tax_remove]" type="checkbox" title="<?php esc_attr_e( 'Remove tax', 'woocommerce-checkout-manager' ); ?>" value=" " /></td>
|
85 |
-
|
86 |
-
<td class="filter_field" style="display:none;text-align:center;"><input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][deny_receipt]" type="checkbox" title="<?php esc_attr_e( 'Deny Receipt', 'woocommerce-checkout-manager' ); ?>" value=" " /></td>
|
87 |
-
<!--
|
88 |
-
<td class="filter_field condition_tick hide_stuff_change hide_stuff_time hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c" style="display:none;text-align:center;"><input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][add_amount]" type="checkbox" title="<?php esc_attr_e( 'Add Amount', 'woocommerce-checkout-manager' ); ?>" value=" " /></td>
|
89 |
-
-->
|
90 |
-
<td class="add_amount_field" style="display:none;text-align:center;"><input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][fee_name]" type="text" title="<?php esc_attr_e( 'Amount Name', 'woocommerce-checkout-manager' ); ?>" value="" placeholder="<?php _e('My Custom Charge','woocommerce-checkout-manager'); ?>" /></td>
|
91 |
-
|
92 |
-
<td class="add_amount_field" style="display:none;text-align:center;"><input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][add_amount_field]" type="text" title="<?php esc_attr_e( 'Add Amount Field', 'woocommerce-checkout-manager' ); ?>" value="" placeholder="50" /></td>
|
93 |
-
|
94 |
-
<td class="filter_field add_amount_field hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_time hide_stuff_color more_toggler1 more_toggler1c" style="display:none;text-align:center;"><input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][conditional_parent_use]" type="checkbox" title="<?php esc_attr_e( 'Conditional Field On', 'woocommerce-checkout-manager' ); ?>" value=" " /></td>
|
95 |
-
|
96 |
-
<td class="condition_tick" style="display:none;text-align:center;"><input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][conditional_parent]" type="checkbox" title="<?php esc_attr_e( 'Conditional Parent', 'woocommerce-checkout-manager' ); ?>" value=" " /></td>
|
97 |
-
|
98 |
-
<td class="more_toggler1"><input placeholder="<?php _e('My Field Name','woocommerce-checkout-manager'); ?>" type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][label]" title="<?php esc_attr_e( 'Label of the New Field', 'woocommerce-checkout-manager' ); ?>" value="" /></td>
|
99 |
-
|
100 |
-
<td class="more_toggler1"><input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][placeholder]" placeholder="<?php _e('Example red','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'Placeholder - Preview of Data to Input', 'woocommerce-checkout-manager' ); ?>" value="" /></td>
|
101 |
-
|
102 |
-
<td style="display:none;" class="filter_field add_amount_field hide_stuff_time hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c condition_tick add_amount_field"><input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][chosen_valt]" placeholder="<?php _e('Yes','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'Chosen value for conditional', 'woocommerce-checkout-manager' ); ?>" value="" /></td>
|
103 |
-
|
104 |
-
<td style="display:none;" class="condition_tick"><input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][conditional_tie]" placeholder="<?php _e('Parent Abbr. Name','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'Parent Abbr. Name', 'woocommerce-checkout-manager' ); ?>" value="" /></td>
|
105 |
-
|
106 |
-
<td style="display:none;" class="filter_field"><input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][colorpickerd]" id="billing-colorpic<?php echo $i; ?>" title="<?php esc_attr_e( 'Default Color', 'woocommerce-checkout-manager' ); ?>" value="#000000" /></td>
|
107 |
-
|
108 |
-
<td style="display:none;" class="filter_field">
|
109 |
-
<select name="wccs_settings3[billing_buttons][<?php echo $i; ?>][colorpickertype]" > <!--Call run() function-->
|
110 |
-
<option value="farbtastic" ><?php _e('Farbtastic','woocommerce-checkout-manager'); ?></option>
|
111 |
-
<option value="iris" ><?php _e('Iris','woocommerce-checkout-manager'); ?></option>
|
112 |
-
</select>
|
113 |
-
</td>
|
114 |
-
|
115 |
-
<td style="display:none;text-align:center;" class="filter_field"><input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][user_role]" type="checkbox" value="" /></td>
|
116 |
-
|
117 |
-
<td class="filter_field" style="display:none;"><input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][role_options]" placeholder="Option 1||Option 2||Option 3" value="" /></td>
|
118 |
-
|
119 |
-
<td class="filter_field" style="display:none;"><input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][role_options2]" placeholder="Option 1||Option 2||Option 3" value="" /></td>
|
120 |
-
|
121 |
-
<td style="display:none;" class="filter_field add_amount_field hide_stuff_change hide_stuff_time hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c condition_tick add_amount_field"><input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][extra_class]" value="" /></td>
|
122 |
-
|
123 |
-
<td style="display:none;text-align:center;" class="hide_stuff_op wccm1"><input type="checkbox" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][fancy]" title="<?php esc_attr_e( 'Adapt to woocommerce style', 'woocommerce-checkout-manager' ); ?>" value="" /></td>
|
124 |
-
|
125 |
-
<td class="hide_stuff_op wccm1" style="display:none;"><input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][force_title2]" value="" placeholder="<?php _e('Name Guide','woocommerce-checkout-manager'); ?>" /></td>
|
126 |
-
|
127 |
-
<td class="hide_stuff_op wccm1" style="display:none;"><input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][option_array]" value="" placeholder="Option 1||Option 2||Option 3" /></td>
|
128 |
-
|
129 |
-
<td class="filter_field add_amount_field hide_stuff_time condition_tick hide_stuff_change hide_stuff_opcheck hide_stuff_color more_toggler1 more_toggler1c" style="display:none;"><?php _e('Options Toggler', 'woocommerce-checkout-manager' ); ?></td>
|
130 |
-
<!--
|
131 |
-
<td class="filter_field add_amount_field condition_tick hide_stuff_change hide_stuff_timef hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c" style="display:none;"><?php _e('Time Toggler', 'woocommerce-checkout-manager' ); ?></td>
|
132 |
-
|
133 |
-
<td class="filter_field add_amount_field hide_stuff_time condition_tick hide_stuff_change hide_stuff_opcheck hide_stuff_op more_toggler1 more_toggler1c hide_stuff_days" style="display:none;"><?php _e('Date Toggler', 'woocommerce-checkout-manager' ); ?></td>
|
134 |
-
-->
|
135 |
-
|
136 |
-
<td style="display:none;" class="filter_field add_amount_field hide_stuff_time condition_tick hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1"><?php _e('Hidden Toggler', 'woocommerce-checkout-manager' ); ?></td>
|
137 |
-
|
138 |
-
<td class="filter_field add_amount_field condition_tick hide_stuff_time hide_stuff_change hide_stuff_opcheck hide_stuff_color hide_stuff_op more_toggler more_toggler1c"><?php _e('More Toggler', 'woocommerce-checkout-manager' ); ?></td>
|
139 |
-
|
140 |
-
<td class="more_toggler1">
|
141 |
-
<select name="wccs_settings3[billing_buttons][<?php echo $i; ?>][type]" > <!--Call run() function-->
|
142 |
-
<option value="wooccmtext" ><?php _e('Text Input','woocommerce-checkout-manager'); ?></option>
|
143 |
-
<option value="wooccmtextarea" ><?php _e('Textarea','woocommerce-checkout-manager'); ?></option>
|
144 |
-
<option value="wooccmpassword" ><?php _e('Password','woocommerce-checkout-manager'); ?></option>
|
145 |
-
<option value="wooccmradio" ><?php _e('Radio Buttons','woocommerce-checkout-manager'); ?></option>
|
146 |
-
<option value="checkbox_wccm" ><?php _e('Check Box','woocommerce-checkout-manager'); ?></option>
|
147 |
-
<option value="wooccmselect" ><?php _e('Select Options','woocommerce-checkout-manager'); ?></option>
|
148 |
-
<!--<option value="datepicker" ><?php _e('Date Picker','woocommerce-checkout-manager'); ?></option>
|
149 |
-
<option value="time" ><?php _e('Time Picker','woocommerce-checkout-manager'); ?></option>-->
|
150 |
-
<option value="colorpicker" ><?php _e('Color Picker','woocommerce-checkout-manager'); ?></option>
|
151 |
-
<option value="heading" ><?php _e('Heading','woocommerce-checkout-manager'); ?></option>
|
152 |
-
<option value="multiselect" ><?php _e('Multi-Select','woocommerce-checkout-manager'); ?></option>
|
153 |
-
<option value="multicheckbox" ><?php _e('Multi-Checkbox','woocommerce-checkout-manager'); ?></option>
|
154 |
-
<option value="wooccmcountry" ><?php _e('Country','woocommerce-checkout-manager'); ?></option>
|
155 |
-
<option value="wooccmstate" ><?php _e('State','woocommerce-checkout-manager'); ?></option>
|
156 |
-
<option value="wooccmupload"><?php _e('File Picker','woocommerce-checkout-manager'); ?></option>
|
157 |
-
</select>
|
158 |
-
</td>
|
159 |
-
|
160 |
-
<td class="more_toggler1"><input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][cow]" placeholder="MyField" title="<?php esc_attr_e( 'Abbreviation (No spaces)', 'woocommerce-checkout-manager' ); ?>" value="" <?php if ( empty($options['checkness']['abbreviation'])) { echo 'readonly="readonly"'; } ?> /></td>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/templates/admin/woocheckout-billing-tbody.php
DELETED
@@ -1,272 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* WooCommerce Checkout Manager
|
4 |
-
*
|
5 |
-
*/
|
6 |
-
|
7 |
-
// Exit if accessed directly
|
8 |
-
if ( !defined( 'ABSPATH' ) ) exit;
|
9 |
-
?>
|
10 |
-
|
11 |
-
<td style="display:none; text-align:center;" class="more_toggler1c">
|
12 |
-
<input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][more_content]" type="checkbox" value="1" <?php if ( !empty ($field['more_content'])) echo "checked='checked'"; ?> />
|
13 |
-
</td>
|
14 |
-
|
15 |
-
<td style="display:none;" class="more_toggler1c">
|
16 |
-
<input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][single_p]" placeholder="<?php _e('Product ID(s) e.g 1674||1233','woocommerce-checkout-manager'); ?>" value="<?php echo ( !empty( $field['single_p'] ) ? $field['single_p'] : '' ); ?>" />
|
17 |
-
</td>
|
18 |
-
|
19 |
-
<td style="display:none;" class="more_toggler1c">
|
20 |
-
<input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][single_px]" placeholder="<?php _e('Product ID(s) e.g 1674||1233','woocommerce-checkout-manager'); ?>" value="<?php echo ( !empty( $field['single_px'] ) ? $field['single_px'] : '' ); ?>" />
|
21 |
-
</td>
|
22 |
-
|
23 |
-
<td style="display:none;" class="more_toggler1c">
|
24 |
-
<input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][single_p_cat]" placeholder="<?php _e('Category Slug(s) e.g my-cat||my-cat2','woocommerce-checkout-manager'); ?>" value="<?php echo ( !empty( $field['single_p_cat'] ) ? $field['single_p_cat'] : '' ); ?>" />
|
25 |
-
</td>
|
26 |
-
|
27 |
-
<td style="display:none;" class="more_toggler1c">
|
28 |
-
<input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][single_px_cat]" placeholder="<?php _e('Category Slug(s) e.g my-cat||my-cat2','woocommerce-checkout-manager'); ?>" value="<?php echo ( !empty( $field['single_px_cat'] ) ? $field['single_px_cat'] : '' ); ?>" />
|
29 |
-
</td>
|
30 |
-
|
31 |
-
<td style="display:none;" class="hide_stuff_time">
|
32 |
-
<input type="text" placeholder="6" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][start_hour]" value="<?php echo ( !empty( $field['start_hour'] ) ? $field['start_hour'] : '' ); ?>" />
|
33 |
-
</td>
|
34 |
-
|
35 |
-
<td style="display:none;" class="hide_stuff_time">
|
36 |
-
<input type="text" placeholder="9" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][end_hour]" value="<?php echo ( !empty( $field['end_hour'] ) ? $field['end_hour'] : '' ); ?>" />
|
37 |
-
</td>
|
38 |
-
|
39 |
-
<td style="display:none;" class="hide_stuff_time">
|
40 |
-
<input type="text" placeholder="15" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][interval_min]" value="<?php echo ( !empty( $field['interval_min'] ) ? $field['interval_min'] : '' ); ?>" />
|
41 |
-
</td>
|
42 |
-
|
43 |
-
<td style="display:none;" class="hide_stuff_time">
|
44 |
-
<input type="text" placeholder="0, 10, 20, 30, 40" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][manual_min]" value="<?php echo ( !empty( $field['manual_min'] ) ? $field['manual_min'] : '' ); ?>" />
|
45 |
-
</td>
|
46 |
-
|
47 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days">
|
48 |
-
<input type="text" placeholder="dd-mm-yy" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][format_date]" value="<?php echo ( !empty( $field['format_date'] ) ? $field['format_date'] : '' ); ?>" />
|
49 |
-
</td>
|
50 |
-
|
51 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days">
|
52 |
-
<input type="text" placeholder="+3" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][min_before]" value="<?php echo ( !empty( $field['min_before'] ) ? $field['min_before'] : '' ); ?>" />
|
53 |
-
</td>
|
54 |
-
|
55 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days">
|
56 |
-
<input type="text" placeholder="3" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][max_after]" value="<?php echo ( !empty( $field['max_after'] ) ? $field['max_after'] : '' ); ?>" />
|
57 |
-
</td>
|
58 |
-
|
59 |
-
<td style="display:none; text-align:center;" class="hide_stuff_color daoo">
|
60 |
-
<input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][days_disabler]" type="checkbox" value="true" <?php if ( !empty ($field['days_disabler'])) echo "checked='checked'"; ?> />
|
61 |
-
</td>
|
62 |
-
|
63 |
-
<td style="display:none; text-align:center;" class="hide_stuff_days">
|
64 |
-
<input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][days_disabler0]" type="checkbox" value="1" <?php if ( !empty ($field['days_disabler0'])) echo "checked='checked'"; ?> />
|
65 |
-
</td>
|
66 |
-
|
67 |
-
<td style="display:none; text-align:center;" class="hide_stuff_days">
|
68 |
-
<input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][days_disabler1]" type="checkbox" value="1" <?php if ( !empty ($field['days_disabler1'])) echo "checked='checked'"; ?> />
|
69 |
-
</td>
|
70 |
-
|
71 |
-
<td style="display:none; text-align:center;" class="hide_stuff_days">
|
72 |
-
<input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][days_disabler2]" type="checkbox" value="1" <?php if ( !empty ($field['days_disabler2'])) echo "checked='checked'"; ?> />
|
73 |
-
</td>
|
74 |
-
|
75 |
-
<td style="display:none; text-align:center;" class="hide_stuff_days">
|
76 |
-
<input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][days_disabler3]" type="checkbox" value="1" <?php if ( !empty ($field['days_disabler3'])) echo "checked='checked'"; ?> />
|
77 |
-
</td>
|
78 |
-
|
79 |
-
<td style="display:none; text-align:center;" class="hide_stuff_days">
|
80 |
-
<input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][days_disabler4]" type="checkbox" value="1" <?php if ( !empty ($field['days_disabler4'])) echo "checked='checked'"; ?> />
|
81 |
-
</td>
|
82 |
-
|
83 |
-
<td style="display:none; text-align:center;" class="hide_stuff_days">
|
84 |
-
<input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][days_disabler5]" type="checkbox" value="1" <?php if ( !empty ($field['days_disabler5'])) echo "checked='checked'"; ?> />
|
85 |
-
</td>
|
86 |
-
|
87 |
-
<td style="display:none; text-align:center;" class="hide_stuff_days">
|
88 |
-
<input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][days_disabler6]" type="checkbox" value="1" <?php if ( !empty ($field['days_disabler6'])) echo "checked='checked'"; ?> />
|
89 |
-
</td>
|
90 |
-
|
91 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days">
|
92 |
-
<span class="spongagge"><?php _e( 'Min Date', 'woocommerce-checkout-manager' ); ?></span>
|
93 |
-
</td>
|
94 |
-
|
95 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days">
|
96 |
-
<input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][single_yy]" placeholder="<?php _e('2013','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'yy', 'woocommerce-checkout-manager' ); ?>" value="<?php echo ( !empty( $field['single_yy'] ) ? $field['single_yy'] : '' ); ?>" />
|
97 |
-
</td>
|
98 |
-
|
99 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days">
|
100 |
-
<input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][single_mm]" placeholder="<?php _e('10','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'mm', 'woocommerce-checkout-manager' ); ?>" value="<?php echo ( !empty( $field['single_mm'] ) ? $field['single_mm'] : '' ); ?>" />
|
101 |
-
</td>
|
102 |
-
|
103 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days">
|
104 |
-
<input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][single_dd]" placeholder="<?php _e('25','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'dd', 'woocommerce-checkout-manager' ); ?>" value="<?php echo ( !empty( $field['single_dd'] ) ? $field['single_dd'] : '' ); ?>" />
|
105 |
-
</td>
|
106 |
-
|
107 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days">
|
108 |
-
<span class="spongagge"><?php _e( 'Max Date', 'woocommerce-checkout-manager' ); ?></span>
|
109 |
-
</td>
|
110 |
-
|
111 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days">
|
112 |
-
<input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][single_max_yy]" placeholder="<?php _e('2013','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'yy', 'woocommerce-checkout-manager' ); ?>" value="<?php echo ( !empty( $field['single_max_yy'] ) ? $field['single_max_yy'] : '' ); ?>" />
|
113 |
-
</td>
|
114 |
-
|
115 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days">
|
116 |
-
<input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][single_max_mm]" placeholder="<?php _e('10','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'mm', 'woocommerce-checkout-manager' ); ?>" value="<?php echo ( !empty( $field['single_max_mm'] ) ? $field['single_max_mm'] : '' ); ?>" />
|
117 |
-
</td>
|
118 |
-
|
119 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days">
|
120 |
-
<input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][single_max_dd]" placeholder="<?php _e('25','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'dd', 'woocommerce-checkout-manager' ); ?>" value="<?php echo ( !empty( $field['single_max_dd'] ) ? $field['single_max_dd'] : '' ); ?>" />
|
121 |
-
</td>
|
122 |
-
|
123 |
-
<td class="more_toggler1" style="text-align:center;">
|
124 |
-
<input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][checkbox]" type="checkbox" title="<?php _e( 'Whether or not the Checkout field is required', 'woocommerce-checkout-manager' ); ?>" value="true" <?php if ( !empty( $field['checkbox'] ) ) echo "checked='checked'"; ?> />
|
125 |
-
</td>
|
126 |
-
|
127 |
-
<td class="more_toggler1" style="text-align:center;">
|
128 |
-
<select name="wccs_settings3[billing_buttons][<?php echo $i; ?>][position]" title="<?php _e( 'Placement of the Checkout field', 'woocommerce-checkout-manager' ); ?>"> <!--Call run() function-->
|
129 |
-
<option value="form-row-wide" <?php ( !isset( $field['position'] ) ) ? '' : selected( $field['position'], 'form-row-wide' ); ?>><?php _e( 'Wide','woocommerce-checkout-manager' ); ?></option>
|
130 |
-
<option value="form-row-first" <?php ( !isset( $field['position'] ) ) ? '' : selected( $field['position'], 'form-row-first' ); ?>><?php _e( 'Left','woocommerce-checkout-manager' ); ?></option>
|
131 |
-
<option value="form-row-last" <?php ( !isset( $field['position'] ) ) ? '' : selected( $field['position'], 'form-row-last' ); ?>><?php _e( 'Right','woocommerce-checkout-manager' ); ?></option>
|
132 |
-
</select>
|
133 |
-
</td>
|
134 |
-
|
135 |
-
<td class="more_toggler1" style="text-align:center;">
|
136 |
-
<input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][clear_row]" type="checkbox" title="<?php _e( 'Applies a clear fix to the Checkout field', 'woocommerce-checkout-manager' ); ?>" value="true" <?php if ( !empty( $field['clear_row'] ) ) echo "checked='checked'"; ?> />
|
137 |
-
</td>
|
138 |
-
|
139 |
-
<td class="filter_field" style="display:none;text-align:center;">
|
140 |
-
<input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][deny_checkout]" type="checkbox" value="true" <?php if( !empty( $field['deny_checkout'] ) ) echo "checked='checked'"; ?> />
|
141 |
-
</td>
|
142 |
-
|
143 |
-
<td class="filter_field_tog add_amount_field condition_tick hide_stuff_time hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c" style="display:none;">
|
144 |
-
<?php _e('Filter Toggler', 'woocommerce-checkout-manager' ); ?>
|
145 |
-
</td>
|
146 |
-
|
147 |
-
<td class="filter_field" style="display:none;text-align:center;">
|
148 |
-
<input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][tax_remove]" type="checkbox" value="true" <?php if ( !empty ($field['tax_remove'])) echo "checked='checked'"; ?> />
|
149 |
-
</td>
|
150 |
-
|
151 |
-
<td class="filter_field" style="display:none;text-align:center;">
|
152 |
-
<input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][deny_receipt]" type="checkbox" value="true" <?php if ( !empty ($field['deny_receipt'])) echo "checked='checked'"; ?> />
|
153 |
-
</td>
|
154 |
-
<!--
|
155 |
-
<td class="filter_field condition_tick hide_stuff_change hide_stuff_time hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c" style="display:none;text-align:center;">
|
156 |
-
<input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][add_amount]" type="checkbox" value="true" <?php if ( !empty ($field['add_amount'])) echo "checked='checked'"; ?> />
|
157 |
-
</td>
|
158 |
-
-->
|
159 |
-
<td class="add_amount_field" style="display:none;text-align:center;">
|
160 |
-
<input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][fee_name]" type="text" value="<?php echo ( !empty( $field['fee_name'] ) ? $field['fee_name'] : '' ); ?>" placeholder="<?php _e('My Custom Charge','woocommerce-checkout-manager'); ?>" />
|
161 |
-
</td>
|
162 |
-
|
163 |
-
<td class="add_amount_field" style="display:none;text-align:center;">
|
164 |
-
<input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][add_amount_field]" type="text" value="<?php echo ( !empty( $field['add_amount_field'] ) ? $field['add_amount_field'] : '' ); ?>" placeholder="50" />
|
165 |
-
</td>
|
166 |
-
|
167 |
-
<td class="filter_field add_amount_field hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_time hide_stuff_color more_toggler1 more_toggler1c" style="display:none;text-align:center;">
|
168 |
-
<input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][conditional_parent_use]" type="checkbox" value="true" <?php if ( !empty ($field['conditional_parent_use'])) echo "checked='checked'"; ?> />
|
169 |
-
</td>
|
170 |
-
|
171 |
-
<td class="condition_tick" style="display:none;text-align:center;">
|
172 |
-
<input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][conditional_parent]" type="checkbox" value="true" <?php if ( !empty ($field['conditional_parent'])) echo "checked='checked'"; ?> />
|
173 |
-
</td>
|
174 |
-
|
175 |
-
<td class="more_toggler1">
|
176 |
-
<input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][label]" title="<?php _e( 'Label text for the Checkout field', 'woocommerce-checkout-manager' ); ?>" placeholder="<?php _e('My Field Name','woocommerce-checkout-manager'); ?>" value="<?php echo esc_attr( $field['label'] ); ?>" />
|
177 |
-
</td>
|
178 |
-
|
179 |
-
<td class="more_toggler1">
|
180 |
-
<input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][placeholder]" title="<?php _e( 'Placeholder text for the Checkout field', 'woocommerce-checkout-manager' ); ?>" placeholder="<?php _e('Example red','woocommerce-checkout-manager'); ?>" value="<?php echo ( !empty( $field['placeholder'] ) ? $field['placeholder'] : '' ); ?>" <?php if( $field['cow'] == 'country' || $field['cow'] == 'state' ) { echo 'readonly="readonly"'; } ?> />
|
181 |
-
</td>
|
182 |
-
|
183 |
-
<td style="display:none;" class="filter_field add_amount_field hide_stuff_time hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c condition_tick add_amount_field">
|
184 |
-
<input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][chosen_valt]" placeholder="<?php _e('Yes','woocommerce-checkout-manager'); ?>" value="<?php echo ( !empty( $field['chosen_valt'] ) ? $field['chosen_valt'] : '' ); ?>" />
|
185 |
-
</td>
|
186 |
-
|
187 |
-
<td style="display:none;" class="condition_tick">
|
188 |
-
<input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][conditional_tie]" placeholder="<?php _e('Parent Abbr. Name','woocommerce-checkout-manager'); ?>" value="<?php echo ( !empty( $field['conditional_tie'] ) ? $field['conditional_tie'] : '' ); ?>" />
|
189 |
-
</td>
|
190 |
-
|
191 |
-
<td style="display:none;" class="filter_field">
|
192 |
-
<input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][colorpickerd]" id="billing-colorpic<?php echo $i; ?>" placeholder="<?php _e('#000000','woocommerce-checkout-manager'); ?>" value="<?php echo ( !empty( $field['colorpickerd'] ) ? $field['colorpickerd'] : '' ); ?>" />
|
193 |
-
</td>
|
194 |
-
|
195 |
-
<td style="display:none;" class="filter_field">
|
196 |
-
<select name="wccs_settings3[billing_buttons][<?php echo $i; ?>][colorpickertype]">
|
197 |
-
<option value="farbtastic" <?php (!isset($field['colorpickertype'])) ? '' : selected( $field['colorpickertype'], 'farbtastic' ); ?>><?php _e('Farbtastic','woocommerce-checkout-manager'); ?></option>
|
198 |
-
<option value="iris" <?php (!isset($field['colorpickertype'])) ? '' : selected( $field['colorpickertype'], 'iris' ); ?>><?php _e('Iris','woocommerce-checkout-manager'); ?></option>
|
199 |
-
</select>
|
200 |
-
</td>
|
201 |
-
|
202 |
-
<td style="display:none;text-align:center;" class="filter_field">
|
203 |
-
<input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][user_role]" type="checkbox" value="user_role" <?php if ( !empty ($field['user_role'])) echo "checked='checked'"; ?> />
|
204 |
-
</td>
|
205 |
-
|
206 |
-
<td class="filter_field" style="display:none;">
|
207 |
-
<input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][role_options]" placeholder="Option 1||Option 2||Option 3" value="<?php echo ( !empty( $field['role_options'] ) ? $field['role_options'] : '' ); ?>" />
|
208 |
-
</td>
|
209 |
-
|
210 |
-
<td class="filter_field" style="display:none;">
|
211 |
-
<input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][role_options2]" placeholder="Option 1||Option 2||Option 3" value="<?php echo ( !empty( $field['role_options2'] ) ? $field['role_options2'] : '' ); ?>" />
|
212 |
-
</td>
|
213 |
-
|
214 |
-
<td style="display:none;" class="filter_field add_amount_field hide_stuff_time hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c condition_tick add_amount_field">
|
215 |
-
<input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][extra_class]" value="<?php echo ( !empty( $field['extra_class'] ) ? $field['extra_class'] : '' ); ?>" />
|
216 |
-
</td>
|
217 |
-
|
218 |
-
<td style="display:none;text-align:center;" class="hide_stuff_op wccm1">
|
219 |
-
<input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][fancy]" type="checkbox" value="country_select" <?php if ( !empty ($field['fancy'])) echo "checked='checked'"; ?> />
|
220 |
-
</td>
|
221 |
-
|
222 |
-
<td class="hide_stuff_op wccm1" style="display:none;">
|
223 |
-
<input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][force_title2]" placeholder="<?php _e('Name Guide','woocommerce-checkout-manager'); ?>" value="<?php echo ( !empty( $field['force_title2'] ) ? $field['force_title2'] : '' ); ?>" />
|
224 |
-
</td>
|
225 |
-
|
226 |
-
<td class="hide_stuff_op wccm1" style="display:none;">
|
227 |
-
<input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][option_array]" placeholder="Option 1||Option 2||Option 3" value="<?php echo ( !empty( $field['option_array'] ) ? $field['option_array'] : '' ); ?>" />
|
228 |
-
</td>
|
229 |
-
|
230 |
-
<td class="filter_field add_amount_field hide_stuff_time condition_tick hide_stuff_change hide_stuff_opcheck hide_stuff_color more_toggler1 more_toggler1c" style="display:none;">
|
231 |
-
<?php _e('Options Toggler', 'woocommerce-checkout-manager' ); ?>
|
232 |
-
</td>
|
233 |
-
<!--
|
234 |
-
<td class="filter_field add_amount_field condition_tick hide_stuff_change hide_stuff_timef hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c" style="display:none;">
|
235 |
-
<?php _e('Time Toggler', 'woocommerce-checkout-manager' ); ?>
|
236 |
-
</td>
|
237 |
-
|
238 |
-
<td class="filter_field add_amount_field hide_stuff_time condition_tick hide_stuff_change hide_stuff_opcheck hide_stuff_op more_toggler1 more_toggler1c hide_stuff_days" style="display:none;">
|
239 |
-
<?php _e('Date Toggler', 'woocommerce-checkout-manager' ); ?>
|
240 |
-
</td>
|
241 |
-
-->
|
242 |
-
<td style="display:none;" class="filter_field add_amount_field hide_stuff_time condition_tick hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1">
|
243 |
-
<?php _e('Hidden Toggler', 'woocommerce-checkout-manager' ); ?>
|
244 |
-
</td>
|
245 |
-
|
246 |
-
<td class="filter_field add_amount_field condition_tick hide_stuff_time hide_stuff_change hide_stuff_opcheck hide_stuff_color hide_stuff_op more_toggler more_toggler1c" title="<?php _e( 'Open additional options for this Checkout field', 'woocommerce-checkout-manager' ); ?>">
|
247 |
-
<?php _e('More Toggler', 'woocommerce-checkout-manager' ); ?>
|
248 |
-
</td>
|
249 |
-
|
250 |
-
<td class="more_toggler1">
|
251 |
-
<select name="wccs_settings3[billing_buttons][<?php echo $i; ?>][type]" title="<?php _e( 'Type of the Checkout field', 'woocommerce-checkout-manager' ); ?>" <?php if ( $field['cow'] == 'country' || $field['cow'] == 'state' ) { echo 'readonly="readonly" style="pointer-events:none;"'; } ?> > <!--Call run() function-->
|
252 |
-
<option value="wooccmtext" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'wooccmtext' ); ?>><?php _e('Text Input','woocommerce-checkout-manager'); ?></option>
|
253 |
-
<option value="wooccmtextarea" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'wooccmtextarea' ); ?>><?php _e('Textarea','woocommerce-checkout-manager'); ?></option>
|
254 |
-
<option value="wooccmpassword" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'wooccmpassword' ); ?>><?php _e('Password','woocommerce-checkout-manager'); ?></option>
|
255 |
-
<option value="wooccmradio" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'wooccmradio' ); ?>><?php _e('Radio Buttons','woocommerce-checkout-manager'); ?></option>
|
256 |
-
<option value="checkbox_wccm" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'checkbox_wccm' ); ?>><?php _e('Check Box','woocommerce-checkout-manager'); ?></option>
|
257 |
-
<option value="wooccmselect" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'wooccmselect' ); ?>><?php _e('Select Options','woocommerce-checkout-manager'); ?></option>
|
258 |
-
<!--<option value="datepicker" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'datepicker' ); ?>><?php _e('Date Picker','woocommerce-checkout-manager'); ?></option>
|
259 |
-
<option value="time" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'time' ); ?>><?php _e('Time Picker','woocommerce-checkout-manager'); ?></option>-->
|
260 |
-
<option value="colorpicker" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'colorpicker' ); ?>><?php _e('Color Picker','woocommerce-checkout-manager'); ?></option>
|
261 |
-
<option value="heading" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'heading' ); ?>><?php _e('Heading','woocommerce-checkout-manager'); ?></option>
|
262 |
-
<option value="multiselect" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'multiselect' ); ?>><?php _e('Multi-Select','woocommerce-checkout-manager'); ?></option>
|
263 |
-
<option value="multicheckbox" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'multicheckbox' ); ?>><?php _e('Multi-Checkbox','woocommerce-checkout-manager'); ?></option>
|
264 |
-
<option <?php if ( $field['cow'] == 'country' ) { echo 'selected="selected"'; } ?> value="wooccmcountry" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'wooccmcountry' ); ?>><?php _e('Country','woocommerce-checkout-manager'); ?></option>
|
265 |
-
<option <?php if ( $field['cow'] == 'state' ) { echo 'selected="selected"'; } ?> value="wooccmstate" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'wooccmstate' ); ?>><?php _e('State','woocommerce-checkout-manager'); ?></option>
|
266 |
-
<option value="wooccmupload" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'wooccmupload' ); ?>><?php _e('File Picker','woocommerce-checkout-manager'); ?></option>
|
267 |
-
</select>
|
268 |
-
</td>
|
269 |
-
|
270 |
-
<td class="more_toggler1">
|
271 |
-
<input type="text" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][cow]" placeholder="MyField" title="<?php _e( 'To edit Abbreviations open General > Switches > Editing Of Abbreviation Fields.', 'woocommerce-checkout-manager' ); ?>" value="<?php echo $field['cow']; ?>" <?php if ( empty($options['checkness']['abbreviation'])) { echo 'readonly="readonly"'; } ?> <?php if ( in_array($field['cow'],$htmlbillingabbr) ) { echo 'readonly="readonly" style="pointer-events:none;"'; } ?> />
|
272 |
-
</td>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/templates/admin/woocheckout-billing-thead.php
DELETED
@@ -1,130 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* WooCommerce Checkout Manager
|
4 |
-
*/
|
5 |
-
|
6 |
-
// Exit if accessed directly
|
7 |
-
if ( !defined( 'ABSPATH' ) ) exit;
|
8 |
-
?>
|
9 |
-
|
10 |
-
|
11 |
-
<th class="more_toggler1c" style="display:none;width: 5%;"><?php _e('More' , 'woocommerce-checkout-manager' ); ?></th>
|
12 |
-
|
13 |
-
<th class="more_toggler1c hidefieldproduct" style="display:none;width: 17%;"><?php _e('Hide Field from Product' , 'woocommerce-checkout-manager' ); ?></th>
|
14 |
-
|
15 |
-
<th class="more_toggler1c" style="display:none;width: 17%;"><?php _e('Show Field for Product' , 'woocommerce-checkout-manager' ); ?></th>
|
16 |
-
|
17 |
-
<th class="more_toggler1c hidefieldcat" style="display:none;width: 20%;"><?php _e('Hide Field from Category' , 'woocommerce-checkout-manager' ); ?></th>
|
18 |
-
|
19 |
-
<th class="more_toggler1c" style="display:none;width: 20%;"><?php _e('Show Field for Category' , 'woocommerce-checkout-manager' ); ?></th>
|
20 |
-
|
21 |
-
<th class="hide_stuff_time" style="display:none;width: 16%;"><?php _e('Start Hour' , 'woocommerce-checkout-manager' ); ?></th>
|
22 |
-
|
23 |
-
<th class="hide_stuff_time" style="display:none;width: 16%;"><?php _e('End Hour' , 'woocommerce-checkout-manager' ); ?></th>
|
24 |
-
|
25 |
-
<th class="hide_stuff_time" style="display:none;width: 16%;"><?php _e('Interval Min.' , 'woocommerce-checkout-manager' ); ?></th>
|
26 |
-
|
27 |
-
<th class="hide_stuff_time" style="display:none;width: 16%;"><?php _e('Manual Min.' , 'woocommerce-checkout-manager' ); ?></th>
|
28 |
-
|
29 |
-
<th class="hide_stuff_color hide_stuff_days" style="display:none;width: 16%;"><?php _e('Date Format' , 'woocommerce-checkout-manager' ); ?></th>
|
30 |
-
|
31 |
-
<th class="hide_stuff_color hide_stuff_days" style="display:none;width: 5%;"><?php _e('Days before' , 'woocommerce-checkout-manager' ); ?></th>
|
32 |
-
|
33 |
-
<th class="hide_stuff_color hide_stuff_days" style="display:none;width: 5%;"><?php _e('Days After' , 'woocommerce-checkout-manager' ); ?></th>
|
34 |
-
|
35 |
-
<th class="hide_stuff_color daoo" style="display:none;width: 7%;"><?php _e('Days Enabler' , 'woocommerce-checkout-manager' ); ?></th>
|
36 |
-
|
37 |
-
<th class="hide_stuff_days" style="display:none;width: 7%;"><?php _e('Sundays' , 'woocommerce-checkout-manager' ); ?></th>
|
38 |
-
|
39 |
-
<th class="hide_stuff_days" style="display:none;width: 7%;"><?php _e('Mondays' , 'woocommerce-checkout-manager' ); ?></th>
|
40 |
-
|
41 |
-
<th class="hide_stuff_days" style="display:none;width: 7%;"><?php _e('Tuesdays' , 'woocommerce-checkout-manager' ); ?></th>
|
42 |
-
|
43 |
-
<th class="hide_stuff_days" style="display:none;width: 7%;"><?php _e('Wednesdays' , 'woocommerce-checkout-manager' ); ?></th>
|
44 |
-
|
45 |
-
<th class="hide_stuff_days" style="display:none;width: 7%;"><?php _e('Thursdays' , 'woocommerce-checkout-manager' ); ?></th>
|
46 |
-
|
47 |
-
<th class="hide_stuff_days" style="display:none;width: 7%;"><?php _e('Fridays' , 'woocommerce-checkout-manager' ); ?></th>
|
48 |
-
|
49 |
-
<th class="hide_stuff_days" style="display:none;width: 7%;"><?php _e('Satudays' , 'woocommerce-checkout-manager' ); ?></th>
|
50 |
-
|
51 |
-
<th class="hide_stuff_color separator hide_stuff_days" style="display:none;" width="3%"><?php _e('' , 'woocommerce-checkout-manager' ); ?></th>
|
52 |
-
|
53 |
-
<th class="hide_stuff_color hide_stuff_days" style="display:none;text-align:center;" width="5%"><?php _e('YY' , 'woocommerce-checkout-manager' ); ?></th>
|
54 |
-
|
55 |
-
<th class="hide_stuff_color hide_stuff_days" style="display:none;" width="4%"><?php _e('MM' , 'woocommerce-checkout-manager' ); ?></th>
|
56 |
-
|
57 |
-
<th class="hide_stuff_color hide_stuff_days" style="display:none;" width="4%"><?php _e('DD' , 'woocommerce-checkout-manager' ); ?></th>
|
58 |
-
|
59 |
-
<th class="hide_stuff_color separator hide_stuff_days" style="display:none;" width="3%"><?php _e('' , 'woocommerce-checkout-manager' ); ?></th>
|
60 |
-
|
61 |
-
<th class="hide_stuff_color hide_stuff_days" style="display:none;text-align:center;" width="5%"><?php _e('YY' , 'woocommerce-checkout-manager' ); ?></th>
|
62 |
-
|
63 |
-
<th class="hide_stuff_color hide_stuff_days" style="display:none;" width="4%"><?php _e('MM' , 'woocommerce-checkout-manager' ); ?></th>
|
64 |
-
|
65 |
-
<th class="hide_stuff_color hide_stuff_days" style="display:none;" width="4%"><?php _e('DD' , 'woocommerce-checkout-manager' ); ?></th>
|
66 |
-
|
67 |
-
<th class="more_toggler1" width="8%"><?php _e('Required' , 'woocommerce-checkout-manager' ); ?></th>
|
68 |
-
|
69 |
-
<th class="more_toggler1" width="5%"><?php _e('Position' , 'woocommerce-checkout-manager' ); ?></th>
|
70 |
-
|
71 |
-
<th class="more_toggler1" width="5%"><?php _e('Clear' , 'woocommerce-checkout-manager' ); ?></th>
|
72 |
-
|
73 |
-
<th class="filter_field" style="display:none;" width="5%"><?php _e('Deny Checkout' , 'woocommerce-checkout-manager' ); ?></th>
|
74 |
-
|
75 |
-
<th style="cursor: pointer; text-align: center; font-size: 30px;display:none;" class="filter_field_tog add_amount_field condition_tick hide_stuff_time hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c" style="display:none;" width="5%"><span class="toggle_shower">≡</span></th>
|
76 |
-
|
77 |
-
<th class="filter_field" style="display:none;" width="5%"><?php _e('Remove Tax' , 'woocommerce-checkout-manager' ); ?></th>
|
78 |
-
|
79 |
-
<th class="filter_field" style="display:none;" width="5%"><?php _e('Deny Receipt' , 'woocommerce-checkout-manager' ); ?></th>
|
80 |
-
<!--
|
81 |
-
<th class="filter_field condition_tick hide_stuff_change hide_stuff_time hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c add_amount" style="display:none;" width="5%"><?php _e('Add Amount' , 'woocommerce-checkout-manager' ); ?></th>
|
82 |
-
-->
|
83 |
-
<th class="add_amount_field" style="display:none;" width="5%"><?php _e('Amount Name' , 'woocommerce-checkout-manager' ); ?></th>
|
84 |
-
|
85 |
-
<th class="add_amount_field" style="display:none;" width="5%"><?php _e('Enter Amount' , 'woocommerce-checkout-manager' ); ?></th>
|
86 |
-
|
87 |
-
<th class="filter_field add_amount_field hide_stuff_change hide_stuff_time hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c apply_tick" style="display:none;" width="9%"><?php _e('Conditional' , 'woocommerce-checkout-manager' ); ?></th>
|
88 |
-
|
89 |
-
<th class="condition_tick" style="display:none;" width="9%"><?php _e('Conditional Parent' , 'woocommerce-checkout-manager' ); ?></th>
|
90 |
-
|
91 |
-
<th class="more_toggler1"><?php _e('Label' , 'woocommerce-checkout-manager' ); ?></th>
|
92 |
-
|
93 |
-
<th class="more_toggler1"><?php _e('Placeholder' , 'woocommerce-checkout-manager' ); ?></th>
|
94 |
-
|
95 |
-
<th style="display:none; width: 10%;" class="filter_field add_amount_field hide_stuff_time hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c condition_tick add_amount_field"><?php _e('Chosen Value' , 'woocommerce-checkout-manager' ); ?></th>
|
96 |
-
|
97 |
-
<th style="display:none;" class="condition_tick" width="16%"><?php _e('Conditional Tie' , 'woocommerce-checkout-manager' ); ?></th>
|
98 |
-
|
99 |
-
<th style="display:none;width:5%;" class="filter_field" width="1%"><?php _e('Default Color' , 'woocommerce-checkout-manager' ); ?></th>
|
100 |
-
|
101 |
-
<th style="display:none;" class="filter_field" width="5%"><?php _e('Picker Type' , 'woocommerce-checkout-manager' ); ?></th>
|
102 |
-
|
103 |
-
<th style="display:none;" class="filter_field" width="5%"><?php _e('User Role' , 'woocommerce-checkout-manager' ); ?></th>
|
104 |
-
|
105 |
-
<th class="filter_field roles" style="display:none;" width="15%"><?php _e('Show for Roles (Separated by ' , 'woocommerce-checkout-manager' ); ?><span class="toggle_shower current_opener">||</span> )</th>
|
106 |
-
|
107 |
-
<th class="filter_field" style="display:none;" width="15%"><?php _e('Hide from Roles (Separated by ' , 'woocommerce-checkout-manager' ); ?><span class="toggle_shower current_opener">||</span> )</th>
|
108 |
-
|
109 |
-
<th style="display:none;" class="filter_field add_amount_field hide_stuff_time hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c condition_tick add_amount_field" width="13%"><?php _e('Class' , 'woocommerce-checkout-manager' ); ?></th>
|
110 |
-
|
111 |
-
<th class="hide_stuff_op wccm1" style="display:none;" width="10%"><?php _e('Adapt' , 'woocommerce-checkout-manager' ); ?></th>
|
112 |
-
|
113 |
-
<th class="hide_stuff_op wccm1" style="display:none;" width="10%"><?php _e('Title' , 'woocommerce-checkout-manager' ); ?></th>
|
114 |
-
|
115 |
-
<th class="hide_stuff_op wccm1" style="display:none;" width="60%"><?php _e('List of Options (Separated by ' , 'woocommerce-checkout-manager' ); ?><span class="toggle_shower current_opener">||</span> )</th>
|
116 |
-
|
117 |
-
<th style="cursor:pointer;text-align:center;font-size:30px;display:none;" class="filter_field add_amount_field condition_tick hide_stuff_change hide_stuff_time hide_stuff_opcheck hide_stuff_tog hide_stuff_color more_toggler1 more_toggler1c" width="2%"><span class="toggle_shower">≡</span></th>
|
118 |
-
<!--
|
119 |
-
<th style="cursor:pointer;text-align:center;font-size:30px;display:none;" class="filter_field add_amount_field condition_tick hide_stuff_opcheck hide_stuff_op hide_stuff_change hide_stuff_time_tog hide_stuff_color more_toggler1 more_toggler1c" width="2%"><span class="toggle_shower">≡</span></th>
|
120 |
-
|
121 |
-
<th style="cursor:pointer;text-align:center;font-size:30px;display:none;" class="filter_field add_amount_field hide_stuff_time condition_tick hide_stuff_change hide_stuff_opcheck hide_stuff_days hide_stuff_color_tog hide_stuff_op more_toggler1 more_toggler1c" width="2%"><span class="toggle_shower">≡</span></th>
|
122 |
-
-->
|
123 |
-
<th style="display:none;cursor:pointer;text-align:center;font-size:30px;" class="filter_field add_amount_field condition_tick hide_stuff_change hide_stuff_opcheck hide_stuff_time hide_stuff_op hide_stuff_color more_toggler1 more_toggler1a" width="2%"><span class="toggle_shower">≡</span></th>
|
124 |
-
|
125 |
-
<th style="cursor:pointer;text-align:center;font-size:30px;" class="filter_field add_amount_field hide_stuff_time condition_tick hide_stuff_change hide_stuff_opcheck hide_stuff_color more_toggler hide_stuff_op more_toggler1c" width="2%"><span class="toggle_shower">≡</span></th>
|
126 |
-
|
127 |
-
<th class="more_toggler1" style="width:10%;"><?php _e('Choose Type' , 'woocommerce-checkout-manager' ); ?></th>
|
128 |
-
|
129 |
-
<th class="more_toggler1" style="width:5%"><?php _e('Abbreviation' , 'woocommerce-checkout-manager' ); ?></th>
|
130 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/templates/admin/woocheckout-billing.php
DELETED
@@ -1,75 +0,0 @@
|
|
1 |
-
<table class="widefat billing-wccs-table billing-semi" style="display:none;" border="1" name="billing_table">
|
2 |
-
<thead>
|
3 |
-
|
4 |
-
<tr>
|
5 |
-
<th style="width:3%;" class="billing-wccs-order" title="<?php esc_attr_e('Change the order of Checkout fields', 'woocommerce-checkout-manager'); ?>">#</th>
|
6 |
-
|
7 |
-
<?php require( WOOCCM_PLUGIN_DIR . 'includes/templates/admin/woocheckout-billing-thead.php' ); ?>
|
8 |
-
|
9 |
-
<th width="1%" scope="col" title="<?php esc_attr_e('Remove button', 'woocommerce-checkout-manager'); ?>"><strong>X</strong><!-- remove --></th>
|
10 |
-
</tr>
|
11 |
-
|
12 |
-
</thead>
|
13 |
-
<tbody>
|
14 |
-
|
15 |
-
<?php
|
16 |
-
if ($fields = WOOCCM()->field->billing->get_fields('old')) {
|
17 |
-
|
18 |
-
//var_dump($fields);
|
19 |
-
|
20 |
-
$defaults = WOOCCM()->field->billing->get_defaults();
|
21 |
-
|
22 |
-
foreach ($fields as $i => $field) {
|
23 |
-
?>
|
24 |
-
|
25 |
-
<tr valign="top" id="wccs-billing-id-<?php echo $i; ?>" class="billing-wccs-row">
|
26 |
-
|
27 |
-
<td style="display:none;" class="billing-wccs-order-hidden" >
|
28 |
-
<input type="hidden" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][order]" value="<?php echo ( empty($field['order']) ) ? $i : $field['order']; ?>" />
|
29 |
-
</td>
|
30 |
-
<td class="billing-wccs-order" title="<?php esc_attr_e('Drag-and-drop this Checkout field to adjust its ordering', 'woocommerce-checkout-manager'); ?>"><?php echo $i + 1; ?></td>
|
31 |
-
|
32 |
-
<?php require( WOOCCM_PLUGIN_DIR . 'includes/templates/admin/woocheckout-billing-tbody.php' ); ?>
|
33 |
-
|
34 |
-
<?php if (in_array($field['cow'], $defaults)) { ?>
|
35 |
-
<td style="text-align:center;">
|
36 |
-
<input name="wccs_settings3[billing_buttons][<?php echo $i; ?>][disabled]" type="checkbox" value="true" <?php if (!empty($field['disabled'])) echo "checked='checked'"; ?> />
|
37 |
-
</td>
|
38 |
-
<?php } else { ?>
|
39 |
-
<td class="billing-wccs-remove"><a class="billing-wccs-remove-button" href="javascript:;" title="<?php esc_attr_e('Delete this Checkout field', 'woocommerce-checkout-manager'); ?>">×</a></td>
|
40 |
-
<?php } ?>
|
41 |
-
|
42 |
-
</tr>
|
43 |
-
<!-- #wccs-billing-id-<?php echo $i; ?> .billing-wccs-row -->
|
44 |
-
|
45 |
-
<?php
|
46 |
-
}
|
47 |
-
}
|
48 |
-
?>
|
49 |
-
|
50 |
-
<?php
|
51 |
-
$i = 999;
|
52 |
-
?>
|
53 |
-
|
54 |
-
<tr valign="top" id="wccs-billing-id-<?php echo $i; ?>" class="billing-wccs-clone" >
|
55 |
-
|
56 |
-
<td style="display:none;" class="billing-wccs-order-hidden">
|
57 |
-
<input type="hidden" name="wccs_settings3[billing_buttons][<?php echo $i; ?>][order]" value="<?php echo $i; ?>" />
|
58 |
-
</td>
|
59 |
-
|
60 |
-
<td class="billing-wccs-order" title="<?php esc_attr_e('Drag-and-drop this Checkout field to adjust its ordering', 'woocommerce-checkout-manager'); ?>"><?php echo $i; ?></td>
|
61 |
-
|
62 |
-
<?php require( WOOCCM_PLUGIN_DIR . 'includes/templates/admin/woocheckout-billing-clone.php' ); ?>
|
63 |
-
|
64 |
-
<td class="billing-wccs-remove"><a class="billing-wccs-remove-button" href="javascript:;" title="<?php esc_attr_e('Delete this Checkout field', 'woocommerce-checkout-manager'); ?>">×</a></td>
|
65 |
-
|
66 |
-
</tr>
|
67 |
-
<!-- #wccs-billing-id-<?php echo $i; ?> .billing-wccs-clone -->
|
68 |
-
</tbody>
|
69 |
-
</table>
|
70 |
-
<!-- .widefat -->
|
71 |
-
|
72 |
-
<div class="billing-wccs-table-footer billing-semi" style="display:none;">
|
73 |
-
<a href="javascript:;" id="billing-wccs-add-button" class="button-secondary"><?php _e('+ Add New Field', 'woocommerce-checkout-manager'); ?></a>
|
74 |
-
</div>
|
75 |
-
<!-- .billing-wccs-table-footer -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/templates/admin/woocheckout-general-address-fields.php
DELETED
@@ -1,16 +0,0 @@
|
|
1 |
-
<div class="widefat general-semi address_fields" border="1" style="display:none;">
|
2 |
-
|
3 |
-
<div class="section">
|
4 |
-
|
5 |
-
<h3 class="heading"><?php _e( 'Disable Billing Address fields for certain products', 'woocommerce-checkout-manager' ); ?></h3>
|
6 |
-
<div class="option">
|
7 |
-
<input type="text" name="wccs_settings[checkness][productssave]" style="width: 100%;" value="<?php echo ( !empty( $options['checkness']['productssave'] ) ? sanitize_text_field( $options['checkness']['productssave'] ) : '' ); ?>" />
|
8 |
-
<h3 class="heading address"><div class="info-of"><?php _e('To get product number, goto the listing of WooCoommerce Products then hover over each product and you will see ID. Example', 'woocommerce-checkout-manager'); ?> "ID: 3651"</div></h3>
|
9 |
-
</div>
|
10 |
-
<!-- .option -->
|
11 |
-
|
12 |
-
</div>
|
13 |
-
<!-- .section -->
|
14 |
-
|
15 |
-
</div>
|
16 |
-
<!-- .address_fields -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/templates/admin/woocheckout-general-advanced.php
DELETED
@@ -1,29 +0,0 @@
|
|
1 |
-
<div class="widefat general-semi advanced" border="1" style="display:none;">
|
2 |
-
|
3 |
-
<div class="section">
|
4 |
-
<h3 class="heading"><?php _e('Advanced', 'woocommerce-checkout-manager'); ?></h3>
|
5 |
-
</div>
|
6 |
-
<!-- .section -->
|
7 |
-
|
8 |
-
<div class="section">
|
9 |
-
|
10 |
-
<div class="option">
|
11 |
-
<div class="info-of"><?php _e('Administrator Actions', 'woocommerce-checkout-manager'); ?></div>
|
12 |
-
<?php if( current_user_can( 'manage_options' ) ) { ?>
|
13 |
-
<ul>
|
14 |
-
<li><a href="<?php echo add_query_arg( array( 'action' => 'wooccm_reset_update_notice', '_wpnonce' => wp_create_nonce( 'wooccm_reset_update_notice' ) ) ); ?>"><?php _e( 'Reset <em>Run the updater</em> prompt', 'woocommerce-checkout-manager' ); ?></a></li>
|
15 |
-
<li><a href="<?php echo add_query_arg( array( 'action' => 'wooccm_nuke_options', '_wpnonce' => wp_create_nonce( 'wooccm_nuke_options' ) ) ); ?>" class="confirm-button" data-confirm="<?php _e( 'This will permanently delete all WordPress Options associated with WooCommerce Checkout Manager. Are you sure you want to proceed?', 'woocommerce-checkout-manager' ); ?>"><?php _e( 'Delete WooCommerce Checkout Manager WordPress Options', 'woocommerce-checkout-manager' ); ?></a></li>
|
16 |
-
<li><a href="<?php echo add_query_arg( array( 'action' => 'wooccm_nuke_order_meta', '_wpnonce' => wp_create_nonce( 'wooccm_nuke_order_meta' ) ) ); ?>" class="confirm-button" data-confirm="<?php _e( 'This will permanently delete all WordPress Post meta associated with WooCommerce Checkout Manager that is linked to Orders. Are you sure you want to proceed?', 'woocommerce-checkout-manager' ); ?>"><?php _e( 'Delete WooCommerce Checkout Manager Orders Post meta', 'woocommerce-checkout-manager' ); ?></a></li>
|
17 |
-
<li><a href="<?php echo add_query_arg( array( 'action' => 'wooccm_nuke_user_meta', '_wpnonce' => wp_create_nonce( 'wooccm_nuke_user_meta' ) ) ); ?>" class="confirm-button" data-confirm="<?php _e( 'This will permanently delete all WordPress Post meta associated with WooCommerce Checkout Manager that is linked to Users. Are you sure you want to proceed?', 'woocommerce-checkout-manager' ); ?>"><?php _e( 'Delete WooCommerce Checkout Manager Users Post meta', 'woocommerce-checkout-manager' ); ?></a></li>
|
18 |
-
</ul>
|
19 |
-
<?php } else { ?>
|
20 |
-
<p><?php _e( 'These actions are available only to WordPress Users with the <em>manage_options</em> User Capability.', 'woocommerce-checkout-manager' ); ?></p>
|
21 |
-
<?php } ?>
|
22 |
-
</div>
|
23 |
-
<!-- .option -->
|
24 |
-
|
25 |
-
</div>
|
26 |
-
<!-- .section -->
|
27 |
-
|
28 |
-
</div>
|
29 |
-
<!--.advanced -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/templates/admin/woocheckout-general-checkout-notices.php
DELETED
@@ -1,82 +0,0 @@
|
|
1 |
-
<div class="widefat general-semi checkout_notices" border="1" style="display:none;" >
|
2 |
-
|
3 |
-
<div class="section">
|
4 |
-
|
5 |
-
<h3 class="heading"><?php _e('Position for notification one', 'woocommerce-checkout-manager'); ?></h3>
|
6 |
-
|
7 |
-
<h3 class="heading checkbox">
|
8 |
-
|
9 |
-
<div class="option">
|
10 |
-
<label>
|
11 |
-
<input type="checkbox" name="wccs_settings[checkness][checkbox1]" style="float:left;" value="true"<?php checked( !empty( $options['checkness']['checkbox1'] ), true ); ?> />
|
12 |
-
<div class="info-of"><?php _e('Before Customer Address Fields', 'woocommerce-checkout-manager'); ?></div>
|
13 |
-
</label>
|
14 |
-
</div>
|
15 |
-
<!-- .option -->
|
16 |
-
|
17 |
-
</h3>
|
18 |
-
<!-- .heading -->
|
19 |
-
|
20 |
-
<h3 class="heading checkbox">
|
21 |
-
|
22 |
-
<div class="option">
|
23 |
-
<label>
|
24 |
-
<input type="checkbox" name="wccs_settings[checkness][checkbox2]" style="float:left;" value="true"<?php checked( !empty( $options['checkness']['checkbox2'] ), true ); ?> />
|
25 |
-
<div class="info-of"><?php _e('Before Order Summary', 'woocommerce-checkout-manager'); ?></div>
|
26 |
-
</label>
|
27 |
-
</div>
|
28 |
-
<!-- .option -->
|
29 |
-
|
30 |
-
</h3>
|
31 |
-
<!-- .heading -->
|
32 |
-
|
33 |
-
<div class="option">
|
34 |
-
<div class="info-of"><?php _e('Notification text area: You can use class', 'woocommerce-checkout-manager'); ?> "woocommerce-info" <?php _e('for the same design as WooCommerce Coupon.', 'woocommerce-checkout-manager'); ?></div>
|
35 |
-
<textarea type="textarea" name="wccs_settings[checkness][text1]" class="full-width" style="height:150px;"><?php echo ( !empty( $options['checkness']['text1'] ) ? esc_attr( $options['checkness']['text1'] ) : '' ); ?></textarea>
|
36 |
-
</div>
|
37 |
-
<!-- .option -->
|
38 |
-
|
39 |
-
</div>
|
40 |
-
<!-- section -->
|
41 |
-
|
42 |
-
<div class="section">
|
43 |
-
|
44 |
-
<h3 class="heading"><?php _e('Position for notification two', 'woocommerce-checkout-manager'); ?></h3>
|
45 |
-
|
46 |
-
<h3 class="heading checkbox">
|
47 |
-
|
48 |
-
<div class="option">
|
49 |
-
<label>
|
50 |
-
<input type="checkbox" name="wccs_settings[checkness][checkbox3]" style="float:left;" value="true"<?php checked( !empty( $options['checkness']['checkbox3'] ), true ); ?> />
|
51 |
-
<div class="info-of"><?php _e('Before Customer Address Fields', 'woocommerce-checkout-manager'); ?></div>
|
52 |
-
</label>
|
53 |
-
</div>
|
54 |
-
<!-- .option -->
|
55 |
-
|
56 |
-
</h3>
|
57 |
-
<!-- .heading -->
|
58 |
-
|
59 |
-
<h3 class="heading checkbox">
|
60 |
-
|
61 |
-
<div class="option">
|
62 |
-
<label>
|
63 |
-
<input type="checkbox" name="wccs_settings[checkness][checkbox4]" style="float:left;" value="true"<?php checked( !empty( $options['checkness']['checkbox4'] ), true ); ?> />
|
64 |
-
<div class="info-of"><?php _e('Before Order Summary', 'woocommerce-checkout-manager'); ?></div>
|
65 |
-
</label>
|
66 |
-
</div>
|
67 |
-
<!-- .option -->
|
68 |
-
|
69 |
-
</h3>
|
70 |
-
<!-- .heading -->
|
71 |
-
|
72 |
-
<div class="option">
|
73 |
-
<div class="info-of"><?php _e('Notification text area: You can use class', 'woocommerce-checkout-manager'); ?> "woocommerce-info" <?php _e('for the same design as WooCommerce Coupon.', 'woocommerce-checkout-manager'); ?></div>
|
74 |
-
<textarea type="textarea" name="wccs_settings[checkness][text2]" class="full-width" style="height:150px;"><?php echo ( !empty( $options['checkness']['text2'] ) ? esc_attr( $options['checkness']['text2'] ) : '' ); ?></textarea>
|
75 |
-
</div>
|
76 |
-
<!-- .option -->
|
77 |
-
|
78 |
-
</div>
|
79 |
-
<!-- section -->
|
80 |
-
|
81 |
-
</div>
|
82 |
-
<!-- .checkout_notices -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/templates/admin/woocheckout-general-custom-css.php
DELETED
@@ -1,28 +0,0 @@
|
|
1 |
-
<div class="widefat general-semi custom_css" border="1" style="display:none;">
|
2 |
-
|
3 |
-
<div class="section">
|
4 |
-
|
5 |
-
<h3 class="heading"><?php _e('Custom CSS','woocommerce-checkout-manager'); ?></h3>
|
6 |
-
|
7 |
-
<div class="option">
|
8 |
-
<textarea type="text" name="wccs_settings[checkness][custom_css_w]" class="full-width" style="height:200px;"><?php echo ( !empty( $options['checkness']['custom_css_w'] ) ? esc_textarea( $options['checkness']['custom_css_w'] ) : '' ); ?></textarea>
|
9 |
-
</div>
|
10 |
-
<!-- .option -->
|
11 |
-
|
12 |
-
<h3 class="heading checkbox">
|
13 |
-
|
14 |
-
<div class="option">
|
15 |
-
<div class="info-of">
|
16 |
-
<?php _e('CSS language stands for Cascading Style Sheets which is used to style html content. You can change the fonts size, colours, margins of content, which lines to show or input, adjust height, width, background images etc.','woocommerce-checkout-manager'); ?>
|
17 |
-
<?php _e('Get help in our', 'woocommerce-checkout-manager'); ?> <a href="https://wordpress.org/support/plugin/woocommerce-checkout-manager" target="_blank"><?php _e('Support Forum', 'woocommerce-checkout-manager'); ?></a>.
|
18 |
-
</div>
|
19 |
-
</div>
|
20 |
-
<!-- .option -->
|
21 |
-
|
22 |
-
</h3>
|
23 |
-
|
24 |
-
</div>
|
25 |
-
<!-- .section -->
|
26 |
-
|
27 |
-
</div>
|
28 |
-
<!-- .custom_css -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/templates/admin/woocheckout-general-order-notes.php
DELETED
@@ -1,150 +0,0 @@
|
|
1 |
-
<div class="widefat general-semi order_notes" border="1" style="display:none;">
|
2 |
-
|
3 |
-
<div class="section">
|
4 |
-
|
5 |
-
<h3 class="heading"><?php _e('Order Notes','woocommerce-checkout-manager'); ?></h3>
|
6 |
-
|
7 |
-
<div class="option">
|
8 |
-
<div class="info-of"><?php _e('Order Notes Label', 'woocommerce-checkout-manager'); ?></div>
|
9 |
-
<input type="text" name="wccs_settings[checkness][noteslabel]" class="full-width" style="clear:both;" value="<?php echo ( isset( $options['checkness']['noteslabel'] ) ? sanitize_text_field( $options['checkness']['noteslabel'] ) : '' ); ?>" />
|
10 |
-
</div>
|
11 |
-
<!-- .option -->
|
12 |
-
|
13 |
-
<div class="option">
|
14 |
-
<div class="info-of"><?php _e('Order Notes Placeholder', 'woocommerce-checkout-manager'); ?></div>
|
15 |
-
<input type="text" name="wccs_settings[checkness][notesplaceholder]" class="full-width" style="clear:both;" value="<?php echo ( isset( $options['checkness']['notesplaceholder'] ) ? sanitize_text_field( $options['checkness']['notesplaceholder'] ) : '' ); ?>" />
|
16 |
-
</div>
|
17 |
-
<!-- .option -->
|
18 |
-
|
19 |
-
<h3 class="heading checkbox" style="clear:both;">
|
20 |
-
|
21 |
-
<div class="option">
|
22 |
-
<label>
|
23 |
-
<input type="checkbox" name="wccs_settings[checkness][notesenable]" value="true"<?php checked( !empty( $options['checkness']['notesenable'] ), true ); ?> />
|
24 |
-
<div class="info-of"><?php _e('Disable Order Notes.', 'woocommerce-checkout-manager'); ?></div>
|
25 |
-
</label>
|
26 |
-
</div>
|
27 |
-
<!-- .option -->
|
28 |
-
|
29 |
-
</h3>
|
30 |
-
|
31 |
-
</div>
|
32 |
-
<!-- .section -->
|
33 |
-
|
34 |
-
<div class="section">
|
35 |
-
|
36 |
-
<h3 class="heading"><?php _e('Time Order was purchased', 'woocommerce-checkout-manager'); ?></h3>
|
37 |
-
|
38 |
-
<div class="option">
|
39 |
-
<div class="info-of"><?php _e('Order time title', 'woocommerce-checkout-manager'); ?></div>
|
40 |
-
<input type="text" name="wccs_settings[checkness][time_stamp_title]" class="full-width" style="clear:both;" value="<?php echo ( !empty( $options['checkness']['time_stamp_title'] ) ? sanitize_text_field( $options['checkness']['time_stamp_title'] ) : '' ); ?>" />
|
41 |
-
</div>
|
42 |
-
<!-- .option -->
|
43 |
-
|
44 |
-
<div class="option">
|
45 |
-
<div class="info-of"><?php _e('Set TimeZone', 'woocommerce-checkout-manager'); ?></div>
|
46 |
-
<input type="text" name="wccs_settings[checkness][set_timezone]" class="full-width" style="clear:both;" value="<?php echo ( !empty( $options['checkness']['set_timezone'] ) ? sanitize_text_field( $options['checkness']['set_timezone'] ) : '' ); ?>" />
|
47 |
-
</div>
|
48 |
-
<!-- .option -->
|
49 |
-
|
50 |
-
<h3 class="heading checkbox" style="clear:both;">
|
51 |
-
|
52 |
-
<div class="option">
|
53 |
-
<label>
|
54 |
-
<input type="checkbox" name="wccs_settings[checkness][time_stamp]" value="true"<?php checked( !empty( $options['checkness']['time_stamp'] ), true ); ?> />
|
55 |
-
<div class="info-of"><?php _e('Enable display of order time.', 'woocommerce-checkout-manager'); ?></div>
|
56 |
-
</label>
|
57 |
-
</div>
|
58 |
-
<!-- .option -->
|
59 |
-
|
60 |
-
<div class="option">
|
61 |
-
<label>
|
62 |
-
<input type="checkbox" name="wccs_settings[checkness][twenty_hour]" value="true"<?php checked( !empty( $options['checkness']['twenty_hour'] ), true ); ?> />
|
63 |
-
<div class="info-of"><?php _e('Enable 24 hour time.', 'woocommerce-checkout-manager'); ?></div>
|
64 |
-
</label>
|
65 |
-
</div>
|
66 |
-
<!-- .option -->
|
67 |
-
|
68 |
-
</h3>
|
69 |
-
<!-- .heading -->
|
70 |
-
|
71 |
-
</div>
|
72 |
-
<!-- .section -->
|
73 |
-
|
74 |
-
<div class="section">
|
75 |
-
|
76 |
-
<h3 class="heading"><?php _e('Payment Method used by Customer', 'woocommerce-checkout-manager'); ?></h3>
|
77 |
-
|
78 |
-
<div class="option">
|
79 |
-
<input type="text" name="wccs_settings[checkness][payment_method_d]" class="full-width" value="<?php echo ( !empty( $options['checkness']['payment_method_d'] ) ? sanitize_text_field( $options['checkness']['payment_method_d'] ) : '' ); ?>" />
|
80 |
-
</div>
|
81 |
-
<!-- .option -->
|
82 |
-
|
83 |
-
<h3 class="heading checkbox">
|
84 |
-
|
85 |
-
<div class="option">
|
86 |
-
<label>
|
87 |
-
<input type="checkbox" name="wccs_settings[checkness][payment_method_t]" value="true" <?php checked( !empty( $options['checkness']['payment_method_t'] ), true ) ?> />
|
88 |
-
<div class="info-of"><?php _e('Enable display of Payment Method.', 'woocommerce-checkout-manager'); ?></div>
|
89 |
-
</label>
|
90 |
-
</div>
|
91 |
-
<!-- .option -->
|
92 |
-
|
93 |
-
</h3>
|
94 |
-
<!-- .heading -->
|
95 |
-
|
96 |
-
</div>
|
97 |
-
<!-- .section -->
|
98 |
-
|
99 |
-
<div class="section">
|
100 |
-
|
101 |
-
<h3 class="heading"><?php _e('Shipping method used by customer', 'woocommerce-checkout-manager'); ?></h3>
|
102 |
-
|
103 |
-
<div class="option">
|
104 |
-
<input type="text" name="wccs_settings[checkness][shipping_method_d]" class="full-width" value="<?php echo ( !empty( $options['checkness']['shipping_method_d'] ) ? sanitize_text_field( $options['checkness']['shipping_method_d'] ) : '' ) ?>" />
|
105 |
-
</div>
|
106 |
-
<!-- .option -->
|
107 |
-
|
108 |
-
<h3 class="heading checkbox">
|
109 |
-
|
110 |
-
<div class="option">
|
111 |
-
<label>
|
112 |
-
<input type="checkbox" name="wccs_settings[checkness][shipping_method_t]" value="true"<?php checked( !empty( $options['checkness']['shipping_method_t'] ), true ); ?> />
|
113 |
-
<div class="info-of"><?php _e('Enable display of Shipping Method.', 'woocommerce-checkout-manager'); ?></div>
|
114 |
-
</label>
|
115 |
-
</div>
|
116 |
-
<!-- .option -->
|
117 |
-
|
118 |
-
</h3>
|
119 |
-
<!-- .heading -->
|
120 |
-
|
121 |
-
</div>
|
122 |
-
<!-- .section -->
|
123 |
-
|
124 |
-
<div class="section">
|
125 |
-
|
126 |
-
<h3 class="heading"><?php _e('Default State code for Checkout.', 'woocommerce-checkout-manager'); ?></h3>
|
127 |
-
|
128 |
-
<div class="option">
|
129 |
-
<input type="text" placeholder="ND" name="wccs_settings[checkness][per_state]" class="full-width" value="<?php echo ( !empty( $options['checkness']['per_state'] ) ? sanitize_text_field( $options['checkness']['per_state'] ) : '' ); ?>" />
|
130 |
-
</div>
|
131 |
-
<!-- .option -->
|
132 |
-
|
133 |
-
<h3 class="heading checkbox">
|
134 |
-
|
135 |
-
<div class="option">
|
136 |
-
<label>
|
137 |
-
<input type="checkbox" name="wccs_settings[checkness][per_state_check]" value="true" <?php checked( !empty( $options['checkness']['per_state_check'] ), true ); ?> />
|
138 |
-
<div class="info-of"><?php _e('Enable default state code.', 'woocommerce-checkout-manager'); ?></div>
|
139 |
-
</label>
|
140 |
-
</div>
|
141 |
-
<!-- .option -->
|
142 |
-
|
143 |
-
</h3>
|
144 |
-
<!-- .heading -->
|
145 |
-
|
146 |
-
</div>
|
147 |
-
<!-- .section -->
|
148 |
-
|
149 |
-
</div>
|
150 |
-
<!-- .order_notes -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/templates/admin/woocheckout-general-switches.php
DELETED
@@ -1,186 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
// Defaults
|
3 |
-
$position = ( !empty( $options['checkness']['position'] ) ? sanitize_text_field( $options['checkness']['position'] ) : 'after_order_notes' );
|
4 |
-
?>
|
5 |
-
|
6 |
-
<div class="widefat general-semi switches" border="1" style="display:none;">
|
7 |
-
|
8 |
-
<div class="section">
|
9 |
-
<h3 class="heading"><?php _e('General Switches', 'woocommerce-checkout-manager'); ?></h3>
|
10 |
-
</div>
|
11 |
-
<!-- .section -->
|
12 |
-
|
13 |
-
<div class="section">
|
14 |
-
<h3 class="heading checkbox">
|
15 |
-
|
16 |
-
<div class="option">
|
17 |
-
<label>
|
18 |
-
<input type="checkbox" name="wccs_settings[checkness][additional_info]" value="true"<?php checked( !empty( $options['checkness']['additional_info'] ), true ); ?> />
|
19 |
-
<div class="info-of"><?php printf( __('Hide %s heading', 'woocommerce-checkout-manager'), __( 'Ship to a different address?', 'woocommerce-checkout-manager' ) ); ?></div>
|
20 |
-
</label>
|
21 |
-
</div>
|
22 |
-
<!-- .option -->
|
23 |
-
|
24 |
-
</h3>
|
25 |
-
</div>
|
26 |
-
<!-- section -->
|
27 |
-
|
28 |
-
<div class="section">
|
29 |
-
<h3 class="heading checkbox">
|
30 |
-
|
31 |
-
<div class="option">
|
32 |
-
<label>
|
33 |
-
<input type="checkbox" name="wccs_settings[checkness][show_shipping_fields]" value="true"<?php checked( !empty( $options['checkness']['show_shipping_fields'] ), true ); ?> />
|
34 |
-
<div class="info-of"><?php printf( __( ' Force show Shipping Checkout fields (to be used in conjunction with %s)', 'woocommerce-checkout-manager' ), sprintf( __( 'Hide %s heading', 'woocommerce-checkout-manager' ), __( 'Ship to a different address?', 'woocommerce-checkout-manager' ) ) ); ?></div>
|
35 |
-
</label>
|
36 |
-
</div>
|
37 |
-
<!-- .option -->
|
38 |
-
|
39 |
-
</h3>
|
40 |
-
</div>
|
41 |
-
<!-- section -->
|
42 |
-
|
43 |
-
<div class="section">
|
44 |
-
<h3 class="heading checkbox">
|
45 |
-
|
46 |
-
<div class="option">
|
47 |
-
<label>
|
48 |
-
<input type="checkbox" name="wccs_settings[checkness][auto_create_wccm_account]" value="true"<?php checked( !empty( $options['checkness']['auto_create_wccm_account'] ), true ); ?> />
|
49 |
-
<div class="info-of"><?php printf( __( 'Hide %s checkbox on Checkout page for guests', 'woocommerce-checkout-manager' ), __( 'Create an account?', 'woocommerce-checkout-manager' ) ); ?></div>
|
50 |
-
</label>
|
51 |
-
</div>
|
52 |
-
<!-- .option -->
|
53 |
-
|
54 |
-
</h3>
|
55 |
-
</div>
|
56 |
-
<!-- section -->
|
57 |
-
|
58 |
-
<div class="section">
|
59 |
-
<h3 class="heading checkbox">
|
60 |
-
|
61 |
-
<div class="option">
|
62 |
-
<label>
|
63 |
-
<input type="checkbox" name="wccs_settings[checkness][retainval]" value="true"<?php checked( !empty( $options['checkness']['retainval'] ), true ); ?> />
|
64 |
-
<div class="info-of"><?php _e('Retain Fields Information', 'woocommerce-checkout-manager'); ?></div>
|
65 |
-
</label>
|
66 |
-
</div>
|
67 |
-
<!-- .option -->
|
68 |
-
|
69 |
-
</h3>
|
70 |
-
</div>
|
71 |
-
<!-- section -->
|
72 |
-
|
73 |
-
<div class="section">
|
74 |
-
<h3 class="heading checkbox">
|
75 |
-
|
76 |
-
<div class="option">
|
77 |
-
<label>
|
78 |
-
<input type="checkbox" name="wccs_settings[checkness][abbreviation]" value="true"<?php checked( !empty( $options['checkness']['abbreviation'] ), true ); ?> />
|
79 |
-
<div class="info-of"><?php _e('Editing Of Abbreviation Fields', 'woocommerce-checkout-manager'); ?></div>
|
80 |
-
</label>
|
81 |
-
</div>
|
82 |
-
<!-- .option -->
|
83 |
-
|
84 |
-
</h3>
|
85 |
-
</div>
|
86 |
-
<!-- section -->
|
87 |
-
|
88 |
-
<!--<div class="section">
|
89 |
-
<h3 class="heading checkbox">
|
90 |
-
<div class="option">
|
91 |
-
<label>
|
92 |
-
<input type="checkbox" name="wccs_settings[checkness][admin_translation]" value="true"<?php checked( !empty( $options['checkness']['admin_translation'] ), true ); ?> />
|
93 |
-
<div class="info-of"><?php _e('Translate WooCommerce Checkout Manager Options Panel', 'woocommerce-checkout-manager'); ?></div>
|
94 |
-
</label>
|
95 |
-
</div>
|
96 |
-
</h3>
|
97 |
-
</div>-->
|
98 |
-
<!-- section -->
|
99 |
-
|
100 |
-
<div class="section">
|
101 |
-
<h3 class="heading"><?php _e('Additional Fields Position on Checkout', 'woocommerce-checkout-manager'); ?></h3>
|
102 |
-
</div>
|
103 |
-
<!-- .section -->
|
104 |
-
|
105 |
-
<div class="section">
|
106 |
-
<h3 class="heading checkbox radio">
|
107 |
-
|
108 |
-
<div class="option">
|
109 |
-
<label>
|
110 |
-
<input type="radio" name="wccs_settings[checkness][position]" value="before_billing_form"<?php checked( $position, 'before_billing_form' ); ?> />
|
111 |
-
<div class="info-of"><?php _e( 'Before Billing fields', 'woocommerce-checkout-manager' ); ?></div>
|
112 |
-
<div class="info-of">- <?php _e( 'Additional Checkout fields will appear before the Billing Checkout fields section.', 'woocommerce-checkout-manager' ); ?></div>
|
113 |
-
</label>
|
114 |
-
</div>
|
115 |
-
<!-- .option -->
|
116 |
-
|
117 |
-
</h3>
|
118 |
-
</div>
|
119 |
-
<!-- section -->
|
120 |
-
|
121 |
-
<div class="section">
|
122 |
-
<h3 class="heading checkbox radio">
|
123 |
-
|
124 |
-
<div class="option">
|
125 |
-
<label>
|
126 |
-
<input type="radio" name="wccs_settings[checkness][position]" value="after_billing_form"<?php checked( $position, 'after_billing_form' ); ?> />
|
127 |
-
<div class="info-of"><?php _e('After Billing fields', 'woocommerce-checkout-manager'); ?></div>
|
128 |
-
<div class="info-of">- <?php _e('Additional Checkout fields will appear after the Billing Checkout fields section.', 'woocommerce-checkout-manager'); ?></div>
|
129 |
-
</label>
|
130 |
-
</div>
|
131 |
-
<!-- .option -->
|
132 |
-
|
133 |
-
</h3>
|
134 |
-
</div>
|
135 |
-
<!-- section -->
|
136 |
-
|
137 |
-
<div class="section">
|
138 |
-
<h3 class="heading checkbox radio">
|
139 |
-
|
140 |
-
<div class="option">
|
141 |
-
<label>
|
142 |
-
<input type="radio" name="wccs_settings[checkness][position]" value="before_shipping_form"<?php checked( $position, 'before_shipping_form' ); ?> />
|
143 |
-
<div class="info-of"><?php _e('Before Shipping fields', 'woocommerce-checkout-manager'); ?></div>
|
144 |
-
<div class="info-of">- <?php _e('Additional Checkout fields will appear before the Shipping Checkout fields section.', 'woocommerce-checkout-manager'); ?></div>
|
145 |
-
</label>
|
146 |
-
</div>
|
147 |
-
<!-- .option -->
|
148 |
-
|
149 |
-
</h3>
|
150 |
-
</div>
|
151 |
-
<!-- section -->
|
152 |
-
|
153 |
-
<div class="section">
|
154 |
-
<h3 class="heading checkbox radio">
|
155 |
-
|
156 |
-
<div class="option">
|
157 |
-
<label>
|
158 |
-
<input type="radio" name="wccs_settings[checkness][position]" value="after_shipping_form"<?php checked( $position, 'after_shipping_form' ); ?> />
|
159 |
-
<div class="info-of"><?php _e('After Shipping fields', 'woocommerce-checkout-manager'); ?></div>
|
160 |
-
<div class="info-of">- <?php _e('Additional Checkout fields will appear after the Shipping Checkout fields section.', 'woocommerce-checkout-manager'); ?></div>
|
161 |
-
</label>
|
162 |
-
</div>
|
163 |
-
<!-- .option -->
|
164 |
-
|
165 |
-
</h3>
|
166 |
-
</div>
|
167 |
-
<!-- section -->
|
168 |
-
|
169 |
-
<div class="section">
|
170 |
-
<h3 class="heading checkbox radio">
|
171 |
-
|
172 |
-
<div class="option">
|
173 |
-
<label>
|
174 |
-
<input type="radio" name="wccs_settings[checkness][position]" value="after_order_notes"<?php checked( $position, 'after_order_notes' ); ?> />
|
175 |
-
<div class="info-of"><?php _e('After Order Notes', 'woocommerce-checkout-manager'); ?> (<?php _e( 'Default', 'woocommerce-checkout-manager' ); ?>)</div>
|
176 |
-
<div class="info-of">- <?php _e('Additional Checkout fields will appear after the Order Notes Checkout section.', 'woocommerce-checkout-manager'); ?></div>
|
177 |
-
</label>
|
178 |
-
</div>
|
179 |
-
<!-- .option -->
|
180 |
-
|
181 |
-
</h3>
|
182 |
-
</div>
|
183 |
-
<!-- section -->
|
184 |
-
|
185 |
-
</div>
|
186 |
-
<!-- .switches -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/templates/admin/woocheckout-general-uploads.php
DELETED
@@ -1,153 +0,0 @@
|
|
1 |
-
<div class="widefat general-semi upload_files" border="0">
|
2 |
-
|
3 |
-
<div class="section">
|
4 |
-
<h3 class="heading"><?php _e('General File Upload', 'woocommerce-checkout-manager'); ?></h3>
|
5 |
-
</div>
|
6 |
-
<!-- .section -->
|
7 |
-
|
8 |
-
<div class="section">
|
9 |
-
<h3 class="heading checkbox">
|
10 |
-
<div class="option">
|
11 |
-
<label>
|
12 |
-
<input type="checkbox" name="wccs_settings[checkness][enable_file_upload]" value="true"<?php checked( !empty( $options['checkness']['enable_file_upload'] ), true ); ?> /><span></span>
|
13 |
-
<div class="info-of"><?php _e('Allow Customers to Upload Files', 'woocommerce-checkout-manager'); ?></div>
|
14 |
-
</label>
|
15 |
-
</div>
|
16 |
-
<!-- .option -->
|
17 |
-
</h3>
|
18 |
-
</div>
|
19 |
-
<!-- .section -->
|
20 |
-
|
21 |
-
<div class="section">
|
22 |
-
<h3 class="heading checkbox">
|
23 |
-
<div class="option">
|
24 |
-
<label>
|
25 |
-
<input type="checkbox" name="wccs_settings[checkness][cat_file_upload]" value="true" disabled="disabled" /><span></span>
|
26 |
-
<div class="info-of">
|
27 |
-
|
28 |
-
<?php _e('Categorize Uploaded Files', 'woocommerce-checkout-manager'); ?> | <span style="cursor: pointer;" class="show_hide2"><a>read more</a></span>
|
29 |
-
<span style="display:none;" class="slidingDiv2">
|
30 |
-
<br /><br />
|
31 |
-
This feature has been emporarily removed, it will be re-introduced in a minor Plugin update.
|
32 |
-
<br /><br />
|
33 |
-
<?php _e('Changes uploaded files location folder from', 'woocommerce-checkout-manager'); ?> <br />
|
34 |
-
<strong><?php echo $upload_dir['url']; ?>/</strong> <br />
|
35 |
-
<?php _e('to', 'woocommerce-checkout-manager'); ?><br />
|
36 |
-
<strong><?php echo $upload_dir['baseurl']; ?>/wooccm_uploads/{order number}/</strong>
|
37 |
-
</span>
|
38 |
-
|
39 |
-
</div>
|
40 |
-
</label>
|
41 |
-
</div>
|
42 |
-
<!-- .option -->
|
43 |
-
</h3>
|
44 |
-
</div>
|
45 |
-
<!-- .section -->
|
46 |
-
|
47 |
-
<div class="section">
|
48 |
-
<h3 class="heading"><?php _e('Upload Title', 'woocommerce-checkout-manager'); ?></h3>
|
49 |
-
<div class="option">
|
50 |
-
<input type="text" name="wccs_settings[checkness][upload_title]" class="full-width" placeholder="<?php esc_html_e( 'Order Uploaded Files', 'woocommerce-checkout-manager' ); ?>" value="<?php echo ( isset( $options['checkness']['upload_title'] ) ? esc_attr( $options['checkness']['upload_title'] ) : '' ); ?>" />
|
51 |
-
</div>
|
52 |
-
<!-- .option -->
|
53 |
-
</div>
|
54 |
-
<!-- .section -->
|
55 |
-
|
56 |
-
<div class="section">
|
57 |
-
<h3 class="heading"><?php _e('Notification E-mail', 'woocommerce-checkout-manager'); ?></h3>
|
58 |
-
<div class="option">
|
59 |
-
<input type="text" name="wccs_settings[checkness][wooccm_notification_email]" class="full-width" value="<?php echo ( isset( $options['checkness']['wooccm_notification_email'] ) ? sanitize_text_field( $options['checkness']['wooccm_notification_email'] ) : '' ); ?>" placeholder="<?php echo get_option( 'admin_email' ); ?>" />
|
60 |
-
</div>
|
61 |
-
<!-- .option -->
|
62 |
-
</div>
|
63 |
-
<!-- .section -->
|
64 |
-
|
65 |
-
<div class="section">
|
66 |
-
<h3 class="heading"><?php _e('Products', 'woocommerce-checkout-manager'); ?></h3>
|
67 |
-
<div class="info-of"><?php _e('Allow File Upload', 'woocommerce-checkout-manager'); ?></div>
|
68 |
-
<div class="option allow">
|
69 |
-
<input type="text" name="wccs_settings[checkness][allow_file_upload]" class="full-width" placeholder="<?php _e( 'Enter Product ID(s); Example: 1674, 1423, 1234', 'woocommerce-checkout-manager' ); ?>" value="<?php echo ( !empty($options['checkness']['allow_file_upload']) ? sanitize_text_field( $options['checkness']['allow_file_upload'] ) : '' ); ?>" />
|
70 |
-
</div>
|
71 |
-
<!-- .option -->
|
72 |
-
</div>
|
73 |
-
<!-- .section -->
|
74 |
-
|
75 |
-
<div class="section">
|
76 |
-
<div class="info-of"><?php _e('Deny File Upload', 'woocommerce-checkout-manager'); ?></div>
|
77 |
-
<div class="option">
|
78 |
-
<input type="text" name="wccs_settings[checkness][deny_file_upload]" class="full-width" placeholder="<?php _e( 'Enter Product ID(s); Example: 1674, 1423, 1234', 'woocommerce-checkout-manager' ); ?>" value="<?php echo ( !empty( $options['checkness']['deny_file_upload'] ) ? sanitize_text_field( $options['checkness']['deny_file_upload'] ) : '' ); ?>" />
|
79 |
-
</div>
|
80 |
-
<!-- .option -->
|
81 |
-
</div>
|
82 |
-
<!-- .section -->
|
83 |
-
|
84 |
-
<div class="section">
|
85 |
-
<h3 class="heading"><?php _e('Categories', 'woocommerce-checkout-manager'); ?></h3>
|
86 |
-
<div class="info-of"><?php _e('Allow File Upload', 'woocommerce-checkout-manager'); ?></div>
|
87 |
-
<div class="option allow">
|
88 |
-
<input type="text" name="wccs_settings[checkness][allow_file_upload_cat]" class="full-width" placeholder="<?php _e( 'Enter Category Slug(s); Example: my-cat, flowers_in', 'woocommerce-checkout-manager' ); ?>" value="<?php echo ( !empty( $options['checkness']['allow_file_upload_cat'] ) ? sanitize_text_field( $options['checkness']['allow_file_upload_cat'] ) : '' ); ?>" />
|
89 |
-
</div>
|
90 |
-
<!-- .option -->
|
91 |
-
</div>
|
92 |
-
<!-- .section -->
|
93 |
-
|
94 |
-
<div class="section">
|
95 |
-
<div class="info-of"><?php _e('Deny File Upload', 'woocommerce-checkout-manager'); ?></div>
|
96 |
-
<div class="option">
|
97 |
-
<input type="text" name="wccs_settings[checkness][deny_file_upload_cat]" class="full-width" placeholder="<?php _e( 'Enter Category Slug(s); Example: my-cat, flowers_in', 'woocommerce-checkout-manager' ); ?>" value="<?php echo ( !empty( $options['checkness']['deny_file_upload_cat'] ) ? sanitize_text_field( $options['checkness']['deny_file_upload_cat'] ) : '' ); ?>" />
|
98 |
-
</div>
|
99 |
-
<!-- .option -->
|
100 |
-
</div>
|
101 |
-
<!-- .section -->
|
102 |
-
|
103 |
-
<div class="section">
|
104 |
-
<h3 class="heading"><?php _e('General Alerts', 'woocommerce-checkout-manager'); ?></h3>
|
105 |
-
<div class="info-of"><?php _e('Picture Editing Saved', 'woocommerce-checkout-manager'); ?></div>
|
106 |
-
<div class="option allow">
|
107 |
-
<input type="text" name="wccs_settings[checkness][picture_success]" class="full-width" placeholder="<?php _e( 'Picture Saved', 'woocommerce-checkout-manager' ); ?>" value="<?php echo ( !empty( $options['checkness']['picture_success'] ) ? sanitize_text_field( $options['checkness']['picture_success'] ) : __( 'Picture Saved!', 'woocommerce-checkout-manager' ) ); ?>" />
|
108 |
-
</div>
|
109 |
-
<!-- .option -->
|
110 |
-
</div>
|
111 |
-
<!-- .section -->
|
112 |
-
|
113 |
-
<div class="section">
|
114 |
-
<div class="info-of"><?php _e('Deletion confirmation', 'woocommerce-checkout-manager'); ?></div>
|
115 |
-
<div class="option">
|
116 |
-
<input type="text" name="wccs_settings[checkness][file_delete]" class="full-width" placeholder="<?php _e( 'Delete', 'woocommerce-checkout-manager' ); ?>" value="<?php echo ( !empty( $options['checkness']['file_delete'] ) ? sanitize_text_field( $options['checkness']['file_delete'] ) : __( 'Delete', 'woocommerce-checkout-manager' ) ); ?>" />
|
117 |
-
</div>
|
118 |
-
<!-- .option -->
|
119 |
-
</div>
|
120 |
-
<!-- .section -->
|
121 |
-
|
122 |
-
<div class="section">
|
123 |
-
|
124 |
-
<h3 class="heading"><?php _e('Restrictions', 'woocommerce-checkout-manager'); ?></h3>
|
125 |
-
|
126 |
-
<div class="info-of"><?php _e('File types', 'woocommerce-checkout-manager'); ?></div>
|
127 |
-
<div class="option allow">
|
128 |
-
<input type="text" name="wccs_settings[checkness][file_types]" class="full-width" placeholder="png,jpeg,gif" value="<?php echo ( !empty( $options['checkness']['file_types'] ) ? sanitize_text_field( $options['checkness']['file_types'] ) : '' ); ?>" />
|
129 |
-
</div>
|
130 |
-
<!-- .option -->
|
131 |
-
|
132 |
-
<div class="info-of"><?php _e('Number Of Files to Upload', 'woocommerce-checkout-manager'); ?></div>
|
133 |
-
<div class="option allow">
|
134 |
-
<input type="text" name="wccs_settings[checkness][file_upload_number]" class="full-width" placeholder="4" value="<?php echo ( !empty( $options['checkness']['file_upload_number'] ) ? absint( $options['checkness']['file_upload_number'] ) : '' ); ?>" />
|
135 |
-
</div>
|
136 |
-
<!-- .option -->
|
137 |
-
|
138 |
-
</div>
|
139 |
-
<!-- .section -->
|
140 |
-
|
141 |
-
<div class="section">
|
142 |
-
|
143 |
-
<div class="info-of"><?php _e('Allow Upload for Order Status', 'woocommerce-checkout-manager'); ?></div>
|
144 |
-
<div class="option">
|
145 |
-
<input type="text" name="wccs_settings[checkness][upload_os]" class="full-width" placeholder="completed" value="<?php echo ( !empty( $options['checkness']['upload_os'] ) ? sanitize_text_field( $options['checkness']['upload_os'] ) : '' ); ?>" />
|
146 |
-
</div>
|
147 |
-
<!-- .option -->
|
148 |
-
|
149 |
-
</div>
|
150 |
-
<!-- .section -->
|
151 |
-
|
152 |
-
</div>
|
153 |
-
<!-- .upload_files -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/templates/admin/woocheckout-general.php
DELETED
@@ -1,57 +0,0 @@
|
|
1 |
-
<div id="general-semi-nav">
|
2 |
-
|
3 |
-
<div id="main-nav-left">
|
4 |
-
<ul>
|
5 |
-
<li class="upload_class current">
|
6 |
-
<a title="<?php _e( 'Uploads', 'woocommerce-checkout-manager' ); ?>"><?php _e( 'Uploads', 'woocommerce-checkout-manager' ); ?></a>
|
7 |
-
</li>
|
8 |
-
<li class="address_fields_class">
|
9 |
-
<a title="<?php _e( 'Address Fields', 'woocommerce-checkout-manager' ); ?>"><?php _e( 'Hide Address Fields', 'woocommerce-checkout-manager' ); ?></a>
|
10 |
-
</li>
|
11 |
-
<li class="checkout_notice_class">
|
12 |
-
<a title="<?php _e( 'Checkout Notices', 'woocommerce-checkout-manager' ); ?>"><?php _e( 'Checkout Notices', 'woocommerce-checkout-manager' ); ?></a>
|
13 |
-
</li>
|
14 |
-
<li class="switches_class">
|
15 |
-
<a title="<?php _e( 'Switches', 'woocommerce-checkout-manager' ); ?>"><?php _e( 'Switches', 'woocommerce-checkout-manager' ); ?></a>
|
16 |
-
</li>
|
17 |
-
<li class="order_notes_class">
|
18 |
-
<a title="<?php _e( 'Order Notes', 'woocommerce-checkout-manager' ); ?>"><?php _e( 'Order Notes', 'woocommerce-checkout-manager' ); ?></a>
|
19 |
-
</li>
|
20 |
-
<li class="custom_css_class">
|
21 |
-
<a title="<?php _e( 'Custom CSS', 'woocommerce-checkout-manager' ); ?>"><?php _e( 'Custom CSS', 'woocommerce-checkout-manager' ); ?></a>
|
22 |
-
</li>
|
23 |
-
<li class="advanced_class">
|
24 |
-
<a title="<?php _e( 'Advanced', 'woocommerce-checkout-manager' ); ?>"><?php _e( 'Advanced', 'woocommerce-checkout-manager' ); ?></a>
|
25 |
-
</li>
|
26 |
-
</ul>
|
27 |
-
</div>
|
28 |
-
<!-- #main-nav-left -->
|
29 |
-
|
30 |
-
<div id="content-nav-right" class="general-vibe">
|
31 |
-
|
32 |
-
<!-- Uploads tab -->
|
33 |
-
<?php require( WOOCCM_PLUGIN_DIR.'includes/templates/admin/woocheckout-general-uploads.php' ); ?>
|
34 |
-
|
35 |
-
<!-- Hide Address Fields tab -->
|
36 |
-
<?php require( WOOCCM_PLUGIN_DIR.'includes/templates/admin/woocheckout-general-address-fields.php' ); ?>
|
37 |
-
|
38 |
-
<!-- Order Notes tab -->
|
39 |
-
<?php require( WOOCCM_PLUGIN_DIR.'includes/templates/admin/woocheckout-general-order-notes.php' ); ?>
|
40 |
-
|
41 |
-
<!-- Custom CSS tab -->
|
42 |
-
<?php require( WOOCCM_PLUGIN_DIR.'includes/templates/admin/woocheckout-general-custom-css.php' ); ?>
|
43 |
-
|
44 |
-
<!-- Checkout Notices tab -->
|
45 |
-
<?php require( WOOCCM_PLUGIN_DIR.'includes/templates/admin/woocheckout-general-checkout-notices.php' ); ?>
|
46 |
-
|
47 |
-
<!-- Switches tab -->
|
48 |
-
<?php require( WOOCCM_PLUGIN_DIR.'includes/templates/admin/woocheckout-general-switches.php' ); ?>
|
49 |
-
|
50 |
-
<!-- Advanced tab -->
|
51 |
-
<?php require( WOOCCM_PLUGIN_DIR.'includes/templates/admin/woocheckout-general-advanced.php' ); ?>
|
52 |
-
|
53 |
-
</div>
|
54 |
-
<!-- #content-nav-right -->
|
55 |
-
|
56 |
-
</div>
|
57 |
-
<!-- #general-semi-nav -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/templates/admin/woocheckout-shipping-clone.php
DELETED
@@ -1,160 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* WooCommerce Checkout Manager
|
4 |
-
*
|
5 |
-
*/
|
6 |
-
|
7 |
-
// Exit if accessed directly
|
8 |
-
if ( !defined( 'ABSPATH' ) )
|
9 |
-
exit;
|
10 |
-
?>
|
11 |
-
|
12 |
-
<td style="display:none;text-align:center;" class="more_toggler1c"><input type="checkbox" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][more_content]" title="<?php esc_attr_e( 'More than two content', 'woocommerce-checkout-manager' ); ?>" value="" /></td>
|
13 |
-
|
14 |
-
<td style="display:none;" class="more_toggler1c"><input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][single_p]" placeholder="<?php _e('Product ID(s) e.g 1674||1233','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'Hide field from this Products Only', 'woocommerce-checkout-manager' ); ?>" value="" /></td>
|
15 |
-
|
16 |
-
<td style="display:none;" class="more_toggler1c"><input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][single_px]" placeholder="<?php _e('Product ID(s) e.g 1674||1233','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'Display Field for these Products Only', 'woocommerce-checkout-manager' ); ?>" value="" /></td>
|
17 |
-
|
18 |
-
<td style="display:none;" class="more_toggler1c"><input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][single_p_cat]" placeholder="<?php _e('Category Slug(s) e.g my-cat||my-cat2','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'Hide field from Category', 'woocommerce-checkout-manager' ); ?>" value="" /></td>
|
19 |
-
|
20 |
-
<td style="display:none;" class="more_toggler1c"><input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][single_px_cat]" placeholder="<?php _e('Category Slug(s) e.g my-cat||my-cat2','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'Show Field for Category', 'woocommerce-checkout-manager' ); ?>" value="" /></td>
|
21 |
-
|
22 |
-
<td style="display:none;" class="hide_stuff_time"><input type="text" placeholder="6" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][start_hour]" value="" /></td>
|
23 |
-
|
24 |
-
<td style="display:none;" class="hide_stuff_time"><input type="text" placeholder="9" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][end_hour]" value="" /></td>
|
25 |
-
|
26 |
-
<td style="display:none;" class="hide_stuff_time"><input type="text" placeholder="15" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][interval_min]" value="" /></td>
|
27 |
-
|
28 |
-
<td style="display:none;" class="hide_stuff_time"><input type="text" placeholder="0, 10, 20, 30, 40" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][manual_min]" value="" /></td>
|
29 |
-
|
30 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days"><input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][format_date]" placeholder="" title="dd-mm-yy" value="" /></td>
|
31 |
-
|
32 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days"><input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][min_before]" placeholder="+3" title="Days Before" value="" /></td>
|
33 |
-
|
34 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days"><input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][max_after]" placeholder="3" title="Days After" value="" /></td>
|
35 |
-
|
36 |
-
<td style="display:none;text-align:center;" class="hide_stuff_color daoo"><input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][days_disabler]" type="checkbox" value="" /></td>
|
37 |
-
|
38 |
-
<td style="display:none;text-align:center;" class="hide_stuff_days"><input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][days_disabler0]" type="checkbox" value="" /></td>
|
39 |
-
|
40 |
-
<td style="display:none;text-align:center;" class="hide_stuff_days"><input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][days_disabler1]" type="checkbox" value="" /></td>
|
41 |
-
|
42 |
-
<td style="display:none;text-align:center;" class="hide_stuff_days"><input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][days_disabler2]" type="checkbox" value="" /></td>
|
43 |
-
|
44 |
-
<td style="display:none;text-align:center;" class="hide_stuff_days"><input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][days_disabler3]" type="checkbox" value="" /></td>
|
45 |
-
|
46 |
-
<td style="display:none;text-align:center;" class="hide_stuff_days"><input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][days_disabler4]" type="checkbox" value="" /></td>
|
47 |
-
|
48 |
-
<td style="display:none;text-align:center;" class="hide_stuff_days"><input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][days_disabler5]" type="checkbox" value="" /></td>
|
49 |
-
|
50 |
-
<td style="display:none;text-align:center;" class="hide_stuff_days"><input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][days_disabler6]" type="checkbox" value="" /></td>
|
51 |
-
|
52 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days" title="<?php esc_attr_e( 'Min Date', 'woocommerce-checkout-manager' ); ?>"><span class="spongagge"><?php _e( 'Min Date', 'woocommerce-checkout-manager' ); ?></span></td>
|
53 |
-
|
54 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days"><input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][single_yy]" placeholder="<?php _e('2013','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'yy', 'woocommerce-checkout-manager' ); ?>" value="" /></td>
|
55 |
-
|
56 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days"><input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][single_mm]" placeholder="<?php _e('10','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'mm', 'woocommerce-checkout-manager' ); ?>" value="" /></td>
|
57 |
-
|
58 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days"><input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][single_dd]" placeholder="<?php _e('25','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'dd', 'woocommerce-checkout-manager' ); ?>" value="" /></td>
|
59 |
-
|
60 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days" title="<?php esc_attr_e( 'Max Date', 'woocommerce-checkout-manager' ); ?>"><span class="spongagge"><?php _e( 'Max Date', 'woocommerce-checkout-manager' ); ?></span></td>
|
61 |
-
|
62 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days"><input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][single_max_yy]" placeholder="<?php _e('2013','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'yy', 'woocommerce-checkout-manager' ); ?>" value="" /></td>
|
63 |
-
|
64 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days"><input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][single_max_mm]" placeholder="<?php _e('10','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'mm', 'woocommerce-checkout-manager' ); ?>" value="" /></td>
|
65 |
-
|
66 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days"><input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][single_max_dd]" placeholder="<?php _e('25','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'dd', 'woocommerce-checkout-manager' ); ?>" value="" /></td>
|
67 |
-
|
68 |
-
<td class="more_toggler1" style="text-align:center;"><input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][checkbox]" type="checkbox" title="<?php esc_attr_e( 'Add/Remove Required Attribute', 'woocommerce-checkout-manager' ); ?>" value="" /></td>
|
69 |
-
|
70 |
-
<td class="more_toggler1" style="text-align:center;">
|
71 |
-
<select name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][position]" > <!--Call run() function-->
|
72 |
-
<option value="form-row-wide" ><?php _e( 'Wide','woocommerce-checkout-manager' ); ?></option>
|
73 |
-
<option value="form-row-first" ><?php _e( 'Left','woocommerce-checkout-manager' ); ?></option>
|
74 |
-
<option value="form-row-last" ><?php _e( 'Right','woocommerce-checkout-manager' ); ?></option>
|
75 |
-
</select>
|
76 |
-
</td>
|
77 |
-
|
78 |
-
<td class="more_toggler1" style="text-align:center;"><input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][clear_row]" type="checkbox" title="<?php esc_attr_e( 'Clear Row', 'woocommerce-checkout-manager' ); ?>" value=" " /></td>
|
79 |
-
|
80 |
-
<td class="filter_field" style="display:none;text-align:center;"><input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][deny_checkout]" type="checkbox" title="<?php esc_attr_e( 'Deny Checkout', 'woocommerce-checkout-manager' ); ?>" value=" " /></td>
|
81 |
-
|
82 |
-
<td class="filter_field_tog add_amount_field condition_tick hide_stuff_time hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c" style="display:none;"><?php _e('Filter Toggler', 'woocommerce-checkout-manager' ); ?></td>
|
83 |
-
|
84 |
-
<td class="filter_field" style="display:none;text-align:center;"><input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][tax_remove]" type="checkbox" title="<?php esc_attr_e( 'Remove tax', 'woocommerce-checkout-manager' ); ?>" value=" " /></td>
|
85 |
-
|
86 |
-
<td class="filter_field" style="display:none;text-align:center;"><input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][deny_receipt]" type="checkbox" title="<?php esc_attr_e( 'Deny Receipt', 'woocommerce-checkout-manager' ); ?>" value=" " /></td>
|
87 |
-
<!--
|
88 |
-
<td class="filter_field condition_tick hide_stuff_change hide_stuff_time hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c" style="display:none;text-align:center;"><input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][add_amount]" type="checkbox" title="<?php esc_attr_e( 'Add Amount', 'woocommerce-checkout-manager' ); ?>" value=" " /></td>
|
89 |
-
-->
|
90 |
-
<td class="add_amount_field" style="display:none;text-align:center;"><input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][fee_name]" type="text" title="<?php esc_attr_e( 'Amount Name', 'woocommerce-checkout-manager' ); ?>" value="" placeholder="<?php _e('My Custom Charge','woocommerce-checkout-manager'); ?>" /></td>
|
91 |
-
|
92 |
-
<td class="add_amount_field" style="display:none;text-align:center;"><input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][add_amount_field]" type="text" title="<?php esc_attr_e( 'Add Amount Field', 'woocommerce-checkout-manager' ); ?>" value="" placeholder="50" /></td>
|
93 |
-
|
94 |
-
<td class="filter_field add_amount_field hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_time hide_stuff_color more_toggler1 more_toggler1c" style="display:none;text-align:center;"><input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][conditional_parent_use]" type="checkbox" title="<?php esc_attr_e( 'Conditional Field On', 'woocommerce-checkout-manager' ); ?>" value=" " /></td>
|
95 |
-
|
96 |
-
<td class="condition_tick" style="display:none;text-align:center;"><input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][conditional_parent]" type="checkbox" title="<?php esc_attr_e( 'Conditional Parent', 'woocommerce-checkout-manager' ); ?>" value=" " /></td>
|
97 |
-
|
98 |
-
<td class="more_toggler1"><input placeholder="<?php _e('My Field Name','woocommerce-checkout-manager'); ?>" type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][label]" title="<?php esc_attr_e( 'Label of the New Field', 'woocommerce-checkout-manager' ); ?>" value="" /></td>
|
99 |
-
|
100 |
-
<td class="more_toggler1"><input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][placeholder]" placeholder="<?php _e('Example red','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'Placeholder - Preview of Data to Input', 'woocommerce-checkout-manager' ); ?>" value="" /></td>
|
101 |
-
|
102 |
-
<td style="display:none;" class="filter_field add_amount_field hide_stuff_time hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c condition_tick add_amount_field"><input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][chosen_valt]" placeholder="<?php _e('Yes','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'Chosen value for conditional', 'woocommerce-checkout-manager' ); ?>" value="" /></td>
|
103 |
-
|
104 |
-
<td style="display:none;" class="condition_tick"><input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][conditional_tie]" placeholder="<?php _e('Parent Abbr. Name','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'Parent Abbr. Name', 'woocommerce-checkout-manager' ); ?>" value="" /></td>
|
105 |
-
|
106 |
-
<td style="display:none;" class="filter_field"><input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][colorpickerd]" id="shipping-colorpic<?php echo $i; ?>" title="<?php esc_attr_e( 'Default Color', 'woocommerce-checkout-manager' ); ?>" value="#000000" /></td>
|
107 |
-
|
108 |
-
<td style="display:none;" class="filter_field">
|
109 |
-
<select name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][colorpickertype]" > <!--Call run() function-->
|
110 |
-
<option value="farbtastic" ><?php _e('Farbtastic','woocommerce-checkout-manager'); ?></option>
|
111 |
-
<option value="iris" ><?php _e('Iris','woocommerce-checkout-manager'); ?></option>
|
112 |
-
</select>
|
113 |
-
</td>
|
114 |
-
|
115 |
-
<td style="display:none;text-align:center;" class="filter_field"><input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][user_role]" type="checkbox" value="" /></td>
|
116 |
-
|
117 |
-
<td class="filter_field" style="display:none;"><input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][role_options]" placeholder="Option 1||Option 2||Option 3" value="" /></td>
|
118 |
-
|
119 |
-
<td class="filter_field" style="display:none;"><input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][role_options2]" placeholder="Option 1||Option 2||Option 3" value="" /></td>
|
120 |
-
|
121 |
-
<td style="display:none;" class="filter_field add_amount_field hide_stuff_change hide_stuff_time hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c condition_tick add_amount_field"><input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][extra_class]" value="" /></td>
|
122 |
-
|
123 |
-
|
124 |
-
<td style="display:none;text-align:center;" class="hide_stuff_op wccm1"><input type="checkbox" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][fancy]" title="<?php esc_attr_e( 'Adapt to woocommerce style', 'woocommerce-checkout-manager' ); ?>" value="" /></td>
|
125 |
-
|
126 |
-
<td class="hide_stuff_op wccm1" style="display:none;"><input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][force_title2]" value="" placeholder="<?php _e('Name Guide','woocommerce-checkout-manager'); ?>" /></td>
|
127 |
-
|
128 |
-
<td class="hide_stuff_op wccm1" style="display:none;"><input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][option_array]" value="" placeholder="Option 1||Option 2||Option 3" /></td>
|
129 |
-
|
130 |
-
<td class="filter_field add_amount_field hide_stuff_time condition_tick hide_stuff_change hide_stuff_opcheck hide_stuff_color more_toggler1 more_toggler1c" style="display:none;"><?php _e('Options Toggler', 'woocommerce-checkout-manager' ); ?></td>
|
131 |
-
<!--
|
132 |
-
<td class="filter_field add_amount_field condition_tick hide_stuff_change hide_stuff_timef hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c" style="display:none;"><?php _e('Time Toggler', 'woocommerce-checkout-manager' ); ?></td>
|
133 |
-
|
134 |
-
<td class="filter_field add_amount_field hide_stuff_time condition_tick hide_stuff_change hide_stuff_opcheck hide_stuff_op more_toggler1 more_toggler1c hide_stuff_days" style="display:none;"><?php _e('Date Toggler', 'woocommerce-checkout-manager' ); ?></td>
|
135 |
-
-->
|
136 |
-
<td style="display:none;" class="filter_field add_amount_field hide_stuff_time condition_tick hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1"><?php _e('Hidden Toggler', 'woocommerce-checkout-manager' ); ?></td>
|
137 |
-
|
138 |
-
<td class="filter_field add_amount_field condition_tick hide_stuff_time hide_stuff_change hide_stuff_opcheck hide_stuff_color hide_stuff_op more_toggler more_toggler1c"><?php _e('More Toggler', 'woocommerce-checkout-manager' ); ?></td>
|
139 |
-
|
140 |
-
<td class="more_toggler1">
|
141 |
-
<select name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][type]" > <!--Call run() function-->
|
142 |
-
<option value="wooccmtext" ><?php _e('Text Input','woocommerce-checkout-manager'); ?></option>
|
143 |
-
<option value="wooccmtextarea" ><?php _e('Textarea','woocommerce-checkout-manager'); ?></option>
|
144 |
-
<option value="wooccmpassword" ><?php _e('Password','woocommerce-checkout-manager'); ?></option>
|
145 |
-
<option value="wooccmradio" ><?php _e('Radio Buttons','woocommerce-checkout-manager'); ?></option>
|
146 |
-
<option value="checkbox_wccm" ><?php _e('Check Box','woocommerce-checkout-manager'); ?></option>
|
147 |
-
<option value="wooccmselect" ><?php _e('Select Options','woocommerce-checkout-manager'); ?></option>
|
148 |
-
<!--<option value="datepicker" ><?php _e('Date Picker','woocommerce-checkout-manager'); ?></option>
|
149 |
-
<option value="time" ><?php _e('Time Picker','woocommerce-checkout-manager'); ?></option>-->
|
150 |
-
<option value="colorpicker" ><?php _e('Color Picker','woocommerce-checkout-manager'); ?></option>
|
151 |
-
<option value="heading" ><?php _e('Heading','woocommerce-checkout-manager'); ?></option>
|
152 |
-
<option value="multiselect" ><?php _e('Multi-Select','woocommerce-checkout-manager'); ?></option>
|
153 |
-
<option value="multicheckbox" ><?php _e('Multi-Checkbox','woocommerce-checkout-manager'); ?></option>
|
154 |
-
<option value="wooccmcountry" ><?php _e('Country','woocommerce-checkout-manager'); ?></option>
|
155 |
-
<option value="wooccmstate" ><?php _e('State','woocommerce-checkout-manager'); ?></option>
|
156 |
-
<option value="wooccmupload"><?php _e('File Picker','woocommerce-checkout-manager'); ?></option>
|
157 |
-
</select>
|
158 |
-
</td>
|
159 |
-
|
160 |
-
<td class="more_toggler1"><input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][cow]" placeholder="MyField" title="<?php esc_attr_e( 'Abbreviation (No spaces)', 'woocommerce-checkout-manager' ); ?>" value="" <?php if ( empty($options['checkness']['abbreviation'])) { echo 'readonly="readonly"'; } ?> /></td>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/templates/admin/woocheckout-shipping-tbody.php
DELETED
@@ -1,272 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* WooCommerce Checkout Manager
|
4 |
-
*
|
5 |
-
*/
|
6 |
-
|
7 |
-
// Exit if accessed directly
|
8 |
-
if ( !defined( 'ABSPATH' ) ) exit;
|
9 |
-
?>
|
10 |
-
|
11 |
-
<td style="display:none; text-align:center;" class="more_toggler1c">
|
12 |
-
<input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][more_content]" type="checkbox" value="1" <?php if ( !empty ($field['more_content'])) echo "checked='checked'"; ?> />
|
13 |
-
</td>
|
14 |
-
|
15 |
-
<td style="display:none;" class="more_toggler1c">
|
16 |
-
<input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][single_p]" placeholder="<?php _e('Product ID(s) e.g 1674||1233','woocommerce-checkout-manager'); ?>" value="<?php echo (empty( $field['single_p'])) ? '' : $field['single_p']; ?>" />
|
17 |
-
</td>
|
18 |
-
|
19 |
-
<td style="display:none;" class="more_toggler1c">
|
20 |
-
<input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][single_px]" placeholder="<?php _e('Product ID(s) e.g 1674||1233','woocommerce-checkout-manager'); ?>" value="<?php echo (empty( $field['single_px'])) ? '' : $field['single_px']; ?>" />
|
21 |
-
</td>
|
22 |
-
|
23 |
-
<td style="display:none;" class="more_toggler1c">
|
24 |
-
<input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][single_p_cat]" placeholder="<?php _e('Category Slug(s) e.g my-cat||my-cat2','woocommerce-checkout-manager'); ?>" value="<?php echo (empty( $field['single_p_cat'])) ? '' : $field['single_p_cat']; ?>" />
|
25 |
-
</td>
|
26 |
-
|
27 |
-
<td style="display:none;" class="more_toggler1c">
|
28 |
-
<input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][single_px_cat]" placeholder="<?php _e('Category Slug(s) e.g my-cat||my-cat2','woocommerce-checkout-manager'); ?>" value="<?php echo (empty( $field['single_px_cat'])) ? '' : $field['single_px_cat']; ?>" />
|
29 |
-
</td>
|
30 |
-
|
31 |
-
<td style="display:none;" class="hide_stuff_time">
|
32 |
-
<input type="text" placeholder="6" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][start_hour]" value="<?php echo (empty($field['start_hour'])) ? '' : $field['start_hour']; ?>" />
|
33 |
-
</td>
|
34 |
-
|
35 |
-
<td style="display:none;" class="hide_stuff_time">
|
36 |
-
<input type="text" placeholder="9" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][end_hour]" value="<?php echo (empty($field['end_hour'])) ? '' : $field['end_hour']; ?>" />
|
37 |
-
</td>
|
38 |
-
|
39 |
-
<td style="display:none;" class="hide_stuff_time">
|
40 |
-
<input type="text" placeholder="15" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][interval_min]" value="<?php echo (empty($field['interval_min'])) ? '' : $field['interval_min']; ?>" />
|
41 |
-
</td>
|
42 |
-
|
43 |
-
<td style="display:none;" class="hide_stuff_time">
|
44 |
-
<input type="text" placeholder="0, 10, 20, 30, 40" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][manual_min]" value="<?php echo (empty($field['manual_min'])) ? '' : $field['manual_min']; ?>" />
|
45 |
-
</td>
|
46 |
-
|
47 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days">
|
48 |
-
<input type="text" placeholder="dd-mm-yy" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][format_date]" value="<?php echo (empty($field['format_date'])) ? '' : $field['format_date']; ?>" />
|
49 |
-
</td>
|
50 |
-
|
51 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days">
|
52 |
-
<input type="text" placeholder="+3" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][min_before]" value="<?php echo (empty($field['min_before'])) ? '' : $field['min_before']; ?>" />
|
53 |
-
</td>
|
54 |
-
|
55 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days">
|
56 |
-
<input type="text" placeholder="3" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][max_after]" value="<?php echo (empty( $field['max_after'])) ? '' : $field['max_after']; ?>" />
|
57 |
-
</td>
|
58 |
-
|
59 |
-
<td style="display:none; text-align:center;" class="hide_stuff_color daoo">
|
60 |
-
<input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][days_disabler]" type="checkbox" value="true" <?php if ( !empty ($field['days_disabler'])) echo "checked='checked'"; ?> />
|
61 |
-
</td>
|
62 |
-
|
63 |
-
<td style="display:none; text-align:center;" class="hide_stuff_days">
|
64 |
-
<input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][days_disabler0]" type="checkbox" value="1" <?php if ( !empty ($field['days_disabler0'])) echo "checked='checked'"; ?> />
|
65 |
-
</td>
|
66 |
-
|
67 |
-
<td style="display:none; text-align:center;" class="hide_stuff_days">
|
68 |
-
<input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][days_disabler1]" type="checkbox" value="1" <?php if ( !empty ($field['days_disabler1'])) echo "checked='checked'"; ?> />
|
69 |
-
</td>
|
70 |
-
|
71 |
-
<td style="display:none; text-align:center;" class="hide_stuff_days">
|
72 |
-
<input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][days_disabler2]" type="checkbox" value="1" <?php if ( !empty ($field['days_disabler2'])) echo "checked='checked'"; ?> />
|
73 |
-
</td>
|
74 |
-
|
75 |
-
<td style="display:none; text-align:center;" class="hide_stuff_days">
|
76 |
-
<input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][days_disabler3]" type="checkbox" value="1" <?php if ( !empty ($field['days_disabler3'])) echo "checked='checked'"; ?> />
|
77 |
-
</td>
|
78 |
-
|
79 |
-
<td style="display:none; text-align:center;" class="hide_stuff_days">
|
80 |
-
<input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][days_disabler4]" type="checkbox" value="1" <?php if ( !empty ($field['days_disabler4'])) echo "checked='checked'"; ?> />
|
81 |
-
</td>
|
82 |
-
|
83 |
-
<td style="display:none; text-align:center;" class="hide_stuff_days">
|
84 |
-
<input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][days_disabler5]" type="checkbox" value="1" <?php if ( !empty ($field['days_disabler5'])) echo "checked='checked'"; ?> />
|
85 |
-
</td>
|
86 |
-
|
87 |
-
<td style="display:none; text-align:center;" class="hide_stuff_days">
|
88 |
-
<input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][days_disabler6]" type="checkbox" value="1" <?php if ( !empty ($field['days_disabler6'])) echo "checked='checked'"; ?> />
|
89 |
-
</td>
|
90 |
-
|
91 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days">
|
92 |
-
<span class="spongagge"><?php _e( 'Min Date', 'woocommerce-checkout-manager' ); ?></span>
|
93 |
-
</td>
|
94 |
-
|
95 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days">
|
96 |
-
<input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][single_yy]" placeholder="<?php _e('2013','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'yy', 'woocommerce-checkout-manager' ); ?>" value="<?php echo (empty($field['single_yy'])) ? '' : $field['single_yy']; ?>" />
|
97 |
-
</td>
|
98 |
-
|
99 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days">
|
100 |
-
<input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][single_mm]" placeholder="<?php _e('10','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'mm', 'woocommerce-checkout-manager' ); ?>" value="<?php echo (empty($field['single_mm'])) ? '' : $field['single_mm']; ?>" />
|
101 |
-
</td>
|
102 |
-
|
103 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days">
|
104 |
-
<input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][single_dd]" placeholder="<?php _e('25','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'dd', 'woocommerce-checkout-manager' ); ?>" value="<?php echo (empty($field['single_dd'])) ? '' : $field['single_dd']; ?>" />
|
105 |
-
</td>
|
106 |
-
|
107 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days">
|
108 |
-
<span class="spongagge"><?php _e( 'Max Date', 'woocommerce-checkout-manager' ); ?></span>
|
109 |
-
</td>
|
110 |
-
|
111 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days">
|
112 |
-
<input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][single_max_yy]" placeholder="<?php _e('2013','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'yy', 'woocommerce-checkout-manager' ); ?>" value="<?php echo (empty( $field['single_max_yy'])) ? '' : $field['single_max_yy']; ?>" />
|
113 |
-
</td>
|
114 |
-
|
115 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days">
|
116 |
-
<input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][single_max_mm]" placeholder="<?php _e('10','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'mm', 'woocommerce-checkout-manager' ); ?>" value="<?php echo (empty( $field['single_max_mm'])) ? '' : $field['single_max_mm']; ?>" />
|
117 |
-
</td>
|
118 |
-
|
119 |
-
<td style="display:none;" class="hide_stuff_color hide_stuff_days">
|
120 |
-
<input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][single_max_dd]" placeholder="<?php _e('25','woocommerce-checkout-manager'); ?>" title="<?php esc_attr_e( 'dd', 'woocommerce-checkout-manager' ); ?>" value="<?php echo (empty( $field['single_max_dd'])) ? '' : $field['single_max_dd']; ?>" />
|
121 |
-
</td>
|
122 |
-
|
123 |
-
<td class="more_toggler1" style="text-align:center;">
|
124 |
-
<input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][checkbox]" type="checkbox" title="<?php _e( 'Whether or not the Checkout field is required', 'woocommerce-checkout-manager' ); ?>" value="true" <?php if ( !empty ($field['checkbox'])) echo "checked='checked'"; ?> />
|
125 |
-
</td>
|
126 |
-
|
127 |
-
<td class="more_toggler1" style="text-align:center;">
|
128 |
-
<select name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][position]" title="<?php _e( 'Placement of the Checkout field', 'woocommerce-checkout-manager' ); ?>"> <!--Call run() function-->
|
129 |
-
<option value="form-row-wide" <?php ( !isset( $field['position'] ) ) ? '' : selected( $field['position'], 'form-row-wide' ); ?>><?php _e( 'Wide','woocommerce-checkout-manager' ); ?></option>
|
130 |
-
<option value="form-row-first" <?php ( !isset( $field['position'] ) ) ? '' : selected( $field['position'], 'form-row-first' ); ?>><?php _e( 'Left','woocommerce-checkout-manager' ); ?></option>
|
131 |
-
<option value="form-row-last" <?php ( !isset( $field['position'] ) ) ? '' : selected( $field['position'], 'form-row-last' ); ?>><?php _e( 'Right','woocommerce-checkout-manager' ); ?></option>
|
132 |
-
</select>
|
133 |
-
</td>
|
134 |
-
|
135 |
-
<td class="more_toggler1" style="text-align:center;">
|
136 |
-
<input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][clear_row]" type="checkbox" title="<?php _e( 'Applies a clear fix to the Checkout field', 'woocommerce-checkout-manager' ); ?>" value="true" <?php if ( !empty ($field['clear_row'])) echo "checked='checked'"; ?> />
|
137 |
-
</td>
|
138 |
-
|
139 |
-
<td class="filter_field" style="display:none;text-align:center;">
|
140 |
-
<input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][deny_checkout]" type="checkbox" value="true" <?php if ( !empty ($field['deny_checkout'])) echo "checked='checked'"; ?> />
|
141 |
-
</td>
|
142 |
-
|
143 |
-
<td class="filter_field_tog add_amount_field condition_tick hide_stuff_time hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c" style="display:none;">
|
144 |
-
<?php _e('Filter Toggler', 'woocommerce-checkout-manager' ); ?>
|
145 |
-
</td>
|
146 |
-
|
147 |
-
<td class="filter_field" style="display:none;text-align:center;">
|
148 |
-
<input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][tax_remove]" type="checkbox" value="true" <?php if ( !empty ($field['tax_remove'])) echo "checked='checked'"; ?> />
|
149 |
-
</td>
|
150 |
-
|
151 |
-
<td class="filter_field" style="display:none;text-align:center;">
|
152 |
-
<input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][deny_receipt]" type="checkbox" value="true" <?php if ( !empty ($field['deny_receipt'])) echo "checked='checked'"; ?> />
|
153 |
-
</td>
|
154 |
-
<!--
|
155 |
-
<td class="filter_field condition_tick hide_stuff_change hide_stuff_time hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c" style="display:none;text-align:center;">
|
156 |
-
<input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][add_amount]" type="checkbox" value="true" <?php if ( !empty ($field['add_amount'])) echo "checked='checked'"; ?> />
|
157 |
-
</td>
|
158 |
-
-->
|
159 |
-
<td class="add_amount_field" style="display:none;text-align:center;">
|
160 |
-
<input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][fee_name]" type="text" value="<?php echo ( isset( $field['fee_name'] ) ? $field['fee_name'] : '' ); ?>" placeholder="<?php _e('My Custom Charge','woocommerce-checkout-manager'); ?>" />
|
161 |
-
</td>
|
162 |
-
|
163 |
-
<td class="add_amount_field" style="display:none;text-align:center;">
|
164 |
-
<input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][add_amount_field]" type="text" value="<?php echo ( isset( $field['add_amount_field'] ) ? $field['add_amount_field'] : '' ); ?>" placeholder="50" />
|
165 |
-
</td>
|
166 |
-
|
167 |
-
<td class="filter_field add_amount_field hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_time hide_stuff_color more_toggler1 more_toggler1c" style="display:none;text-align:center;">
|
168 |
-
<input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][conditional_parent_use]" type="checkbox" value="true" <?php if ( !empty ($field['conditional_parent_use'])) echo "checked='checked'"; ?> />
|
169 |
-
</td>
|
170 |
-
|
171 |
-
<td class="condition_tick" style="display:none;text-align:center;">
|
172 |
-
<input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][conditional_parent]" type="checkbox" value="true" <?php if ( !empty ($field['conditional_parent'])) echo "checked='checked'"; ?> />
|
173 |
-
</td>
|
174 |
-
|
175 |
-
<td class="more_toggler1">
|
176 |
-
<input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][label]" title="<?php _e( 'Label text for the Checkout field', 'woocommerce-checkout-manager' ); ?>" placeholder="<?php _e('My Field Name','woocommerce-checkout-manager'); ?>" value="<?php echo esc_attr( $field['label'] ); ?>" />
|
177 |
-
</td>
|
178 |
-
|
179 |
-
<td class="more_toggler1">
|
180 |
-
<input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][placeholder]" title="<?php _e( 'Placeholder text for the Checkout field', 'woocommerce-checkout-manager' ); ?>" placeholder="<?php _e('Example red','woocommerce-checkout-manager'); ?>" value="<?php echo ( empty($field['placeholder'])) ? '' : $field['placeholder']; ?>" <?php if ( $field['cow'] == 'country' || $field['cow'] == 'state' ) { echo 'readonly="readonly"'; } ?> />
|
181 |
-
</td>
|
182 |
-
|
183 |
-
<td style="display:none;" class="filter_field add_amount_field hide_stuff_time hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c condition_tick add_amount_field">
|
184 |
-
<input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][chosen_valt]" placeholder="<?php _e('Yes','woocommerce-checkout-manager'); ?>" value="<?php echo ( isset( $field['chosen_valt'] ) ? $field['chosen_valt'] : '' ); ?>" />
|
185 |
-
</td>
|
186 |
-
|
187 |
-
<td style="display:none;" class="condition_tick">
|
188 |
-
<input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][conditional_tie]" placeholder="<?php _e('Parent Abbr. Name','woocommerce-checkout-manager'); ?>" value="<?php echo ( isset( $field['conditional_tie'] ) ? $field['conditional_tie'] : '' ); ?>" />
|
189 |
-
</td>
|
190 |
-
|
191 |
-
<td style="display:none;" class="filter_field">
|
192 |
-
<input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][colorpickerd]" id="shipping-colorpic<?php echo $i; ?>" placeholder="<?php _e('#000000','woocommerce-checkout-manager'); ?>" value="<?php echo ( isset( $field['colorpickerd'] ) ? $field['colorpickerd'] : '' ); ?>" />
|
193 |
-
</td>
|
194 |
-
|
195 |
-
<td style="display:none;" class="filter_field">
|
196 |
-
<select name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][colorpickertype]">
|
197 |
-
<option value="farbtastic" <?php (!isset($field['colorpickertype'])) ? '' : selected( $field['colorpickertype'], 'farbtastic' ); ?>><?php _e('Farbtastic','woocommerce-checkout-manager'); ?></option>
|
198 |
-
<option value="iris" <?php (!isset($field['colorpickertype'])) ? '' : selected( $field['colorpickertype'], 'iris' ); ?>><?php _e('Iris','woocommerce-checkout-manager'); ?></option>
|
199 |
-
</select>
|
200 |
-
</td>
|
201 |
-
|
202 |
-
<td style="display:none;text-align:center;" class="filter_field">
|
203 |
-
<input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][user_role]" type="checkbox" value="user_role" <?php if ( !empty ($field['user_role'])) echo "checked='checked'"; ?> />
|
204 |
-
</td>
|
205 |
-
|
206 |
-
<td class="filter_field" style="display:none;">
|
207 |
-
<input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][role_options]" placeholder="Option 1||Option 2||Option 3" value="<?php echo ( isset( $field['role_options'] ) ? $field['role_options'] : '' ); ?>" />
|
208 |
-
</td>
|
209 |
-
|
210 |
-
<td class="filter_field" style="display:none;">
|
211 |
-
<input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][role_options2]" placeholder="Option 1||Option 2||Option 3" value="<?php echo ( isset( $field['role_options2'] ) ? $field['role_options2'] : '' ); ?>" />
|
212 |
-
</td>
|
213 |
-
|
214 |
-
<td style="display:none;" class="filter_field add_amount_field hide_stuff_time hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c condition_tick add_amount_field">
|
215 |
-
<input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][extra_class]" value="<?php echo ( isset( $field['extra_class'] ) ? $field['extra_class'] : '' ); ?>" />
|
216 |
-
</td>
|
217 |
-
|
218 |
-
<td style="display:none;text-align:center;" class="hide_stuff_op wccm1">
|
219 |
-
<input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][fancy]" type="checkbox" value="country_select" <?php if ( !empty ($field['fancy'])) echo "checked='checked'"; ?> />
|
220 |
-
</td>
|
221 |
-
|
222 |
-
<td class="hide_stuff_op wccm1" style="display:none;">
|
223 |
-
<input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][force_title2]" placeholder="<?php _e('Name Guide','woocommerce-checkout-manager'); ?>" value="<?php echo (empty($field['force_title2'])) ? '' : $field['force_title2']; ?>" />
|
224 |
-
</td>
|
225 |
-
|
226 |
-
<td class="hide_stuff_op wccm1" style="display:none;">
|
227 |
-
<input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][option_array]" placeholder="Option 1||Option 2||Option 3" value="<?php echo ( isset( $field['option_array'] ) ? $field['option_array'] : '' ); ?>" />
|
228 |
-
</td>
|
229 |
-
|
230 |
-
<td class="filter_field add_amount_field hide_stuff_time condition_tick hide_stuff_change hide_stuff_opcheck hide_stuff_color more_toggler1 more_toggler1c" style="display:none;">
|
231 |
-
<?php _e('Options Toggler', 'woocommerce-checkout-manager' ); ?>
|
232 |
-
</td>
|
233 |
-
|
234 |
-
<!--<td class="filter_field add_amount_field condition_tick hide_stuff_change hide_stuff_timef hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c" style="display:none;">
|
235 |
-
<?php _e('Time Toggler', 'woocommerce-checkout-manager' ); ?>
|
236 |
-
</td>
|
237 |
-
|
238 |
-
<td class="filter_field add_amount_field hide_stuff_time condition_tick hide_stuff_change hide_stuff_opcheck hide_stuff_op more_toggler1 more_toggler1c hide_stuff_days" style="display:none;">
|
239 |
-
<?php _e('Date Toggler', 'woocommerce-checkout-manager' ); ?>
|
240 |
-
</td>-->
|
241 |
-
|
242 |
-
<td style="display:none;" class="filter_field add_amount_field hide_stuff_time condition_tick hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1">
|
243 |
-
<?php _e('Hidden Toggler', 'woocommerce-checkout-manager' ); ?>
|
244 |
-
</td>
|
245 |
-
|
246 |
-
<td class="filter_field add_amount_field condition_tick hide_stuff_time hide_stuff_change hide_stuff_opcheck hide_stuff_color hide_stuff_op more_toggler more_toggler1c" title="<?php _e( 'Open additional options for this Checkout field', 'woocommerce-checkout-manager' ); ?>">
|
247 |
-
<?php _e('More Toggler', 'woocommerce-checkout-manager' ); ?>
|
248 |
-
</td>
|
249 |
-
|
250 |
-
<td class="more_toggler1">
|
251 |
-
<select name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][type]" title="<?php _e( 'Type of the Checkout field', 'woocommerce-checkout-manager' ); ?>" <?php if ( $field['cow'] == 'country' || $field['cow'] == 'state' ) { echo 'readonly="readonly" style="pointer-events:none;"'; } ?> > <!--Call run() function-->
|
252 |
-
<option value="wooccmtext" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'wooccmtext' ); ?>><?php _e('Text Input','woocommerce-checkout-manager'); ?></option>
|
253 |
-
<option value="wooccmtextarea" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'wooccmtextarea' ); ?>><?php _e('Textarea','woocommerce-checkout-manager'); ?></option>
|
254 |
-
<option value="wooccmpassword" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'wooccmpassword' ); ?>><?php _e('Password','woocommerce-checkout-manager'); ?></option>
|
255 |
-
<option value="wooccmradio" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'wooccmradio' ); ?>><?php _e('Radio Buttons','woocommerce-checkout-manager'); ?></option>
|
256 |
-
<option value="checkbox_wccm" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'checkbox_wccm' ); ?>><?php _e('Check Box','woocommerce-checkout-manager'); ?></option>
|
257 |
-
<option value="wooccmselect" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'wooccmselect' ); ?>><?php _e('Select Options','woocommerce-checkout-manager'); ?></option>
|
258 |
-
<!--<option value="datepicker" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'datepicker' ); ?>><?php _e('Date Picker','woocommerce-checkout-manager'); ?></option>
|
259 |
-
<option value="time" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'time' ); ?>><?php _e('Time Picker','woocommerce-checkout-manager'); ?></option>-->
|
260 |
-
<option value="colorpicker" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'colorpicker' ); ?>><?php _e('Color Picker','woocommerce-checkout-manager'); ?></option>
|
261 |
-
<option value="heading" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'heading' ); ?>><?php _e('Heading','woocommerce-checkout-manager'); ?></option>
|
262 |
-
<option value="multiselect" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'multiselect' ); ?>><?php _e('Multi-Select','woocommerce-checkout-manager'); ?></option>
|
263 |
-
<option value="multicheckbox" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'multicheckbox' ); ?>><?php _e('Multi-Checkbox','woocommerce-checkout-manager'); ?></option>
|
264 |
-
<option <?php if ( $field['cow'] == 'country' ) { echo 'selected="selected"'; } ?> value="wooccmcountry" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'wooccmcountry' ); ?>><?php _e('Country','woocommerce-checkout-manager'); ?></option>
|
265 |
-
<option <?php if ( $field['cow'] == 'state' ) { echo 'selected="selected"'; } ?> value="wooccmstate" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'wooccmstate' ); ?>><?php _e('State','woocommerce-checkout-manager'); ?></option>
|
266 |
-
<option value="wooccmupload" <?php (!isset($field['type'])) ? '' : selected( $field['type'], 'wooccmupload' ); ?>><?php _e('File Picker','woocommerce-checkout-manager'); ?></option>
|
267 |
-
</select>
|
268 |
-
</td>
|
269 |
-
|
270 |
-
<td class="more_toggler1">
|
271 |
-
<input type="text" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][cow]" placeholder="MyField" title="<?php _e( 'To edit Abbreviations open General > Switches > Editing Of Abbreviation Fields.', 'woocommerce-checkout-manager' ); ?>" value="<?php echo $field['cow']; ?>" <?php if ( empty($options['checkness']['abbreviation'])) { echo 'readonly="readonly"'; } ?> <?php if ( in_array($field['cow'], $htmlshippingabbr ) ) { echo 'readonly="readonly" style="pointer-events:none;"'; } ?> />
|
272 |
-
</td>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/templates/admin/woocheckout-shipping-thead.php
DELETED
@@ -1,128 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* WooCommerce Checkout Manager
|
4 |
-
*/
|
5 |
-
|
6 |
-
// Exit if accessed directly
|
7 |
-
if ( !defined( 'ABSPATH' ) ) exit;
|
8 |
-
?>
|
9 |
-
|
10 |
-
<th class="more_toggler1c" style="display:none;width: 5%;"><?php _e('More' , 'woocommerce-checkout-manager' ); ?></th>
|
11 |
-
|
12 |
-
<th class="more_toggler1c hidefieldproduct" style="display:none;width: 17%;"><?php _e('Hide Field from Product' , 'woocommerce-checkout-manager' ); ?></th>
|
13 |
-
|
14 |
-
<th class="more_toggler1c" style="display:none;width: 17%;"><?php _e('Show Field for Product' , 'woocommerce-checkout-manager' ); ?></th>
|
15 |
-
|
16 |
-
<th class="more_toggler1c hidefieldcat" style="display:none;width: 20%;"><?php _e('Hide Field from Category' , 'woocommerce-checkout-manager' ); ?></th>
|
17 |
-
|
18 |
-
<th class="more_toggler1c" style="display:none;width: 20%;"><?php _e('Show Field for Category' , 'woocommerce-checkout-manager' ); ?></th>
|
19 |
-
|
20 |
-
<th class="hide_stuff_time" style="display:none;width: 16%;"><?php _e('Start Hour' , 'woocommerce-checkout-manager' ); ?></th>
|
21 |
-
|
22 |
-
<th class="hide_stuff_time" style="display:none;width: 16%;"><?php _e('End Hour' , 'woocommerce-checkout-manager' ); ?></th>
|
23 |
-
|
24 |
-
<th class="hide_stuff_time" style="display:none;width: 16%;"><?php _e('Interval Min.' , 'woocommerce-checkout-manager' ); ?></th>
|
25 |
-
|
26 |
-
<th class="hide_stuff_time" style="display:none;width: 16%;"><?php _e('Manual Min.' , 'woocommerce-checkout-manager' ); ?></th>
|
27 |
-
|
28 |
-
<th class="hide_stuff_color hide_stuff_days" style="display:none;width: 16%;"><?php _e('Date Format' , 'woocommerce-checkout-manager' ); ?></th>
|
29 |
-
|
30 |
-
<th class="hide_stuff_color hide_stuff_days" style="display:none;width: 5%;"><?php _e('Days before' , 'woocommerce-checkout-manager' ); ?></th>
|
31 |
-
|
32 |
-
<th class="hide_stuff_color hide_stuff_days" style="display:none;width: 5%;"><?php _e('Days After' , 'woocommerce-checkout-manager' ); ?></th>
|
33 |
-
|
34 |
-
<th class="hide_stuff_color daoo" style="display:none;width: 7%;"><?php _e('Days Enabler' , 'woocommerce-checkout-manager' ); ?></th>
|
35 |
-
|
36 |
-
<th class="hide_stuff_days" style="display:none;width: 7%;"><?php _e('Sundays' , 'woocommerce-checkout-manager' ); ?></th>
|
37 |
-
|
38 |
-
<th class="hide_stuff_days" style="display:none;width: 7%;"><?php _e('Mondays' , 'woocommerce-checkout-manager' ); ?></th>
|
39 |
-
|
40 |
-
<th class="hide_stuff_days" style="display:none;width: 7%;"><?php _e('Tuesdays' , 'woocommerce-checkout-manager' ); ?></th>
|
41 |
-
|
42 |
-
<th class="hide_stuff_days" style="display:none;width: 7%;"><?php _e('Wednesdays' , 'woocommerce-checkout-manager' ); ?></th>
|
43 |
-
|
44 |
-
<th class="hide_stuff_days" style="display:none;width: 7%;"><?php _e('Thursdays' , 'woocommerce-checkout-manager' ); ?></th>
|
45 |
-
|
46 |
-
<th class="hide_stuff_days" style="display:none;width: 7%;"><?php _e('Fridays' , 'woocommerce-checkout-manager' ); ?></th>
|
47 |
-
|
48 |
-
<th class="hide_stuff_days" style="display:none;width: 7%;"><?php _e('Satudays' , 'woocommerce-checkout-manager' ); ?></th>
|
49 |
-
|
50 |
-
<th class="hide_stuff_color separator hide_stuff_days" style="display:none;" width="3%"><?php _e('' , 'woocommerce-checkout-manager' ); ?></th>
|
51 |
-
|
52 |
-
<th class="hide_stuff_color hide_stuff_days" style="display:none;text-align:center;" width="5%"><?php _e('YY' , 'woocommerce-checkout-manager' ); ?></th>
|
53 |
-
|
54 |
-
<th class="hide_stuff_color hide_stuff_days" style="display:none;" width="4%"><?php _e('MM' , 'woocommerce-checkout-manager' ); ?></th>
|
55 |
-
|
56 |
-
<th class="hide_stuff_color hide_stuff_days" style="display:none;" width="4%"><?php _e('DD' , 'woocommerce-checkout-manager' ); ?></th>
|
57 |
-
|
58 |
-
<th class="hide_stuff_color separator hide_stuff_days" style="display:none;" width="3%"><?php _e('' , 'woocommerce-checkout-manager' ); ?></th>
|
59 |
-
|
60 |
-
<th class="hide_stuff_color hide_stuff_days" style="display:none;text-align:center;" width="5%"><?php _e('YY' , 'woocommerce-checkout-manager' ); ?></th>
|
61 |
-
|
62 |
-
<th class="hide_stuff_color hide_stuff_days" style="display:none;" width="4%"><?php _e('MM' , 'woocommerce-checkout-manager' ); ?></th>
|
63 |
-
|
64 |
-
<th class="hide_stuff_color hide_stuff_days" style="display:none;" width="4%"><?php _e('DD' , 'woocommerce-checkout-manager' ); ?></th>
|
65 |
-
|
66 |
-
<th class="more_toggler1" width="8%"><?php _e('Required' , 'woocommerce-checkout-manager' ); ?></th>
|
67 |
-
|
68 |
-
<th class="more_toggler1" width="5%"><?php _e('Position' , 'woocommerce-checkout-manager' ); ?></th>
|
69 |
-
|
70 |
-
<th class="more_toggler1" width="5%"><?php _e('Clear' , 'woocommerce-checkout-manager' ); ?></th>
|
71 |
-
|
72 |
-
<th class="filter_field" style="display:none;" width="5%"><?php _e('Deny Checkout' , 'woocommerce-checkout-manager' ); ?></th>
|
73 |
-
|
74 |
-
<th style="cursor: pointer; text-align: center; font-size: 30px;display:none;" class="filter_field_tog add_amount_field condition_tick hide_stuff_time hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c" style="display:none;" width="5%"><span class="toggle_shower">≡</span></th>
|
75 |
-
|
76 |
-
<th class="filter_field" style="display:none;" width="5%"><?php _e('Remove Tax' , 'woocommerce-checkout-manager' ); ?></th>
|
77 |
-
|
78 |
-
<th class="filter_field" style="display:none;" width="5%"><?php _e('Deny Receipt' , 'woocommerce-checkout-manager' ); ?></th>
|
79 |
-
<!--
|
80 |
-
<th class="filter_field condition_tick hide_stuff_change hide_stuff_time hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c add_amount" style="display:none;" width="5%"><?php _e('Add Amount' , 'woocommerce-checkout-manager' ); ?></th>
|
81 |
-
-->
|
82 |
-
<th class="add_amount_field" style="display:none;" width="5%"><?php _e('Amount Name' , 'woocommerce-checkout-manager' ); ?></th>
|
83 |
-
|
84 |
-
<th class="add_amount_field" style="display:none;" width="5%"><?php _e('Enter Amount' , 'woocommerce-checkout-manager' ); ?></th>
|
85 |
-
|
86 |
-
<th class="filter_field add_amount_field hide_stuff_change hide_stuff_time hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c apply_tick" style="display:none;" width="9%"><?php _e('Conditional' , 'woocommerce-checkout-manager' ); ?></th>
|
87 |
-
|
88 |
-
<th class="condition_tick" style="display:none;" width="9%"><?php _e('Conditional Parent' , 'woocommerce-checkout-manager' ); ?></th>
|
89 |
-
|
90 |
-
<th class="more_toggler1"><?php _e('Label' , 'woocommerce-checkout-manager' ); ?></th>
|
91 |
-
|
92 |
-
<th class="more_toggler1"><?php _e('Placeholder' , 'woocommerce-checkout-manager' ); ?></th>
|
93 |
-
|
94 |
-
<th style="display:none; width: 10%;" class="filter_field add_amount_field hide_stuff_time hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c condition_tick add_amount_field"><?php _e('Chosen Value' , 'woocommerce-checkout-manager' ); ?></th>
|
95 |
-
|
96 |
-
<th style="display:none;" class="condition_tick" width="16%"><?php _e('Conditional Tie' , 'woocommerce-checkout-manager' ); ?></th>
|
97 |
-
|
98 |
-
<th style="display:none;width:5%;" class="filter_field" width="1%"><?php _e('Default Color' , 'woocommerce-checkout-manager' ); ?></th>
|
99 |
-
|
100 |
-
<th style="display:none;" class="filter_field" width="5%"><?php _e('Picker Type' , 'woocommerce-checkout-manager' ); ?></th>
|
101 |
-
|
102 |
-
<th style="display:none;" class="filter_field" width="5%"><?php _e('User Role' , 'woocommerce-checkout-manager' ); ?></th>
|
103 |
-
|
104 |
-
<th class="filter_field roles" style="display:none;" width="15%"><?php _e('Show for Roles (Separated by ' , 'woocommerce-checkout-manager' ); ?><span class="toggle_shower current_opener">||</span> )</th>
|
105 |
-
|
106 |
-
<th class="filter_field" style="display:none;" width="15%"><?php _e('Hide from Roles (Separated by ' , 'woocommerce-checkout-manager' ); ?><span class="toggle_shower current_opener">||</span> )</th>
|
107 |
-
|
108 |
-
<th style="display:none;" class="filter_field add_amount_field hide_stuff_time hide_stuff_change hide_stuff_opcheck hide_stuff_op hide_stuff_color more_toggler1 more_toggler1c condition_tick add_amount_field" width="13%"><?php _e('Class' , 'woocommerce-checkout-manager' ); ?></th>
|
109 |
-
|
110 |
-
<th class="hide_stuff_op wccm1" style="display:none;" width="10%"><?php _e('Adapt' , 'woocommerce-checkout-manager' ); ?></th>
|
111 |
-
|
112 |
-
<th class="hide_stuff_op wccm1" style="display:none;" width="10%"><?php _e('Title' , 'woocommerce-checkout-manager' ); ?></th>
|
113 |
-
|
114 |
-
<th class="hide_stuff_op wccm1" style="display:none;" width="60%"><?php _e('List of Options (Separated by ' , 'woocommerce-checkout-manager' ); ?><span class="toggle_shower current_opener">||</span> )</th>
|
115 |
-
|
116 |
-
<th style="cursor:pointer;text-align:center;font-size:30px;display:none;" class="filter_field add_amount_field condition_tick hide_stuff_change hide_stuff_time hide_stuff_opcheck hide_stuff_tog hide_stuff_color more_toggler1 more_toggler1c" width="2%"><span class="toggle_shower">≡</span></th>
|
117 |
-
|
118 |
-
<!--<th style="cursor:pointer;text-align:center;font-size:30px;display:none;" class="filter_field add_amount_field condition_tick hide_stuff_opcheck hide_stuff_op hide_stuff_change hide_stuff_time_tog hide_stuff_color more_toggler1 more_toggler1c" width="2%"><span class="toggle_shower">≡</span></th>
|
119 |
-
|
120 |
-
<th style="cursor:pointer;text-align:center;font-size:30px;display:none;" class="filter_field add_amount_field hide_stuff_time condition_tick hide_stuff_change hide_stuff_opcheck hide_stuff_days hide_stuff_color_tog hide_stuff_op more_toggler1 more_toggler1c" width="2%"><span class="toggle_shower">≡</span></th>-->
|
121 |
-
|
122 |
-
<th style="display:none;cursor:pointer;text-align:center;font-size:30px;" class="filter_field add_amount_field condition_tick hide_stuff_change hide_stuff_opcheck hide_stuff_time hide_stuff_op hide_stuff_color more_toggler1 more_toggler1a" width="2%"><span class="toggle_shower">≡</span></th>
|
123 |
-
|
124 |
-
<th style="cursor:pointer;text-align:center;font-size:30px;" class="filter_field add_amount_field hide_stuff_time condition_tick hide_stuff_change hide_stuff_opcheck hide_stuff_color more_toggler hide_stuff_op more_toggler1c" width="2%"><span class="toggle_shower">≡</span></th>
|
125 |
-
|
126 |
-
<th class="more_toggler1" style="width:10%;"><?php _e('Choose Type' , 'woocommerce-checkout-manager' ); ?></th>
|
127 |
-
|
128 |
-
<th class="more_toggler1" style="width:5%"><?php _e('Abbreviation' , 'woocommerce-checkout-manager' ); ?></th>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/templates/admin/woocheckout-shipping.php
DELETED
@@ -1,73 +0,0 @@
|
|
1 |
-
<table class="widefat shipping-wccs-table shipping-semi" style="display:none;" border="1" name="shipping_table">
|
2 |
-
<thead>
|
3 |
-
|
4 |
-
<tr>
|
5 |
-
<th style="width:3%;" class="shipping-wccs-order" title="<?php esc_attr_e('Change the order of Checkout fields', 'woocommerce-checkout-manager'); ?>">#</th>
|
6 |
-
|
7 |
-
<?php require( WOOCCM_PLUGIN_DIR . 'includes/templates/admin/woocheckout-shipping-thead.php' ); ?>
|
8 |
-
|
9 |
-
<th width="1%" scope="col" title="<?php esc_attr_e('Remove button', 'woocommerce-checkout-manager'); ?>"><strong>X</strong><!-- remove --></th>
|
10 |
-
</tr>
|
11 |
-
|
12 |
-
</thead>
|
13 |
-
<tbody>
|
14 |
-
|
15 |
-
<?php
|
16 |
-
if ($fields = WOOCCM()->field->shipping->get_fields('old')) {
|
17 |
-
|
18 |
-
$defaults = WOOCCM()->field->shipping->get_defaults();
|
19 |
-
|
20 |
-
foreach ($fields as $i => $field) {
|
21 |
-
?>
|
22 |
-
|
23 |
-
<tr valign="top" id="wccs-shipping-id-<?php echo $i; ?>" class="shipping-wccs-row">
|
24 |
-
|
25 |
-
<td style="display:none;" class="shipping-wccs-order-hidden">
|
26 |
-
<input type="hidden" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][order]" value="<?php echo ( empty($field['order']) ) ? $i : $field['order']; ?>" />
|
27 |
-
</td>
|
28 |
-
<td class="shipping-wccs-order" title="<?php esc_attr_e('Drag-and-drop this Checkout field to adjust its ordering', 'woocommerce-checkout-manager'); ?>"><?php echo $i + 1; ?></td>
|
29 |
-
|
30 |
-
<?php require(WOOCCM_PLUGIN_DIR . 'includes/templates/admin/woocheckout-shipping-tbody.php'); ?>
|
31 |
-
|
32 |
-
<?php if (in_array($field['cow'], $defaults)) { ?>
|
33 |
-
<td style="text-align:center;">
|
34 |
-
<input name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][disabled]" type="checkbox" value="true" <?php if (!empty($field['disabled'])) echo "checked='checked'"; ?> />
|
35 |
-
</td>
|
36 |
-
<?php } else { ?>
|
37 |
-
<td class="shipping-wccs-remove"><a class="shipping-wccs-remove-button" href="javascript:;" title="<?php esc_attr_e('Delete this Checkout field', 'woocommerce-checkout-manager'); ?>">×</a></td>
|
38 |
-
<?php } ?>
|
39 |
-
|
40 |
-
</tr>
|
41 |
-
<!-- #wccs-shipping-id-<?php echo $i; ?> .shipping-wccs-row -->
|
42 |
-
|
43 |
-
<?php
|
44 |
-
}
|
45 |
-
}
|
46 |
-
?>
|
47 |
-
|
48 |
-
<?php
|
49 |
-
$i = 999;
|
50 |
-
?>
|
51 |
-
|
52 |
-
<tr valign="top" id="wccs-shipping-id-<?php echo $i; ?>" class="shipping-wccs-clone" >
|
53 |
-
|
54 |
-
<td style="display:none;" class="shipping-wccs-order-hidden" >
|
55 |
-
<input type="hidden" name="wccs_settings2[shipping_buttons][<?php echo $i; ?>][order]" value="<?php echo $i; ?>" />
|
56 |
-
</td>
|
57 |
-
|
58 |
-
<td class="shipping-wccs-order" title="<?php esc_attr_e('Drag-and-drop this Checkout field to adjust its ordering', 'woocommerce-checkout-manager'); ?>"><?php echo $i; ?></td>
|
59 |
-
|
60 |
-
<?php require( WOOCCM_PLUGIN_DIR . 'includes/templates/admin/woocheckout-shipping-clone.php' ); ?>
|
61 |
-
|
62 |
-
<td class="shipping-wccs-remove"><a class="shipping-wccs-remove-button" href="javascript:;" title="<?php esc_attr_e('Delete this Checkout field', 'woocommerce-checkout-manager'); ?>">×</a></td>
|
63 |
-
|
64 |
-
</tr>
|
65 |
-
<!-- #wccs-shipping-id-<?php echo $i; ?> .shipping-wccs-clone -->
|
66 |
-
</tbody>
|
67 |
-
</table>
|
68 |
-
<!-- .widefat -->
|
69 |
-
|
70 |
-
<div class="shipping-wccs-table-footer shipping-semi" style="display:none;">
|
71 |
-
<a href="javascript:;" id="shipping-wccs-add-button" class="button-secondary"><?php _e('+ Add New Field', 'woocommerce-checkout-manager'); ?></a>
|
72 |
-
</div>
|
73 |
-
<!-- .shipping-wccs-table-footer -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{new → includes}/view/backend/meta-boxes/html-order-uploads.php
RENAMED
File without changes
|
{new → includes}/view/backend/pages/additional.php
RENAMED
@@ -1,11 +1,11 @@
|
|
1 |
-
<?php include_once('parts/header.php'); ?>
|
2 |
<h1 class="screen-reader-text"><?php esc_html_e('Additional', 'woocommerce-checkout-manager'); ?></h1>
|
3 |
<h2><?php esc_html_e('Additional fields', 'woocommerce-checkout-manager'); ?></h2>
|
4 |
<div id="<?php printf('wooccm_%s_settings-description', $current_section); ?>">
|
5 |
<p><?php printf(esc_html__('Customize and manage the checkout %s fields.', 'woocommerce-checkout-manager'), $current_section); ?></p>
|
6 |
</div>
|
7 |
-
<?php include_once('parts/actions.php'); ?>
|
8 |
-
<?php include_once('parts/loop.php'); ?>
|
9 |
<script type="text/html" id='tmpl-wooccm-modal-window'>
|
10 |
-
<?php include_once('modals/
|
11 |
</script>
|
1 |
+
<?php include_once( 'parts/header.php' ); ?>
|
2 |
<h1 class="screen-reader-text"><?php esc_html_e('Additional', 'woocommerce-checkout-manager'); ?></h1>
|
3 |
<h2><?php esc_html_e('Additional fields', 'woocommerce-checkout-manager'); ?></h2>
|
4 |
<div id="<?php printf('wooccm_%s_settings-description', $current_section); ?>">
|
5 |
<p><?php printf(esc_html__('Customize and manage the checkout %s fields.', 'woocommerce-checkout-manager'), $current_section); ?></p>
|
6 |
</div>
|
7 |
+
<?php include_once( 'parts/actions.php' ); ?>
|
8 |
+
<?php include_once( 'parts/loop.php' ); ?>
|
9 |
<script type="text/html" id='tmpl-wooccm-modal-window'>
|
10 |
+
<?php include_once( 'modals/modal-field.php' ); ?>
|
11 |
</script>
|
{new → includes}/view/backend/pages/advanced.php
RENAMED
@@ -1,12 +1,12 @@
|
|
1 |
-
<?php include_once('parts/header.php'); ?>
|
2 |
<h1 class="screen-reader-text"><?php esc_html_e('Advanced', 'woocommerce-checkout-manager'); ?></h1>
|
3 |
<h2><?php esc_html_e('Advanced settings', 'woocommerce-checkout-manager'); ?></h2>
|
4 |
<!--<div id="<?php printf('wooccm_%s_settings-description', $current_section); ?>">
|
5 |
<p><?php printf(esc_html__('Customize and manage the checkout %s fields.', 'woocommerce-checkout-manager'), $current_section); ?></p>
|
6 |
-
</div
|
7 |
<?php if (current_user_can('manage_options')) : ?>
|
8 |
-
<a href="<?php echo add_query_arg(array('action' => 'wooccm_nuke_options', '_wpnonce' => wp_create_nonce('wooccm_nuke_options'))); ?>" class="button button-
|
9 |
-
<a href="<?php echo add_query_arg(array('action' => 'wooccm_nuke_order_meta', '_wpnonce' => wp_create_nonce('wooccm_nuke_order_meta'))); ?>" class="button button-
|
10 |
-
<a href="<?php echo add_query_arg(array('action' => 'wooccm_nuke_user_meta', '_wpnonce' => wp_create_nonce('wooccm_nuke_user_meta'))); ?>" class="button button-
|
11 |
-
<?php endif;
|
12 |
<?php woocommerce_admin_fields($settings); ?>
|
1 |
+
<?php include_once( 'parts/header.php' ); ?>
|
2 |
<h1 class="screen-reader-text"><?php esc_html_e('Advanced', 'woocommerce-checkout-manager'); ?></h1>
|
3 |
<h2><?php esc_html_e('Advanced settings', 'woocommerce-checkout-manager'); ?></h2>
|
4 |
<!--<div id="<?php printf('wooccm_%s_settings-description', $current_section); ?>">
|
5 |
<p><?php printf(esc_html__('Customize and manage the checkout %s fields.', 'woocommerce-checkout-manager'), $current_section); ?></p>
|
6 |
+
</div>
|
7 |
<?php if (current_user_can('manage_options')) : ?>
|
8 |
+
<a href="<?php echo add_query_arg(array('action' => 'wooccm_nuke_options', '_wpnonce' => wp_create_nonce('wooccm_nuke_options'))); ?>" class="button button-secondary" data-confirm="<?php _e('This will permanently delete all WordPress Options associated with WooCommerce Checkout Manager. Are you sure you want to proceed?', 'woocommerce-checkout-manager'); ?>"><?php _e('Delete Options', 'woocommerce-checkout-manager'); ?></a>
|
9 |
+
<a href="<?php echo add_query_arg(array('action' => 'wooccm_nuke_order_meta', '_wpnonce' => wp_create_nonce('wooccm_nuke_order_meta'))); ?>" class="button button-secondary" data-confirm="<?php _e('This will permanently delete all WordPress Post meta associated with that is linked to Orders. Are you sure you want to proceed?', 'woocommerce-checkout-manager'); ?>"><?php _e('Delete Orders Post meta', 'woocommerce-checkout-manager'); ?></a>
|
10 |
+
<a href="<?php echo add_query_arg(array('action' => 'wooccm_nuke_user_meta', '_wpnonce' => wp_create_nonce('wooccm_nuke_user_meta'))); ?>" class="button button-secondary" data-confirm="<?php _e('This will permanently delete all WordPress Post meta associated with that is linked to Users. Are you sure you want to proceed?', 'woocommerce-checkout-manager'); ?>"><?php _e('Delete Users Post meta', 'woocommerce-checkout-manager'); ?></a>
|
11 |
+
<?php endif; ?>-->
|
12 |
<?php woocommerce_admin_fields($settings); ?>
|
{new → includes}/view/backend/pages/billing.php
RENAMED
@@ -1,12 +1,11 @@
|
|
1 |
-
<?php
|
2 |
-
<?php include_once('parts/header.php'); ?>
|
3 |
<h1 class="screen-reader-text"><?php esc_html_e('Billing', 'woocommerce-checkout-manager'); ?></h1>
|
4 |
<h2><?php esc_html_e('Billing fields', 'woocommerce-checkout-manager'); ?></h2>
|
5 |
<div id="<?php printf('wooccm_%s_settings-description', $current_section); ?>">
|
6 |
<p><?php printf(esc_html__('Customize and manage the checkout %s fields.', 'woocommerce-checkout-manager'), $current_section); ?></p>
|
7 |
</div>
|
8 |
-
<?php include_once('parts/actions.php'); ?>
|
9 |
-
<?php include_once('parts/loop.php'); ?>
|
10 |
<script type="text/html" id='tmpl-wooccm-modal-window'>
|
11 |
-
<?php include_once('modals/
|
12 |
</script>
|
1 |
+
<?php include_once( 'parts/header.php' ); ?>
|
|
|
2 |
<h1 class="screen-reader-text"><?php esc_html_e('Billing', 'woocommerce-checkout-manager'); ?></h1>
|
3 |
<h2><?php esc_html_e('Billing fields', 'woocommerce-checkout-manager'); ?></h2>
|
4 |
<div id="<?php printf('wooccm_%s_settings-description', $current_section); ?>">
|
5 |
<p><?php printf(esc_html__('Customize and manage the checkout %s fields.', 'woocommerce-checkout-manager'), $current_section); ?></p>
|
6 |
</div>
|
7 |
+
<?php include_once( 'parts/actions.php' ); ?>
|
8 |
+
<?php include_once( 'parts/loop.php' ); ?>
|
9 |
<script type="text/html" id='tmpl-wooccm-modal-window'>
|
10 |
+
<?php include_once( 'modals/modal-field.php' ); ?>
|
11 |
</script>
|
{new → includes}/view/backend/pages/checkout.php
RENAMED
@@ -1,4 +1,4 @@
|
|
1 |
-
<?php include_once('parts/header.php'); ?>
|
2 |
<h1 class="screen-reader-text"><?php esc_html_e('Checkout', 'woocommerce-checkout-manager'); ?></h1>
|
3 |
<h2><?php esc_html_e('Checkout settings', 'woocommerce-checkout-manager'); ?></h2>
|
4 |
<div id="<?php printf('wooccm_%s_settings-description', $current_section); ?>">
|
1 |
+
<?php include_once( 'parts/header.php' ); ?>
|
2 |
<h1 class="screen-reader-text"><?php esc_html_e('Checkout', 'woocommerce-checkout-manager'); ?></h1>
|
3 |
<h2><?php esc_html_e('Checkout settings', 'woocommerce-checkout-manager'); ?></h2>
|
4 |
<div id="<?php printf('wooccm_%s_settings-description', $current_section); ?>">
|
new/view/backend/pages/modals/edit.php → includes/view/backend/pages/modals/modal-field.php
RENAMED
@@ -2,6 +2,9 @@
|
|
2 |
<div tabindex="0" id="<?php echo esc_attr(WOOCCM_PREFIX . '_modal'); ?>" class="media-modal wp-core-ui upload-php" role="dialog" aria-modal="true" aria-labelledby="media-frame-title">
|
3 |
<div class="media-modal-content" role="document">
|
4 |
<form class="media-modal-form" method="POST">
|
|
|
|
|
|
|
5 |
<div class="edit-attachment-frame mode-select hide-menu hide-router">
|
6 |
<div class="edit-media-header">
|
7 |
<# if ( data.id != undefined ) { #>
|
@@ -18,21 +21,26 @@
|
|
18 |
<div class="attachment-media-view landscape" style="overflow: hidden;">
|
19 |
<div id="woocommerce-product-data">
|
20 |
<div class="panel-wrap product_data" style="overflow:visible;">
|
21 |
-
<?php include_once('parts/
|
22 |
-
<?php include_once('parts/panel-general.php'); ?>
|
23 |
-
<?php
|
24 |
-
<?php
|
25 |
-
|
26 |
-
<?php
|
27 |
-
<?php //include_once('parts/panel-
|
28 |
-
<?php
|
29 |
-
<?php
|
|
|
|
|
|
|
|
|
|
|
30 |
<div class="clear"></div>
|
31 |
</div>
|
32 |
</div>
|
33 |
</div>
|
34 |
<div class="attachment-info">
|
35 |
-
<?php include_once('parts/
|
36 |
</div>
|
37 |
</div>
|
38 |
</div>
|
@@ -40,7 +48,7 @@
|
|
40 |
<div class="media-toolbar">
|
41 |
<div class="media-toolbar-secondary"></div>
|
42 |
<div class="media-toolbar-primary search-form">
|
43 |
-
<button type="submit" class="media-modal-
|
44 |
<button type="button" class="media-modal-close button button-secondary media-button button-large" style="
|
45 |
float: none;
|
46 |
position: inherit;
|
2 |
<div tabindex="0" id="<?php echo esc_attr(WOOCCM_PREFIX . '_modal'); ?>" class="media-modal wp-core-ui upload-php" role="dialog" aria-modal="true" aria-labelledby="media-frame-title">
|
3 |
<div class="media-modal-content" role="document">
|
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 ) { #>
|
21 |
<div class="attachment-media-view landscape" style="overflow: hidden;">
|
22 |
<div id="woocommerce-product-data">
|
23 |
<div class="panel-wrap product_data" style="overflow:visible;">
|
24 |
+
<?php include_once( 'parts/field-tabs.php' ); ?>
|
25 |
+
<?php include_once( 'parts/panel-general.php' ); ?>
|
26 |
+
<# if ( _.contains(<?php echo json_encode($option); ?>, data.type)) { #>
|
27 |
+
<?php include_once( 'parts/panel-options.php' ); ?>
|
28 |
+
<# } #>
|
29 |
+
<?php include_once( 'parts/panel-display.php' ); ?>
|
30 |
+
<?php //include_once( 'parts/panel-conditional.php' ); ?>
|
31 |
+
<# if ( !_.contains(<?php echo json_encode(array_merge($option, $template)); ?>, data.type)) { #>
|
32 |
+
<?php include_once( 'parts/panel-price.php' ); ?>
|
33 |
+
<# } #>
|
34 |
+
<?php //include_once( 'parts/panel-datepicker.php' ); ?>
|
35 |
+
<?php //include_once( 'parts/panel-timepicker.php' ); ?>
|
36 |
+
<?php //include_once('parts/panel-advanced.php' ); ?>
|
37 |
+
<?php //include_once( 'parts/panel-suggestions.php' ); ?>
|
38 |
<div class="clear"></div>
|
39 |
</div>
|
40 |
</div>
|
41 |
</div>
|
42 |
<div class="attachment-info">
|
43 |
+
<?php include_once('parts/field-info.php'); ?>
|
44 |
</div>
|
45 |
</div>
|
46 |
</div>
|
48 |
<div class="media-toolbar">
|
49 |
<div class="media-toolbar-secondary"></div>
|
50 |
<div class="media-toolbar-primary search-form">
|
51 |
+
<button type="submit" class="media-modal-submit button button-primary media-button button-large"><?php esc_html_e('Save'); ?></button>
|
52 |
<button type="button" class="media-modal-close button button-secondary media-button button-large" style="
|
53 |
float: none;
|
54 |
position: inherit;
|
includes/view/backend/pages/modals/parts/field-info.php
ADDED
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<span class="settings-save-status">
|
2 |
+
<span class="spinner"></span>
|
3 |
+
<span class="saved"><?php esc_html_e('Saved.'); ?></span>
|
4 |
+
</span>
|
5 |
+
|
6 |
+
<div class="details">
|
7 |
+
<div class="filename"><strong><?php esc_html_e('Field id', 'woocommerce-checkout-manager'); ?>:</strong> {{data.id}}</div>
|
8 |
+
<div class="filename"><strong><?php esc_html_e('Field key', 'woocommerce-checkout-manager'); ?>:</strong> #{{data.key}}</div>
|
9 |
+
<# if (data.parent != undefined) { #>
|
10 |
+
<div class="filename"><strong><?php esc_html_e('Parent type', 'woocommerce-checkout-manager'); ?>:</strong> {{data.parent.type}}</div>
|
11 |
+
<# } #>
|
12 |
+
</div>
|
13 |
+
|
14 |
+
|
15 |
+
<div class="panel woocommerce_options_panel">
|
16 |
+
<div class="settings">
|
17 |
+
<p class="form-field">
|
18 |
+
<label><?php esc_html_e('Conditional', 'woocommerce-checkout-manager'); ?></label>
|
19 |
+
<input <# if (data.conditional) { #>checked="checked"<# } #> type="checkbox" name="conditional" value="1">
|
20 |
+
<span class="description"><?php esc_html_e('Activate conditional field requirement.', 'woocommerce-checkout-manager'); ?></span>
|
21 |
+
</p>
|
22 |
+
</div>
|
23 |
+
<div class="settings">
|
24 |
+
<p class="form-field">
|
25 |
+
<label><?php esc_html_e('Parent', 'woocommerce-checkout-manager'); ?></label>
|
26 |
+
<select class="media-modal-parent wooccm-enhanced-select" name="conditional_parent_key" data-placeholder="<?php esc_attr_e('Select parent field…', 'woocommerce-checkout-manager'); ?>" data-allow_clear="true">
|
27 |
+
<option <# if (data.conditional_parent_key == '') { #>selected="selected"<# } #> value=""></option>
|
28 |
+
<?php foreach ($fields as $field_id => $field) : ?>
|
29 |
+
<?php if (in_array($field['type'], $conditionals)): ?>
|
30 |
+
<# if ( data.id != '<?php echo esc_attr($field['id']); ?>' ) { #>
|
31 |
+
<option <# if ( data.conditional_parent_key == '<?php echo esc_attr($field['key']); ?>' ) { #>selected="selected"<# } #> value="<?php echo esc_attr($field['key']); ?>"><?php printf('%s', $field['label'] ? esc_html($field['label']) : sprintf(esc_html__('Field %s', 'woocommerce-checkout-manager'), $field_id)); ?></option>
|
32 |
+
<# } #>
|
33 |
+
<?php endif; ?>
|
34 |
+
<?php endforeach; ?>
|
35 |
+
</select>
|
36 |
+
<span class="description"><?php esc_html_e('Select conditional parent field.', 'woocommerce-checkout-manager'); ?></span>
|
37 |
+
</p>
|
38 |
+
</div>
|
39 |
+
<div class="settings">
|
40 |
+
<p class="form-field">
|
41 |
+
<label><?php esc_html_e('Value', 'woocommerce-checkout-manager'); ?></label>
|
42 |
+
<# if ( data.parent != undefined && _.contains(<?php echo json_encode($option); ?>, data.parent.type) && _.isObject(data.parent.options)) { #>
|
43 |
+
<select class="wooccm-enhanced-select" name="conditional_parent_value">
|
44 |
+
<# _.each(data.parent.options, function (option, index) { #>
|
45 |
+
<option <# if ( index == data.conditional_parent_value ) { #>selected="selected"<# } #> value="{{index}}">{{option.label}}</option>
|
46 |
+
<# }); #>
|
47 |
+
</select>
|
48 |
+
<# } else if( data.parent != undefined && data.parent.type == 'checkbox' ) { #>
|
49 |
+
<select class="select short" name="conditional_parent_value">
|
50 |
+
<option <# if ( 1 == data.conditional_parent_value ) { #>selected="selected"<# } #> value="1"><?php esc_html_e('Yes'); ?></option>
|
51 |
+
<option <# if ( 0 == data.conditional_parent_value ) { #>selected="selected"<# } #> value="0"><?php esc_html_e('No'); ?></option>
|
52 |
+
</select>
|
53 |
+
<# } else if( data.parent != undefined && data.parent.type == 'country' ) { #>
|
54 |
+
<select class="wooccm-enhanced-select" name="conditional_parent_value" data-placeholder="<?php esc_attr_e('Preserve default country…', 'woocommerce-checkout-manager'); ?>" data-allow_clear="true">
|
55 |
+
<option <# if (data.default == '') { #>selected="selected"<# } #> value=""></option>
|
56 |
+
<?php foreach (WC()->countries->get_countries() as $id => $name) : ?>
|
57 |
+
<option <# if (data.conditional_parent_value == '<?php echo esc_attr($id); ?>') { #>selected="selected"<# } #> value="<?php echo esc_attr($id); ?>"><?php echo esc_html($name); ?></option>
|
58 |
+
<?php endforeach; ?>
|
59 |
+
</select>
|
60 |
+
<# } else if( data.parent != undefined ) { #>
|
61 |
+
<input type="text" name="conditional_parent_value" placeholder="{{data.parent.default}}" value="{{data.conditional_parent_value}}">
|
62 |
+
<# } else { #>
|
63 |
+
<input type="text" name="conditional_parent_value" placeholder="<?php esc_html_e('Conditional parent value', 'woocommerce-checkout-manager'); ?>" value="{{data.conditional_parent_value}}">
|
64 |
+
<# } #>
|
65 |
+
<span class="description"><?php esc_html_e('Show field if parent has this value.', 'woocommerce-checkout-manager'); ?></span>
|
66 |
+
</p>
|
67 |
+
</div>
|
68 |
+
</div>
|
69 |
+
|
70 |
+
<div class="actions">
|
71 |
+
<a target="_blank" class="view-attachment" href="<?php echo wc_get_page_permalink('checkout'); ?>"><?php esc_html_e('View checkout page', 'woocommerce-checkout-manager'); ?></a> |
|
72 |
+
<a target="_blank" href="<?php echo WOOCCM_PURCHASE_URL; ?>"><?php esc_html_e('Get premium version', 'woocommerce-checkout-manager'); ?></a> |
|
73 |
+
<a target="_blank" href="<?php echo WOOCCM_DOCUMENTATION_URL; ?>"><?php esc_html_e('View documentation', 'woocommerce-checkout-manager'); ?></a>
|
74 |
+
</div>
|
includes/view/backend/pages/modals/parts/field-tabs.php
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<ul class="product_data_tabs wc-tabs">
|
2 |
+
<li class="general_options active">
|
3 |
+
<a href="#tab_panel_general"><span><?php esc_html_e('General', 'woocommerce-checkout-manager'); ?></span></a>
|
4 |
+
</li>
|
5 |
+
<# if ( _.contains(<?php echo json_encode($option); ?>, data.type)) { #>
|
6 |
+
<li class="options_options active">
|
7 |
+
<a href="#tab_panel_options"><span><?php esc_html_e('Options', 'woocommerce-checkout-manager'); ?></span></a>
|
8 |
+
</li>
|
9 |
+
<# } #>
|
10 |
+
<!--<li class="conditional_options">
|
11 |
+
<a href="#tab_panel_conditional"><span><?php esc_html_e('Conditional', 'woocommerce-checkout-manager'); ?></span></a>
|
12 |
+
</li>-->
|
13 |
+
<li class="display_options">
|
14 |
+
<a href="#tab_panel_display"><span><?php esc_html_e('Display', 'woocommerce-checkout-manager'); ?></span></a>
|
15 |
+
</li>
|
16 |
+
<!--<# if (data.type == 'datepicker') { #>
|
17 |
+
<li class="datepicker_options">
|
18 |
+
<a href="#tab_panel_datepicker"><span><?php esc_html_e('Datepicker', 'woocommerce-checkout-manager'); ?></span></a>
|
19 |
+
</li>
|
20 |
+
<# } #>
|
21 |
+
<# if (data.type == 'timepicker') { #>
|
22 |
+
<li class="timepicker_options">
|
23 |
+
<a href="#tab_panel_timepicker"><span><?php esc_html_e('Timepicker', 'woocommerce-checkout-manager'); ?></span></a>
|
24 |
+
</li>
|
25 |
+
<# } #>-->
|
26 |
+
<# if ( !_.contains(<?php echo json_encode(array_merge($option, $template)); ?>, data.type)) { #>
|
27 |
+
<li class="price_options">
|
28 |
+
<a href="#tab_panel_price"><span><?php esc_html_e('Price', 'woocommerce-checkout-manager'); ?></span></a>
|
29 |
+
</li>
|
30 |
+
<# } #>
|
31 |
+
<!--<li class="advanced_advanced">
|
32 |
+
<a href="#tab_panel_advanced"><span><?php esc_html_e('Advanced', 'woocommerce-checkout-manager'); ?></span></a>
|
33 |
+
</li>-->
|
34 |
+
<!--<li class="suggestions_options">
|
35 |
+
<a href="#tab_panel_suggestions"><span><?php esc_html_e('Suggestions', 'woocommerce-checkout-manager'); ?></span></a>
|
36 |
+
</li>-->
|
37 |
+
</ul>
|
{new → includes}/view/backend/pages/modals/parts/panel-advanced.php
RENAMED
@@ -1,18 +1,18 @@
|
|
1 |
-
<div id="
|
2 |
<div class="options_group">
|
3 |
<p class="form-field">
|
4 |
<label><?php esc_html_e('Listable', 'woocommerce-checkout-manager'); ?></label>
|
5 |
-
<input <# if ( data.clear ) { #>checked<# } #> type="checkbox" name="listable" value="1">
|
6 |
<span class="description"><?php esc_html_e('Display in View Orders screen ', 'woocommerce-checkout-manager'); ?></span>
|
7 |
</p>
|
8 |
<p class="form-field">
|
9 |
<label><?php esc_html_e('Sortable', 'woocommerce-checkout-manager'); ?></label>
|
10 |
-
<input <# if ( data.clear ) { #>checked<# } #> type="checkbox" name="sortable" value="1">
|
11 |
<span class="description"><?php esc_html_e('Allow Sorting on View Orders screen', 'woocommerce-checkout-manager'); ?></span>
|
12 |
</p>
|
13 |
<p class="form-field">
|
14 |
<label><?php esc_html_e('Filterable', 'woocommerce-checkout-manager'); ?></label>
|
15 |
-
<input <# if ( data.clear ) { #>checked<# } #> type="checkbox" name="filterable" value="1">
|
16 |
<span class="description"><?php esc_html_e('Allow Filtering on View Orders screen', 'woocommerce-checkout-manager'); ?></span>
|
17 |
</p>
|
18 |
</div>
|
1 |
+
<div id="tab_panel_advanced" class="panel woocommerce_options_panel hidden" style="display: none;">
|
2 |
<div class="options_group">
|
3 |
<p class="form-field">
|
4 |
<label><?php esc_html_e('Listable', 'woocommerce-checkout-manager'); ?></label>
|
5 |
+
<input <# if ( data.clear ) { #>checked="checked"<# } #> type="checkbox" name="listable" value="1">
|
6 |
<span class="description"><?php esc_html_e('Display in View Orders screen ', 'woocommerce-checkout-manager'); ?></span>
|
7 |
</p>
|
8 |
<p class="form-field">
|
9 |
<label><?php esc_html_e('Sortable', 'woocommerce-checkout-manager'); ?></label>
|
10 |
+
<input <# if ( data.clear ) { #>checked="checked"<# } #> type="checkbox" name="sortable" value="1">
|
11 |
<span class="description"><?php esc_html_e('Allow Sorting on View Orders screen', 'woocommerce-checkout-manager'); ?></span>
|
12 |
</p>
|
13 |
<p class="form-field">
|
14 |
<label><?php esc_html_e('Filterable', 'woocommerce-checkout-manager'); ?></label>
|
15 |
+
<input <# if ( data.clear ) { #>checked="checked"<# } #> type="checkbox" name="filterable" value="1">
|
16 |
<span class="description"><?php esc_html_e('Allow Filtering on View Orders screen', 'woocommerce-checkout-manager'); ?></span>
|
17 |
</p>
|
18 |
</div>
|
{new → includes}/view/backend/pages/modals/parts/panel-datepicker.php
RENAMED
@@ -1,4 +1,4 @@
|
|
1 |
-
<div id="
|
2 |
<div class="options_group">
|
3 |
<p class="form-field">
|
4 |
<label><?php esc_html_e('Date format', 'woocommerce-checkout-manager'); ?></label>
|
@@ -7,7 +7,7 @@
|
|
7 |
</p>
|
8 |
<p class="form-field">
|
9 |
<label><?php esc_html_e('Date limit', 'woocommerce-checkout-manager'); ?></label>
|
10 |
-
<select class="
|
11 |
<option <# if ( data.date_limit == 'variable' ) { #>selected="selected"<# } #> value="variable"><?php esc_html_e('Since current date', 'woocommerce-checkout-manager'); ?></option>
|
12 |
<option <# if ( data.date_limit == 'fixed' ) { #>selected="selected"<# } #> value="fixed"><?php esc_html_e('Between fixed dates', 'woocommerce-checkout-manager'); ?></option>
|
13 |
</select>
|
1 |
+
<div id="tab_panel_datepicker" class="panel woocommerce_options_panel hidden" style="display: none;">
|
2 |
<div class="options_group">
|
3 |
<p class="form-field">
|
4 |
<label><?php esc_html_e('Date format', 'woocommerce-checkout-manager'); ?></label>
|
7 |
</p>
|
8 |
<p class="form-field">
|
9 |
<label><?php esc_html_e('Date limit', 'woocommerce-checkout-manager'); ?></label>
|
10 |
+
<select class="media-modal-change select short" name="date_limit">
|
11 |
<option <# if ( data.date_limit == 'variable' ) { #>selected="selected"<# } #> value="variable"><?php esc_html_e('Since current date', 'woocommerce-checkout-manager'); ?></option>
|
12 |
<option <# if ( data.date_limit == 'fixed' ) { #>selected="selected"<# } #> value="fixed"><?php esc_html_e('Between fixed dates', 'woocommerce-checkout-manager'); ?></option>
|
13 |
</select>
|
{new → includes}/view/backend/pages/modals/parts/panel-display.php
RENAMED
@@ -1,12 +1,8 @@
|
|
1 |
-
<div id="
|
2 |
<div class="options_group">
|
3 |
-
<!--<p class="form-field">
|
4 |
-
<label><?php esc_html_e('User Role', 'woocommerce-checkout-manager'); ?></label>
|
5 |
-
<input <# if (data.user_role) { #>checked<# } #> type="checkbox" name="user_role" value="1">
|
6 |
-
</p>-->
|
7 |
<p class="form-field">
|
8 |
<label><?php esc_html_e('Show for roles', 'woocommerce-checkout-manager'); ?></label>
|
9 |
-
<select class="wooccm-enhanced-select" name="show_role" data-placeholder="<?php esc_attr_e('Filter by roles', 'woocommerce-checkout-manager'); ?>" data-allow_clear="true" multiple="multiple">
|
10 |
<?php foreach ($wp_roles->roles as $key => $value): ?>
|
11 |
<option <# if ( _.contains(data.show_role, '<?php echo esc_attr($key); ?>') ) { #>selected="selected"<# } #> value="<?php echo esc_attr($key); ?>"><?php echo esc_html($value['name']); ?></option>
|
12 |
<?php endforeach; ?>
|
@@ -14,7 +10,7 @@
|
|
14 |
</p>
|
15 |
<p class="form-field">
|
16 |
<label><?php esc_html_e('Hide for roles', 'woocommerce-checkout-manager'); ?></label>
|
17 |
-
<select class="wooccm-enhanced-select" name="hide_role" data-placeholder="<?php esc_attr_e('Filter by roles', 'woocommerce-checkout-manager'); ?>" data-allow_clear="true" multiple="multiple">
|
18 |
<?php foreach ($wp_roles->roles as $key => $value): ?>
|
19 |
<option <# if ( _.contains(data.hide_role, '<?php echo esc_attr($key); ?>') ) { #>selected="selected"<# } #> value="<?php echo esc_attr($key); ?>"><?php echo esc_html($value['name']); ?></option>
|
20 |
<?php endforeach; ?>
|
@@ -25,7 +21,7 @@
|
|
25 |
<div class="options_group">
|
26 |
<p class="form-field">
|
27 |
<label><?php esc_html_e('More', 'woocommerce-checkout-manager'); ?></label>
|
28 |
-
<input <# if (data.more_product) { #>checked<# } #> type="checkbox" name="more_product" value="1">
|
29 |
<span class="description"><?php esc_html_e('Apply conditions event it there is more than one product', 'woocommerce-checkout-manager'); ?></span>
|
30 |
</p>
|
31 |
</div>
|
@@ -33,7 +29,7 @@
|
|
33 |
<div class="options_group">
|
34 |
<p class="form-field">
|
35 |
<label><?php esc_html_e('Show for products', 'woocommerce-checkout-manager'); ?></label>
|
36 |
-
<select class="wooccm-product-search" name="show_product" data-placeholder="<?php esc_attr_e('Filter by product', 'woocommerce-checkout-manager'); ?>" data-selected="{{data.show_product}}" data-allow_clear="true" multiple="multiple">
|
37 |
<# _.each(data.show_product_selected, function(title, id){ #>
|
38 |
<option value="{{id}}" selected="selected">{{title}}</option>
|
39 |
<# }); #>
|
@@ -41,7 +37,7 @@
|
|
41 |
</p>
|
42 |
<p class="form-field">
|
43 |
<label><?php esc_html_e('Hide for products', 'woocommerce-checkout-manager'); ?></label>
|
44 |
-
<select class="wooccm-product-search" name="hide_product" data-placeholder="<?php esc_attr_e('Filter by product', 'woocommerce-checkout-manager'); ?>" data-selected="{{data.hide_product}}" data-allow_clear="true" multiple="multiple">
|
45 |
<# _.each(data.hide_product_selected, function(title, id){ #>
|
46 |
<option value="{{id}}" selected="selected">{{title}}</option>
|
47 |
<# }); #>
|
@@ -52,7 +48,7 @@
|
|
52 |
<div class="options_group">
|
53 |
<p class="form-field">
|
54 |
<label><?php esc_html_e('Hide for category', 'woocommerce-checkout-manager'); ?></label>
|
55 |
-
<select class="wooccm-enhanced-select" name="show_product_cat" data-placeholder="<?php esc_attr_e('Filter by categories', 'woocommerce-checkout-manager'); ?>" data-selected="{{data.show_product_cat}}" data-allow_clear="true" multiple="multiple">
|
56 |
<?php if ($product_categories) : ?>
|
57 |
<?php foreach ($product_categories as $category): ?>
|
58 |
<option <# if ( _.contains(data.show_product_cat, '<?php echo esc_attr($category->slug); ?>') ) { #>selected="selected"<# } #> value="<?php echo esc_attr($category->slug); ?>"><?php echo esc_html($category->name); ?></option>
|
@@ -62,7 +58,7 @@
|
|
62 |
</p>
|
63 |
<p class="form-field">
|
64 |
<label><?php esc_html_e('Show for category', 'woocommerce-checkout-manager'); ?></label>
|
65 |
-
<select class="wooccm-enhanced-select" name="hide_product_cat" data-placeholder="<?php esc_attr_e('Filter by categories', 'woocommerce-checkout-manager'); ?>" data-selected="{{data.hide_product_cat}}" data-allow_clear="true" multiple="multiple">
|
66 |
<?php if ($product_categories) : ?>
|
67 |
<?php foreach ($product_categories as $category): ?>
|
68 |
<option <# if ( _.contains(data.hide_product_cat, '<?php echo esc_attr($category->term_id); ?>') ) { #>selected="selected"<# } #> value="<?php echo esc_attr($category->term_id); ?>"><?php echo esc_html($category->name); ?></option>
|
1 |
+
<div id="tab_panel_display" class="panel woocommerce_options_panel hidden" style="display: none;">
|
2 |
<div class="options_group">
|
|
|
|
|
|
|
|
|
3 |
<p class="form-field">
|
4 |
<label><?php esc_html_e('Show for roles', 'woocommerce-checkout-manager'); ?></label>
|
5 |
+
<select class="wooccm-enhanced-select" name="show_role[]" data-placeholder="<?php esc_attr_e('Filter by roles', 'woocommerce-checkout-manager'); ?>" data-allow_clear="true" multiple="multiple">
|
6 |
<?php foreach ($wp_roles->roles as $key => $value): ?>
|
7 |
<option <# if ( _.contains(data.show_role, '<?php echo esc_attr($key); ?>') ) { #>selected="selected"<# } #> value="<?php echo esc_attr($key); ?>"><?php echo esc_html($value['name']); ?></option>
|
8 |
<?php endforeach; ?>
|
10 |
</p>
|
11 |
<p class="form-field">
|
12 |
<label><?php esc_html_e('Hide for roles', 'woocommerce-checkout-manager'); ?></label>
|
13 |
+
<select class="wooccm-enhanced-select" name="hide_role[]" data-placeholder="<?php esc_attr_e('Filter by roles', 'woocommerce-checkout-manager'); ?>" data-allow_clear="true" multiple="multiple">
|
14 |
<?php foreach ($wp_roles->roles as $key => $value): ?>
|
15 |
<option <# if ( _.contains(data.hide_role, '<?php echo esc_attr($key); ?>') ) { #>selected="selected"<# } #> value="<?php echo esc_attr($key); ?>"><?php echo esc_html($value['name']); ?></option>
|
16 |
<?php endforeach; ?>
|
21 |
<div class="options_group">
|
22 |
<p class="form-field">
|
23 |
<label><?php esc_html_e('More', 'woocommerce-checkout-manager'); ?></label>
|
24 |
+
<input <# if (data.more_product) { #>checked="checked"<# } #> type="checkbox" name="more_product" value="1">
|
25 |
<span class="description"><?php esc_html_e('Apply conditions event it there is more than one product', 'woocommerce-checkout-manager'); ?></span>
|
26 |
</p>
|
27 |
</div>
|
29 |
<div class="options_group">
|
30 |
<p class="form-field">
|
31 |
<label><?php esc_html_e('Show for products', 'woocommerce-checkout-manager'); ?></label>
|
32 |
+
<select class="wooccm-product-search" name="show_product[]" data-placeholder="<?php esc_attr_e('Filter by product', 'woocommerce-checkout-manager'); ?>" data-selected="{{data.show_product}}" data-allow_clear="true" multiple="multiple">
|
33 |
<# _.each(data.show_product_selected, function(title, id){ #>
|
34 |
<option value="{{id}}" selected="selected">{{title}}</option>
|
35 |
<# }); #>
|
37 |
</p>
|
38 |
<p class="form-field">
|
39 |
<label><?php esc_html_e('Hide for products', 'woocommerce-checkout-manager'); ?></label>
|
40 |
+
<select class="wooccm-product-search" name="hide_product[]" data-placeholder="<?php esc_attr_e('Filter by product', 'woocommerce-checkout-manager'); ?>" data-selected="{{data.hide_product}}" data-allow_clear="true" multiple="multiple">
|
41 |
<# _.each(data.hide_product_selected, function(title, id){ #>
|
42 |
<option value="{{id}}" selected="selected">{{title}}</option>
|
43 |
<# }); #>
|
48 |
<div class="options_group">
|
49 |
<p class="form-field">
|
50 |
<label><?php esc_html_e('Hide for category', 'woocommerce-checkout-manager'); ?></label>
|
51 |
+
<select class="wooccm-enhanced-select" name="show_product_cat[]" data-placeholder="<?php esc_attr_e('Filter by categories', 'woocommerce-checkout-manager'); ?>" data-selected="{{data.show_product_cat}}" data-allow_clear="true" multiple="multiple">
|
52 |
<?php if ($product_categories) : ?>
|
53 |
<?php foreach ($product_categories as $category): ?>
|
54 |
<option <# if ( _.contains(data.show_product_cat, '<?php echo esc_attr($category->slug); ?>') ) { #>selected="selected"<# } #> value="<?php echo esc_attr($category->slug); ?>"><?php echo esc_html($category->name); ?></option>
|
58 |
</p>
|
59 |
<p class="form-field">
|
60 |
<label><?php esc_html_e('Show for category', 'woocommerce-checkout-manager'); ?></label>
|
61 |
+
<select class="wooccm-enhanced-select" name="hide_product_cat[]" data-placeholder="<?php esc_attr_e('Filter by categories', 'woocommerce-checkout-manager'); ?>" data-selected="{{data.hide_product_cat}}" data-allow_clear="true" multiple="multiple">
|
62 |
<?php if ($product_categories) : ?>
|
63 |
<?php foreach ($product_categories as $category): ?>
|
64 |
<option <# if ( _.contains(data.hide_product_cat, '<?php echo esc_attr($category->term_id); ?>') ) { #>selected="selected"<# } #> value="<?php echo esc_attr($category->term_id); ?>"><?php echo esc_html($category->name); ?></option>
|
{new → includes}/view/backend/pages/modals/parts/panel-general.php
RENAMED
@@ -1,4 +1,4 @@
|
|
1 |
-
<div id="
|
2 |
<div class="options_group">
|
3 |
<p class="form-field">
|
4 |
<label><?php esc_html_e('Name', 'woocommerce-checkout-manager'); ?></label>
|
@@ -6,17 +6,16 @@
|
|
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'); ?><?php //esc_html_e('To edit Abbreviations open General > Switches > Editing Of Abbreviation Fields.', 'woocommerce-checkout-manager');
|
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 |
-
|
15 |
<div class="options_group">
|
16 |
<p class="form-field">
|
17 |
<label><?php esc_html_e('Type', 'woocommerce-checkout-manager'); ?></label>
|
18 |
<# if ( _.contains(<?php echo json_encode($defaults); ?>, data.name)) { #>
|
19 |
-
<input class="short" type="text" name="type" value="{{data.type}}"
|
20 |
<# } else { #>
|
21 |
<select class="media-modal-change wooccm-enhanced-select" name="type">
|
22 |
<?php if ($types): ?>
|
@@ -41,29 +40,31 @@
|
|
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('
|
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 |
</div>
|
55 |
-
<# if ( !_.contains(<?php echo json_encode($template); ?>, data.type)) { #>
|
56 |
<div class="options_group">
|
57 |
<p class="form-field">
|
58 |
<label><?php esc_html_e('Default', 'woocommerce-checkout-manager'); ?></label>
|
59 |
<input class="short" type="text" name="default" placeholder="<?php esc_html_e('Enter a default value (optional)', 'woocommerce-checkout-manager'); ?>" value="{{data.default}}">
|
|
|
60 |
</p>
|
61 |
-
<# if ( _.contains(<?php echo json_encode($multiple); ?>, data.type)) { #>
|
62 |
-
<p class="form-field">
|
63 |
-
<label><?php esc_html_e('Options', 'woocommerce-checkout-manager'); ?></label>
|
64 |
-
<input class="short" type="text" name="options" placeholder="Option 1||Option 2||Option 3" value="{{data.options}}">
|
65 |
-
</p>
|
66 |
-
<# } #>
|
67 |
</div>
|
68 |
<# } #>
|
69 |
<# if (data.type == 'file') { #>
|
@@ -75,7 +76,7 @@
|
|
75 |
<p class="form-field">
|
76 |
<select class="wooccm-enhanced-select" name="file_types" multiple="multiple" data-placeholder="<?php esc_attr_e('Choose the allowed types…', 'woocommerce-checkout-manager'); ?>" data-allow_clear="true" >
|
77 |
<?php foreach (wp_get_mime_types() as $type => $name) : ?>
|
78 |
-
|
79 |
<?php endforeach; ?>
|
80 |
</select>
|
81 |
</p>
|
@@ -86,8 +87,8 @@
|
|
86 |
<div class="options_group">
|
87 |
<p class="form-field">
|
88 |
<label><?php esc_html_e('Default', 'woocommerce-checkout-manager'); ?></label>
|
89 |
-
<select class="wooccm-enhanced-select" name="default" data-placeholder="<?php esc_attr_e('Preserve default country…', 'woocommerce-checkout-manager'); ?>" data-allow_clear="true"
|
90 |
-
<option <# if (data.default == '') { #>selected="selected"<# } #> value=""
|
91 |
<?php foreach (WC()->countries->get_countries() as $id => $name) : ?>
|
92 |
<option <# if (data.default == '<?php echo esc_attr($id); ?>') { #>selected="selected"<# } #> value="<?php echo esc_attr($id); ?>"><?php echo esc_html($name); ?></option>
|
93 |
<?php endforeach; ?>
|
1 |
+
<div id="tab_panel_general" class="panel woocommerce_options_panel" style="display: none;">
|
2 |
<div class="options_group">
|
3 |
<p class="form-field">
|
4 |
<label><?php esc_html_e('Name', 'woocommerce-checkout-manager'); ?></label>
|
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'); ?><?php //esc_html_e('To edit Abbreviations open General > Switches > Editing Of Abbreviation 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-change wooccm-enhanced-select" name="type">
|
21 |
<?php if ($types): ?>
|
40 |
<div class="options_group">
|
41 |
<p class="form-field">
|
42 |
<label><?php esc_html_e('Label', 'woocommerce-checkout-manager'); ?></label>
|
43 |
+
<input class="short media-modal-table" type="text" name="label" placeholder="<?php esc_html_e('My Field Name', 'woocommerce-checkout-manager'); ?>" value="{{data.label}}">
|
44 |
<span span class="woocommerce-help-tip" data-tip="<?php esc_html_e('Label text of the checkout field.', 'woocommerce-checkout-manager'); ?>"></span>
|
45 |
</p>
|
46 |
+
<# if ( !_.contains(<?php echo json_encode($template); ?>, data.type )) { #>
|
47 |
<p class="form-field">
|
48 |
<label><?php esc_html_e('Placeholder', 'woocommerce-checkout-manager'); ?></label>
|
49 |
+
<input class="short media-modal-table" type="text" name="placeholder" placeholder="<?php esc_html_e('This is a placeholder', 'woocommerce-checkout-manager'); ?>" value="{{data.placeholder}}">
|
50 |
<span span class="woocommerce-help-tip" data-tip="<?php esc_html_e('Placeholder text of the checkout field.', 'woocommerce-checkout-manager'); ?>"></span>
|
51 |
</p>
|
52 |
<# } #>
|
53 |
+
<# if ( data.type == 'file' ) { #>
|
54 |
+
<p class="form-field">
|
55 |
+
<label><?php esc_html_e('Button', 'woocommerce-checkout-manager'); ?></label>
|
56 |
+
<input class="short media-modal-table" type="text" name="placeholder" placeholder="<?php esc_html_e('Upload your files', 'woocommerce-checkout-manager'); ?>" value="{{data.placeholder}}">
|
57 |
+
<span span class="woocommerce-help-tip" data-tip="<?php esc_html_e('Text for the button name.', 'woocommerce-checkout-manager'); ?>"></span>
|
58 |
+
</p>
|
59 |
+
<# } #>
|
60 |
</div>
|
61 |
+
<# if ( !_.contains(<?php echo json_encode(array_merge($template, $option)); ?>, data.type)) { #>
|
62 |
<div class="options_group">
|
63 |
<p class="form-field">
|
64 |
<label><?php esc_html_e('Default', 'woocommerce-checkout-manager'); ?></label>
|
65 |
<input class="short" type="text" name="default" placeholder="<?php esc_html_e('Enter a default value (optional)', 'woocommerce-checkout-manager'); ?>" value="{{data.default}}">
|
66 |
+
<span span class="woocommerce-help-tip" data-tip="<?php esc_html_e('Default value of the checkout field.', 'woocommerce-checkout-manager'); ?>"></span>
|
67 |
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
</div>
|
69 |
<# } #>
|
70 |
<# if (data.type == 'file') { #>
|
76 |
<p class="form-field">
|
77 |
<select class="wooccm-enhanced-select" name="file_types" multiple="multiple" data-placeholder="<?php esc_attr_e('Choose the allowed types…', 'woocommerce-checkout-manager'); ?>" data-allow_clear="true" >
|
78 |
<?php foreach (wp_get_mime_types() as $type => $name) : ?>
|
79 |
+
<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>
|
80 |
<?php endforeach; ?>
|
81 |
</select>
|
82 |
</p>
|
87 |
<div class="options_group">
|
88 |
<p class="form-field">
|
89 |
<label><?php esc_html_e('Default', 'woocommerce-checkout-manager'); ?></label>
|
90 |
+
<select class="wooccm-enhanced-select" name="default" data-placeholder="<?php esc_attr_e('Preserve default country…', 'woocommerce-checkout-manager'); ?>" data-allow_clear="true">
|
91 |
+
<option <# if (data.default == '') { #>selected="selected"<# } #> value=""></option>
|
92 |
<?php foreach (WC()->countries->get_countries() as $id => $name) : ?>
|
93 |
<option <# if (data.default == '<?php echo esc_attr($id); ?>') { #>selected="selected"<# } #> value="<?php echo esc_attr($id); ?>"><?php echo esc_html($name); ?></option>
|
94 |
<?php endforeach; ?>
|
includes/view/backend/pages/modals/parts/panel-options.php
ADDED
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div id="tab_panel_options" class="panel woocommerce_options_panel" style="display: none;">
|
2 |
+
<# if ( _.isObject(data.options)) { #>
|
3 |
+
<div class="options_group">
|
4 |
+
<table class="wc_gateways widefat wooccm-enhanced-options" style="border:none;box-shadow: none">
|
5 |
+
<thead>
|
6 |
+
<tr>
|
7 |
+
<th class="check-column" style="width: 5%;">
|
8 |
+
<label class="screen-reader-text" for="select-all"><?php esc_html_e('Select all', 'woocommerce-checkout-manager'); ?></label>
|
9 |
+
<input type="checkbox" id="select-all">
|
10 |
+
</th>
|
11 |
+
<th scope="col" class="label" style="width: 40%;"><?php esc_html_e('Label', 'woocommerce-checkout-manager'); ?></th>
|
12 |
+
<th scope="col" class="add-price" style="width: 30%;min-width: 85px;"><?php esc_html_e('Price', 'woocommerce-checkout-manager'); ?></th>
|
13 |
+
<th scope="col" class="default" style="width: 10%;"><?php esc_html_e('Taxable', 'woocommerce-checkout-manager'); ?></th>
|
14 |
+
<th scope="col" class="default" style="width: 15%;"><?php esc_html_e('Default', 'woocommerce-checkout-manager'); ?></th>
|
15 |
+
<th scope="col" class="reorder" style="width: 5%;"> </th>
|
16 |
+
</tr>
|
17 |
+
</thead>
|
18 |
+
<tbody class="ui-sortable">
|
19 |
+
<# _.each(data.options, function (option, index) { #>
|
20 |
+
<tr class="row">
|
21 |
+
<td class="check-column">
|
22 |
+
<input class="check" type="checkbox" <# if(index === 0) { #>disabled="disabled"<# } #>/>
|
23 |
+
</td>
|
24 |
+
<td>
|
25 |
+
<input type="text" class="label" name="options[{{index}}][label]" value="{{option.label}}">
|
26 |
+
</td>
|
27 |
+
<td>
|
28 |
+
<input disabled="disabled" type="number" class="add-price" name="options[{{index}}][add_price_total]" step="0.01" value="{{option.add_price_total}}">
|
29 |
+
<select disabled="disabled" class="add-price-type" name="options[{{index}}][add_price_type]">
|
30 |
+
<option value="fixed" <# if(option.add_price_type == 'fixed') { #>selected="selected"<# } #>>$</option>
|
31 |
+
<option value="percent" <# if(option.add_price_type == 'percent') { #>selected="selected"<# } #>>%</option>
|
32 |
+
</select>
|
33 |
+
</td>
|
34 |
+
<td>
|
35 |
+
<input disabled="disabled" type="checkbox" name="options[{{index}}][add_price_tax]" value="1" <# if (option.add_price_tax) { #>checked="checked"<# } #> />
|
36 |
+
</td>
|
37 |
+
<td>
|
38 |
+
<# if ( _.contains(<?php echo json_encode($multiple); ?>, data.type)) { #>
|
39 |
+
<input value="{{index}}" type="checkbox" name="options[{{index}}][default]" <# if (option.default) { #>checked="checked"<# } #> />
|
40 |
+
<# } else { #>
|
41 |
+
<input value="{{index}}" type="radio" name="default" <# if (data.default == index) { #>checked="checked"<# } #> />
|
42 |
+
<# } #>
|
43 |
+
</td>
|
44 |
+
<td class="sort reorder">
|
45 |
+
<div class="wc-item-reorder-nav">
|
46 |
+
<input disabled="disabled" type="hidden" name="option_order[]" value="{{index}}">
|
47 |
+
</div>
|
48 |
+
</td>
|
49 |
+
</tr>
|
50 |
+
<# }); #>
|
51 |
+
</tbody>
|
52 |
+
<tfoot>
|
53 |
+
<tr>
|
54 |
+
<th colspan="6">
|
55 |
+
<button type="button" class="button button-primary add-option"><?php esc_html_e('Add new option', 'woocommerce-checkout-manager'); ?></button>
|
56 |
+
<button type="button" class="button button-secondary remove-options"><?php esc_html_e('Delete selected', 'woocommerce-checkout-manager'); ?></button>
|
57 |
+
</th>
|
58 |
+
</tr>
|
59 |
+
</tfoot>
|
60 |
+
</table>
|
61 |
+
</div>
|
62 |
+
<# } #>
|
63 |
+
</div>
|
includes/view/backend/pages/modals/parts/panel-price.php
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div id="tab_panel_price" class="panel woocommerce_options_panel hidden" style="display: none;">
|
2 |
+
|
3 |
+
<div class="options_group">
|
4 |
+
<p class="form-field">
|
5 |
+
<label><?php esc_html_e('Price', 'woocommerce-checkout-manager'); ?></label>
|
6 |
+
<input <# if (data.add_price) { #>checked="checked"<# } #> type="checkbox" name="add_price" value="1">
|
7 |
+
</p>
|
8 |
+
<p class="form-field">
|
9 |
+
<label><?php esc_html_e('Name', 'woocommerce-checkout-manager'); ?></label>
|
10 |
+
<input class="short" name="add_price_name" type="text" value="{{data.add_price_name}}" placeholder="<?php esc_html_e('My Custom Charge', 'woocommerce-checkout-manager'); ?>">
|
11 |
+
</p>
|
12 |
+
<p class="form-field">
|
13 |
+
<label><?php esc_html_e('Total', 'woocommerce-checkout-manager'); ?></label>
|
14 |
+
<input class="short" name="add_price_total" type="text" value="{{data.add_price_total}}" placeholder="50">
|
15 |
+
<select style="margin:0 0 0 10px;line-height: 30px; height: 30px;" class="select" name="add_price_type">
|
16 |
+
<option <# if (data.add_price_type == 'fixed') { #>selected="selected"<# } #> value="fixed">$</option>
|
17 |
+
<option <# if (data.add_price_type == 'percent') { #>selected="selected"<# } #> value="percent">%</option>
|
18 |
+
</select>
|
19 |
+
</p>
|
20 |
+
</div>
|
21 |
+
|
22 |
+
<div class="options_group">
|
23 |
+
<p class="form-field">
|
24 |
+
<label><?php esc_html_e('Tax', 'woocommerce-checkout-manager'); ?></label>
|
25 |
+
<input <# if (data.add_price_tax) { #>checked="checked"<# } #> type="checkbox" name="add_price_tax" value="1">
|
26 |
+
</p>
|
27 |
+
<!--<p class="form-field">
|
28 |
+
<label><?php esc_html_e('Deny Checkout', 'woocommerce-checkout-manager'); ?></label>
|
29 |
+
<input <# if (data.deny_checkout) { #>checked="checked"<# } #> type="checkbox" name="deny_checkout" value="1">
|
30 |
+
</p>
|
31 |
+
<p class="form-field">
|
32 |
+
<label><?php esc_html_e('Deny Receipt', 'woocommerce-checkout-manager'); ?></label>
|
33 |
+
<input <# if (data.deny_receipt) { #>checked="checked"<# } #> type="checkbox" name="deny_receipt" value="1">
|
34 |
+
</p>-->
|
35 |
+
|
36 |
+
</div>
|
37 |
+
|
38 |
+
</div>
|
{new → includes}/view/backend/pages/modals/parts/panel-suggestions.php
RENAMED
@@ -1,4 +1,4 @@
|
|
1 |
-
<div id="
|
2 |
<div class="marketplace-suggestions-container showing-suggestion" data-marketplace-suggestions-context="product-edit-meta-tab-header">
|
3 |
<div class="marketplace-suggestion-container" data-suggestion-slug="product-edit-meta-tab-header">
|
4 |
<div class="marketplace-suggestion-container-content">
|
1 |
+
<div id="tab_panel_suggestions" class="panel woocommerce_options_panel hidden" style="display: none;">
|
2 |
<div class="marketplace-suggestions-container showing-suggestion" data-marketplace-suggestions-context="product-edit-meta-tab-header">
|
3 |
<div class="marketplace-suggestion-container" data-suggestion-slug="product-edit-meta-tab-header">
|
4 |
<div class="marketplace-suggestion-container-content">
|
{new → includes}/view/backend/pages/modals/parts/panel-timepicker.php
RENAMED
@@ -1,4 +1,4 @@
|
|
1 |
-
<div id="
|
2 |
<div class="options_group">
|
3 |
<p class="form-field">
|
4 |
<label><?php esc_html_e('Hour start', 'woocommerce-checkout-manager'); ?></label>
|
@@ -12,9 +12,5 @@
|
|
12 |
<label><?php esc_html_e('Minutes interval', 'woocommerce-checkout-manager'); ?></label>
|
13 |
<input class="short" type="number" min="0" max="60" <!--step="5"--> placeholder="15" name="time_limit_interval" value="{{data.time_limit_interval}}">
|
14 |
</p>
|
15 |
-
<!--<p class="form-field">
|
16 |
-
<label><?php esc_html_e('Manual minutes', 'woocommerce-checkout-manager'); ?></label>
|
17 |
-
<input class="short" type="text" placeholder="0, 10, 20, 30, 40" name="manual_min" value="{{data.manual_min}}">
|
18 |
-
</p>-->
|
19 |
</div>
|
20 |
</div>
|
1 |
+
<div id="tab_panel_timepicker" class="panel woocommerce_options_panel hidden" style="display: none;">
|
2 |
<div class="options_group">
|
3 |
<p class="form-field">
|
4 |
<label><?php esc_html_e('Hour start', 'woocommerce-checkout-manager'); ?></label>
|
12 |
<label><?php esc_html_e('Minutes interval', 'woocommerce-checkout-manager'); ?></label>
|
13 |
<input class="short" type="number" min="0" max="60" <!--step="5"--> placeholder="15" name="time_limit_interval" value="{{data.time_limit_interval}}">
|
14 |
</p>
|
|
|
|
|
|
|
|
|
15 |
</div>
|
16 |
</div>
|
{new → includes}/view/backend/pages/order.php
RENAMED
@@ -1,4 +1,4 @@
|
|
1 |
-
<?php include_once('parts/header.php'); ?>
|
2 |
<h1 class="screen-reader-text"><?php esc_html_e('Order', 'woocommerce-checkout-manager'); ?></h1>
|
3 |
<h2><?php esc_html_e('Order settings', 'woocommerce-checkout-manager'); ?></h2>
|
4 |
<div id="<?php printf('wooccm_%s_settings-description', $current_section); ?>">
|
1 |
+
<?php include_once( 'parts/header.php' ); ?>
|
2 |
<h1 class="screen-reader-text"><?php esc_html_e('Order', 'woocommerce-checkout-manager'); ?></h1>
|
3 |
<h2><?php esc_html_e('Order settings', 'woocommerce-checkout-manager'); ?></h2>
|
4 |
<div id="<?php printf('wooccm_%s_settings-description', $current_section); ?>">
|
{new → includes}/view/backend/pages/parts/actions.php
RENAMED
File without changes
|
{new → includes}/view/backend/pages/parts/header.php
RENAMED
@@ -1,11 +1,5 @@
|
|
1 |
<?php
|
2 |
-
//
|
3 |
-
//global $wooccm_sections;
|
4 |
-
//
|
5 |
-
//var_dump($wooccm_sections);
|
6 |
-
|
7 |
$sections = array();
|
8 |
-
|
9 |
$sections[''] = esc_html__('Checkout', 'woocommerce-checkout-manager');
|
10 |
$sections['billing'] = esc_html__('Billing', 'woocommerce-checkout-manager');
|
11 |
$sections['shipping'] = esc_html__('Shipping', 'woocommerce-checkout-manager');
|
@@ -22,7 +16,8 @@ foreach ($sections as $id => $label) {
|
|
22 |
echo '<li><a href="' . admin_url('admin.php?page=wc-settings&tab=wooccm§ion=' . sanitize_title($id)) . '" class="' . ( $current_section == $id ? 'current' : '' ) . '">' . $label . '</a> | </li>';
|
23 |
}
|
24 |
|
25 |
-
echo '<li><a target="_blank" href="' .
|
|
|
26 |
|
27 |
echo '</ul><br class="clear" />';
|
28 |
|
1 |
<?php
|
|
|
|
|
|
|
|
|
|
|
2 |
$sections = array();
|
|
|
3 |
$sections[''] = esc_html__('Checkout', 'woocommerce-checkout-manager');
|
4 |
$sections['billing'] = esc_html__('Billing', 'woocommerce-checkout-manager');
|
5 |
$sections['shipping'] = esc_html__('Shipping', 'woocommerce-checkout-manager');
|
16 |
echo '<li><a href="' . admin_url('admin.php?page=wc-settings&tab=wooccm§ion=' . sanitize_title($id)) . '" class="' . ( $current_section == $id ? 'current' : '' ) . '">' . $label . '</a> | </li>';
|
17 |
}
|
18 |
|
19 |
+
echo '<li><a target="_blank" href="' . WOOCCM_DOCUMENTATION_URL . '">' . esc_html__('Documentation', 'woocommerce-checkout-manager') . '</a> | </li>';
|
20 |
+
echo '<li><a target="_blank" href="' . WOOCCM_SUPPORT_URL . '">' . esc_html__('Report a bug', 'woocommerce-checkout-manager') . '</a></li>';
|
21 |
|
22 |
echo '</ul><br class="clear" />';
|
23 |
|
{new → includes}/view/backend/pages/parts/loop.php
RENAMED
@@ -6,7 +6,6 @@
|
|
6 |
<thead>
|
7 |
<tr>
|
8 |
<th class="sort" style="width:1%"></th>
|
9 |
-
<!--<th class="order"><?php esc_html_e('Order', 'woocommerce-checkout-manager'); ?></th>-->
|
10 |
<th class="required" style="width:1%"><?php esc_html_e('Required', 'woocommerce-checkout-manager'); ?></th>
|
11 |
<th class="position" style="width:1%;min-width: 100px;"><?php esc_html_e('Position', 'woocommerce-checkout-manager'); ?></th>
|
12 |
<th class="clear" style="width:1%"><?php esc_html_e('Clear', 'woocommerce-checkout-manager'); ?></th>
|
@@ -17,8 +16,8 @@
|
|
17 |
<th class="sortable"><?php esc_html_e('Sortable', 'woocommerce-checkout-manager'); ?></th>
|
18 |
<th class="filterable"><?php esc_html_e('Filterable', 'woocommerce-checkout-manager'); ?></th>-->
|
19 |
<th class="status" style="width:1%"><?php esc_html_e('Disabled', 'woocommerce-checkout-manager'); ?></th>
|
20 |
-
<th class="edit" style="width:1%"
|
21 |
-
<th class="delete" style="width:1%"
|
22 |
</tr>
|
23 |
</thead>
|
24 |
<tbody class="ui-sortable">
|
@@ -32,7 +31,6 @@
|
|
32 |
<input type="hidden" name="field_order[]" value="<?php echo esc_attr($id); ?>">
|
33 |
</div>
|
34 |
</td>
|
35 |
-
<!--<td class="order"><strong><?php echo esc_html($field['order']); ?></strong></td>-->
|
36 |
<td class="required">
|
37 |
<a data-field_attr="required" class="wooccm-field-toggle-attribute" href="#">
|
38 |
<?php
|
@@ -66,7 +64,7 @@
|
|
66 |
<?php echo esc_html($field['type']); ?>
|
67 |
</td>
|
68 |
<td class="label">
|
69 |
-
|
70 |
</td>
|
71 |
<td class="placeholder">
|
72 |
<?php echo esc_html($field['placeholder']); ?>
|
@@ -75,27 +73,27 @@
|
|
75 |
<?php
|
76 |
if ($field['listable'] === true) {
|
77 |
?>
|
78 |
-
|
79 |
<?php } else { ?>
|
80 |
-
|
81 |
<?php } ?>
|
82 |
</td>
|
83 |
<td class="sortable">
|
84 |
<?php
|
85 |
if ($field['sortable'] === true) {
|
86 |
?>
|
87 |
-
|
88 |
<?php } else { ?>
|
89 |
-
|
90 |
<?php } ?>
|
91 |
</td>
|
92 |
<td class="filterable">
|
93 |
<?php
|
94 |
if ($field['filterable'] === true) {
|
95 |
?>
|
96 |
-
|
97 |
<?php } else { ?>
|
98 |
-
|
99 |
<?php } ?>
|
100 |
</td>-->
|
101 |
<td class="status">
|
6 |
<thead>
|
7 |
<tr>
|
8 |
<th class="sort" style="width:1%"></th>
|
|
|
9 |
<th class="required" style="width:1%"><?php esc_html_e('Required', 'woocommerce-checkout-manager'); ?></th>
|
10 |
<th class="position" style="width:1%;min-width: 100px;"><?php esc_html_e('Position', 'woocommerce-checkout-manager'); ?></th>
|
11 |
<th class="clear" style="width:1%"><?php esc_html_e('Clear', 'woocommerce-checkout-manager'); ?></th>
|
16 |
<th class="sortable"><?php esc_html_e('Sortable', 'woocommerce-checkout-manager'); ?></th>
|
17 |
<th class="filterable"><?php esc_html_e('Filterable', 'woocommerce-checkout-manager'); ?></th>-->
|
18 |
<th class="status" style="width:1%"><?php esc_html_e('Disabled', 'woocommerce-checkout-manager'); ?></th>
|
19 |
+
<th class="edit" style="width:1%"></th>
|
20 |
+
<th class="delete" style="width:1%"></th>
|
21 |
</tr>
|
22 |
</thead>
|
23 |
<tbody class="ui-sortable">
|
31 |
<input type="hidden" name="field_order[]" value="<?php echo esc_attr($id); ?>">
|
32 |
</div>
|
33 |
</td>
|
|
|
34 |
<td class="required">
|
35 |
<a data-field_attr="required" class="wooccm-field-toggle-attribute" href="#">
|
36 |
<?php
|
64 |
<?php echo esc_html($field['type']); ?>
|
65 |
</td>
|
66 |
<td class="label">
|
67 |
+
<?php echo esc_html($field['label']); ?>
|
68 |
</td>
|
69 |
<td class="placeholder">
|
70 |
<?php echo esc_html($field['placeholder']); ?>
|
73 |
<?php
|
74 |
if ($field['listable'] === true) {
|
75 |
?>
|
76 |
+
<span class="status-enabled"><?php esc_html_e('Yes'); ?></span>
|
77 |
<?php } else { ?>
|
78 |
+
<span class="status-disabled"><?php esc_html_e('Yes'); ?></span>
|
79 |
<?php } ?>
|
80 |
</td>
|
81 |
<td class="sortable">
|
82 |
<?php
|
83 |
if ($field['sortable'] === true) {
|
84 |
?>
|
85 |
+
<span class="status-enabled"><?php esc_html_e('Yes'); ?></span>
|
86 |
<?php } else { ?>
|
87 |
+
<span class="status-disabled"><?php esc_html_e('Yes'); ?></span>
|
88 |
<?php } ?>
|
89 |
</td>
|
90 |
<td class="filterable">
|
91 |
<?php
|
92 |
if ($field['filterable'] === true) {
|
93 |
?>
|
94 |
+
<span class="status-enabled"><?php esc_html_e('Yes'); ?></span>
|
95 |
<?php } else { ?>
|
96 |
+
<span class="status-disabled"><?php esc_html_e('Yes'); ?></span>
|
97 |
<?php } ?>
|
98 |
</td>-->
|
99 |
<td class="status">
|
{new → includes}/view/backend/pages/shipping.php
RENAMED
@@ -1,11 +1,11 @@
|
|
1 |
-
<?php include_once('parts/header.php'); ?>
|
2 |
<h1 class="screen-reader-text"><?php esc_html_e('Shipping', 'woocommerce-checkout-manager'); ?></h1>
|
3 |
<h2><?php esc_html_e('Shipping fields', 'woocommerce-checkout-manager'); ?></h2>
|
4 |
<div id="<?php printf('wooccm_%s_settings-description', $current_section); ?>">
|
5 |
<p><?php printf(esc_html__('Customize and manage the checkout %s fields.', 'woocommerce-checkout-manager'), $current_section); ?></p>
|
6 |
</div>
|
7 |
-
<?php include_once('parts/actions.php'); ?>
|
8 |
-
<?php include_once('parts/loop.php'); ?>
|
9 |
<script type="text/html" id='tmpl-wooccm-modal-window'>
|
10 |
-
<?php include_once('modals/
|
11 |
</script>
|
1 |
+
<?php include_once( 'parts/header.php' ); ?>
|
2 |
<h1 class="screen-reader-text"><?php esc_html_e('Shipping', 'woocommerce-checkout-manager'); ?></h1>
|
3 |
<h2><?php esc_html_e('Shipping fields', 'woocommerce-checkout-manager'); ?></h2>
|
4 |
<div id="<?php printf('wooccm_%s_settings-description', $current_section); ?>">
|
5 |
<p><?php printf(esc_html__('Customize and manage the checkout %s fields.', 'woocommerce-checkout-manager'), $current_section); ?></p>
|
6 |
</div>
|
7 |
+
<?php include_once( 'parts/actions.php' ); ?>
|
8 |
+
<?php include_once( 'parts/loop.php' ); ?>
|
9 |
<script type="text/html" id='tmpl-wooccm-modal-window'>
|
10 |
+
<?php include_once( 'modals/modal-field.php' ); ?>
|
11 |
</script>
|
includes/view/frontend/class-wooccm-fields-additional.php
ADDED
@@ -0,0 +1,132 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class WOOCCM_Fields_Additional {
|
4 |
+
|
5 |
+
protected static $_instance;
|
6 |
+
|
7 |
+
public function __construct() {
|
8 |
+
$this->init();
|
9 |
+
}
|
10 |
+
|
11 |
+
public static function instance() {
|
12 |
+
if (is_null(self::$_instance)) {
|
13 |
+
self::$_instance = new self();
|
14 |
+
}
|
15 |
+
return self::$_instance;
|
16 |
+
}
|
17 |
+
|
18 |
+
function add_required_notice() {
|
19 |
+
|
20 |
+
if (count($fields = WOOCCM()->additional->get_fields())) {
|
21 |
+
|
22 |
+
foreach ($fields as $field_id => $field) {
|
23 |
+
|
24 |
+
if (!empty($field['key']) && empty($field['disabled']) && !empty($field['required']) && empty($_POST[$field['key']])) {
|
25 |
+
|
26 |
+
$message = sprintf(__('%s is a required field.', 'woocommerce-checkout-manager'), '<strong>' . $field['label'] . '</strong>');
|
27 |
+
|
28 |
+
wc_add_notice($message, 'error');
|
29 |
+
}
|
30 |
+
}
|
31 |
+
}
|
32 |
+
}
|
33 |
+
|
34 |
+
function add_order_meta($order_id = 0) {
|
35 |
+
|
36 |
+
if (count($fields = WOOCCM()->additional->get_fields())) {
|
37 |
+
|
38 |
+
foreach ($fields as $id => $field) {
|
39 |
+
|
40 |
+
if (!empty($_POST[$field['key']])) {
|
41 |
+
|
42 |
+
$value = $_POST[$field['key']];
|
43 |
+
|
44 |
+
if ($field['type'] == 'textarea') {
|
45 |
+
update_post_meta($order_id, sprintf('_%s', $field['key']), wp_kses($value, false));
|
46 |
+
} else if (is_array($value)) {
|
47 |
+
update_post_meta($order_id, sprintf('_%s', $field['key']), maybe_serialize(array_map('sanitize_text_field', $value)));
|
48 |
+
} else {
|
49 |
+
update_post_meta($order_id, sprintf('_%s', $field['key']), sanitize_text_field($value));
|
50 |
+
}
|
51 |
+
}
|
52 |
+
}
|
53 |
+
}
|
54 |
+
}
|
55 |
+
|
56 |
+
function add_additional_fields($checkout) {
|
57 |
+
?>
|
58 |
+
<div class="wooccm-additional-fields">
|
59 |
+
<?php
|
60 |
+
if ($custom_fields = WOOCCM()->additional->get_fields()) {
|
61 |
+
|
62 |
+
foreach ($custom_fields as $field_id => $custom_field) {
|
63 |
+
|
64 |
+
if (!empty($custom_field['key']) && empty($custom_field['disabled'])) {
|
65 |
+
|
66 |
+
woocommerce_form_field($custom_field['key'], $custom_field, $checkout->get_value($custom_field['key']));
|
67 |
+
}
|
68 |
+
}
|
69 |
+
}
|
70 |
+
?>
|
71 |
+
<div class="wooccm-clearfix"></div>
|
72 |
+
</div>
|
73 |
+
<?php
|
74 |
+
}
|
75 |
+
|
76 |
+
function position($position = 'before_order_notes') {
|
77 |
+
|
78 |
+
|
79 |
+
$options = get_option('wccs_settings');
|
80 |
+
|
81 |
+
if (!empty($options['checkness']['position'])) {
|
82 |
+
|
83 |
+
$positon = sanitize_text_field($options['checkness']['position']);
|
84 |
+
|
85 |
+
switch ($position) {
|
86 |
+
case 'before_shipping_form':
|
87 |
+
$position = 'after_billing_form';
|
88 |
+
break;
|
89 |
+
|
90 |
+
case 'after_shipping_form':
|
91 |
+
$position = 'before_order_notes';
|
92 |
+
break;
|
93 |
+
}
|
94 |
+
}
|
95 |
+
|
96 |
+
return $position;
|
97 |
+
}
|
98 |
+
|
99 |
+
function init() {
|
100 |
+
add_action('woocommerce_checkout_process', array($this, 'add_required_notice'));
|
101 |
+
add_action('woocommerce_checkout_update_order_meta', array($this, 'add_order_meta'));
|
102 |
+
// Compatibility
|
103 |
+
// -----------------------------------------------------------------------
|
104 |
+
|
105 |
+
add_filter('default_option_wooccm_additional_position', array($this, 'position'));
|
106 |
+
|
107 |
+
// Additional fields
|
108 |
+
// -----------------------------------------------------------------------
|
109 |
+
|
110 |
+
switch (get_option('wooccm_additional_position', 'before_order_notes')) {
|
111 |
+
|
112 |
+
case 'before_billing_form':
|
113 |
+
add_action('woocommerce_before_checkout_billing_form', array($this, 'add_additional_fields'));
|
114 |
+
break;
|
115 |
+
|
116 |
+
case 'after_billing_form':
|
117 |
+
add_action('woocommerce_after_checkout_billing_form', array($this, 'add_additional_fields'));
|
118 |
+
break;
|
119 |
+
|
120 |
+
case 'before_order_notes':
|
121 |
+
add_action('woocommerce_before_order_notes', array($this, 'add_additional_fields'));
|
122 |
+
break;
|
123 |
+
|
124 |
+
case 'after_order_notes':
|
125 |
+
add_action('woocommerce_after_order_notes', array($this, 'add_additional_fields'));
|
126 |
+
break;
|
127 |
+
}
|
128 |
+
}
|
129 |
+
|
130 |
+
}
|
131 |
+
|
132 |
+
WOOCCM_Fields_Additional::instance();
|
includes/view/frontend/class-wooccm-fields-conditional.php
ADDED
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class WOOCCM_Fields_Conditional {
|
4 |
+
|
5 |
+
protected static $_instance;
|
6 |
+
|
7 |
+
public function __construct() {
|
8 |
+
$this->init();
|
9 |
+
}
|
10 |
+
|
11 |
+
public static function instance() {
|
12 |
+
if (is_null(self::$_instance)) {
|
13 |
+
self::$_instance = new self();
|
14 |
+
}
|
15 |
+
return self::$_instance;
|
16 |
+
}
|
17 |
+
|
18 |
+
public function remove_required($fields) {
|
19 |
+
|
20 |
+
foreach ($fields as $field_id => $field) {
|
21 |
+
|
22 |
+
if (!empty($field['conditional']) && !empty($field['conditional_parent_key']) && ($field['conditional_parent_key'] != $field['key'])) {
|
23 |
+
|
24 |
+
|
25 |
+
// Unset if parent is disabled
|
26 |
+
// -----------------------------------------------------------------
|
27 |
+
if (empty($fields[$field['conditional_parent_key']])) {
|
28 |
+
unset($fields[$field['key']]);
|
29 |
+
continue;
|
30 |
+
}
|
31 |
+
|
32 |
+
// Remove required
|
33 |
+
// -----------------------------------------------------------------
|
34 |
+
if (isset($_REQUEST['woocommerce-process-checkout-nonce']) && (!isset($_POST[$field['conditional_parent_key']]) || !isset($field['conditional_parent_value']) || !array_intersect((array) $field['conditional_parent_value'], (array) $_POST[$field['conditional_parent_key']]))) {
|
35 |
+
$field['required'] = false;
|
36 |
+
unset($fields[$field['key']]);
|
37 |
+
}
|
38 |
+
}
|
39 |
+
}
|
40 |
+
|
41 |
+
return $fields;
|
42 |
+
}
|
43 |
+
|
44 |
+
public function add_field_attributes($field) {
|
45 |
+
if (!empty($field['conditional']) && !empty($field['conditional_parent_key']) && isset($field['conditional_parent_value']) && ($field['conditional_parent_key'] != $field['name'])) {
|
46 |
+
$field['class'][] = 'wooccm-conditional-child';
|
47 |
+
$field['custom_attributes']['data-conditional-parent'] = $field['conditional_parent_key'];
|
48 |
+
$field['custom_attributes']['data-conditional-parent-value'] = $field['conditional_parent_value'];
|
49 |
+
}
|
50 |
+
return $field;
|
51 |
+
}
|
52 |
+
|
53 |
+
public function init() {
|
54 |
+
// Add field attributes
|
55 |
+
add_filter('wooccm_checkout_field_filter', array($this, 'add_field_attributes'));
|
56 |
+
add_action('wooccm_billing_fields', array($this, 'remove_required'));
|
57 |
+
add_action('wooccm_shipping_fields', array($this, 'remove_required'));
|
58 |
+
add_action('wooccm_additional_fields', array($this, 'remove_required'));
|
59 |
+
}
|
60 |
+
|
61 |
+
}
|
62 |
+
|
63 |
+
WOOCCM_Fields_Conditional::instance();
|
includes/view/frontend/class-wooccm-fields-display.php
ADDED
@@ -0,0 +1,188 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class WOOCCM_Fields_Display {
|
4 |
+
|
5 |
+
protected static $_instance;
|
6 |
+
|
7 |
+
public function __construct() {
|
8 |
+
$this->init();
|
9 |
+
}
|
10 |
+
|
11 |
+
public static function instance() {
|
12 |
+
if (is_null(self::$_instance)) {
|
13 |
+
self::$_instance = new self();
|
14 |
+
}
|
15 |
+
return self::$_instance;
|
16 |
+
}
|
17 |
+
|
18 |
+
function disable_by_role($field) {
|
19 |
+
|
20 |
+
global $current_user;
|
21 |
+
|
22 |
+
$user_roles = (array) $current_user->roles;
|
23 |
+
|
24 |
+
if (!empty($field['hide_role'])) {
|
25 |
+
|
26 |
+
if (array_intersect($user_roles, $field['hide_role'])) {
|
27 |
+
$field['disabled'] = true;
|
28 |
+
} else {
|
29 |
+
$field['disabled'] = false;
|
30 |
+
}
|
31 |
+
}
|
32 |
+
|
33 |
+
if (!empty($field['show_role'])) {
|
34 |
+
|
35 |
+
if (!array_intersect($user_roles, $field['show_role'])) {
|
36 |
+
$field['disabled'] = true;
|
37 |
+
} else {
|
38 |
+
$field['disabled'] = false;
|
39 |
+
}
|
40 |
+
}
|
41 |
+
|
42 |
+
return $field;
|
43 |
+
}
|
44 |
+
|
45 |
+
function disable_by_category($field) {
|
46 |
+
|
47 |
+
if (empty($field['disabled']) && (!empty($field['hide_product_cat']) || !empty($field['show_product_cat']))) {
|
48 |
+
|
49 |
+
if (count($cart_contents = WC()->cart->get_cart_contents())) {
|
50 |
+
|
51 |
+
$hide_cats_array = (array) $field['hide_product_cat'];
|
52 |
+
|
53 |
+
$show_cats_array = (array) $field['show_product_cat'];
|
54 |
+
|
55 |
+
$product_cats = array();
|
56 |
+
|
57 |
+
foreach ($cart_contents as $key => $values) {
|
58 |
+
if ($cats = wp_get_post_terms($values['product_id'], 'product_cat', array('orderby' => 'name', 'order' => 'ASC', 'fields' => 'slugs'))) {
|
59 |
+
$product_cats += $cats;
|
60 |
+
}
|
61 |
+
}
|
62 |
+
|
63 |
+
// field without more
|
64 |
+
// -------------------------------------------------------------------
|
65 |
+
if (empty($field['more_product']) && count($cart_contents) < 2) {
|
66 |
+
// hide field
|
67 |
+
// -----------------------------------------------------------------
|
68 |
+
if (!empty($field['hide_product_cat'])) {
|
69 |
+
if (array_intersect($product_cats, $hide_cats_array)) {
|
70 |
+
$field['disabled'] = true;
|
71 |
+
}
|
72 |
+
}
|
73 |
+
|
74 |
+
// show field
|
75 |
+
// -----------------------------------------------------------------
|
76 |
+
if (!empty($field['show_product_cat'])) {
|
77 |
+
if (!array_intersect($product_cats, $show_cats_array)) {
|
78 |
+
$field['disabled'] = true;
|
79 |
+
} else {
|
80 |
+
$field['disabled'] = false;
|
81 |
+
}
|
82 |
+
}
|
83 |
+
}
|
84 |
+
|
85 |
+
// field with more
|
86 |
+
// -------------------------------------------------------------------
|
87 |
+
if (!empty($field['more_product'])) {
|
88 |
+
|
89 |
+
// hide field
|
90 |
+
// -------------------------------------------------------------
|
91 |
+
if (!empty($field['hide_product_cat'])) {
|
92 |
+
if (array_intersect($product_cats, $hide_cats_array)) {
|
93 |
+
$field['disabled'] = true;
|
94 |
+
}
|
95 |
+
}
|
96 |
+
|
97 |
+
// show field
|
98 |
+
// ---------------------------------------------------------------
|
99 |
+
if (!empty($field['show_product_cat'])) {
|
100 |
+
if (!array_intersect($product_cats, $show_cats_array)) {
|
101 |
+
$field['disabled'] = true;
|
102 |
+
} else {
|
103 |
+
$field['disabled'] = false;
|
104 |
+
}
|
105 |
+
}
|
106 |
+
}
|
107 |
+
}
|
108 |
+
}
|
109 |
+
|
110 |
+
return $field;
|
111 |
+
}
|
112 |
+
|
113 |
+
function disable_by_product($field) {
|
114 |
+
|
115 |
+
if (empty($field['disabled']) && (!empty($field['hide_product']) || !empty($field['show_product']))) {
|
116 |
+
|
117 |
+
if (count($cart_contents = WC()->cart->get_cart_contents())) {
|
118 |
+
|
119 |
+
$hide_ids_array = (array) $field['hide_product'];
|
120 |
+
|
121 |
+
$show_ids_array = (array) $field['show_product'];
|
122 |
+
|
123 |
+
$product_ids = array_column($cart_contents, 'product_id');
|
124 |
+
|
125 |
+
// field without more
|
126 |
+
// -------------------------------------------------------------------
|
127 |
+
if (empty($field['more_product']) && count($cart_contents) < 2) {
|
128 |
+
// hide field
|
129 |
+
// -----------------------------------------------------------------
|
130 |
+
if (!empty($field['hide_product'])) {
|
131 |
+
if (array_intersect($product_ids, $hide_ids_array)) {
|
132 |
+
$field['disabled'] = true;
|
133 |
+
}
|
134 |
+
}
|
135 |
+
|
136 |
+
// show field
|
137 |
+
// -----------------------------------------------------------------
|
138 |
+
if (!empty($field['show_product'])) {
|
139 |
+
if (!array_intersect($product_ids, $show_ids_array)) {
|
140 |
+
$field['disabled'] = true;
|
141 |
+
} else {
|
142 |
+
$field['disabled'] = false;
|
143 |
+
}
|
144 |
+
}
|
145 |
+
}
|
146 |
+
|
147 |
+
// field with more
|
148 |
+
// -------------------------------------------------------------------
|
149 |
+
if (!empty($field['more_product'])) {
|
150 |
+
|
151 |
+
// hide field
|
152 |
+
// -------------------------------------------------------------
|
153 |
+
if (!empty($field['hide_product'])) {
|
154 |
+
|
155 |
+
if (array_intersect($product_ids, $hide_ids_array)) {
|
156 |
+
$field['disabled'] = true;
|
157 |
+
}
|
158 |
+
}
|
159 |
+
|
160 |
+
// show field
|
161 |
+
// ---------------------------------------------------------------
|
162 |
+
if (!empty($field['show_product'])) {
|
163 |
+
if (!array_intersect($product_ids, $show_ids_array)) {
|
164 |
+
$field['disabled'] = true;
|
165 |
+
} else {
|
166 |
+
$field['disabled'] = false;
|
167 |
+
}
|
168 |
+
}
|
169 |
+
}
|
170 |
+
}
|
171 |
+
}
|
172 |
+
|
173 |
+
return $field;
|
174 |
+
}
|
175 |
+
|
176 |
+
function init() {
|
177 |
+
|
178 |
+
// Remove by product
|
179 |
+
add_filter('wooccm_checkout_field_filter', array($this, 'disable_by_product'));
|
180 |
+
// Remove by category
|
181 |
+
add_filter('wooccm_checkout_field_filter', array($this, 'disable_by_category'));
|
182 |
+
// Remove by role
|
183 |
+
add_filter('wooccm_checkout_field_filter', array($this, 'disable_by_role'));
|
184 |
+
}
|
185 |
+
|
186 |
+
}
|
187 |
+
|
188 |
+
WOOCCM_Fields_Display::instance();
|
includes/view/frontend/class-wooccm-fields-filters.php
ADDED
@@ -0,0 +1,305 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class WOOCCM_Fields_Filter {
|
4 |
+
|
5 |
+
protected static $_instance;
|
6 |
+
public $count = 0;
|
7 |
+
|
8 |
+
public function __construct() {
|
9 |
+
$this->init();
|
10 |
+
}
|
11 |
+
|
12 |
+
public static function instance() {
|
13 |
+
if (is_null(self::$_instance)) {
|
14 |
+
self::$_instance = new self();
|
15 |
+
}
|
16 |
+
return self::$_instance;
|
17 |
+
}
|
18 |
+
|
19 |
+
// Custom fields
|
20 |
+
// ---------------------------------------------------------------------------
|
21 |
+
public function custom_field($field = '', $key, $args, $value) {
|
22 |
+
|
23 |
+
$field = '';
|
24 |
+
|
25 |
+
if ($args['required']) {
|
26 |
+
//$args['class'][] = 'validate-required';
|
27 |
+
$required = ' <abbr class="required" title="' . esc_attr__('required', 'woocommerce-checkout-manager') . '">*</abbr>';
|
28 |
+
} else {
|
29 |
+
$required = ' <span class="optional">(' . esc_html__('optional', 'woocommerce-checkout-manager') . ')</span>';
|
30 |
+
}
|
31 |
+
|
32 |
+
if (is_string($args['label_class'])) {
|
33 |
+
$args['label_class'] = array($args['label_class']);
|
34 |
+
}
|
35 |
+
|
36 |
+
if (is_null($value)) {
|
37 |
+
$value = $args['default'];
|
38 |
+
}
|
39 |
+
|
40 |
+
// Custom attribute handling.
|
41 |
+
$custom_attributes = array();
|
42 |
+
$args['custom_attributes'] = array_filter((array) $args['custom_attributes'], 'strlen');
|
43 |
+
|
44 |
+
if ($args['maxlength']) {
|
45 |
+
$args['custom_attributes']['maxlength'] = absint($args['maxlength']);
|
46 |
+
}
|
47 |
+
|
48 |
+
if (!empty($args['autocomplete'])) {
|
49 |
+
$args['custom_attributes']['autocomplete'] = $args['autocomplete'];
|
50 |
+
}
|
51 |
+
|
52 |
+
if (true === $args['autofocus']) {
|
53 |
+
$args['custom_attributes']['autofocus'] = 'autofocus';
|
54 |
+
}
|
55 |
+
|
56 |
+
if ($args['description']) {
|
57 |
+
$args['custom_attributes']['aria-describedby'] = $args['id'] . '-description';
|
58 |
+
}
|
59 |
+
|
60 |
+
if (!empty($args['custom_attributes']) && is_array($args['custom_attributes'])) {
|
61 |
+
foreach ($args['custom_attributes'] as $attribute => $attribute_value) {
|
62 |
+
$custom_attributes[] = esc_attr($attribute) . '="' . esc_attr($attribute_value) . '"';
|
63 |
+
}
|
64 |
+
}
|
65 |
+
|
66 |
+
if (!empty($args['validate'])) {
|
67 |
+
foreach ($args['validate'] as $validate) {
|
68 |
+
$args['class'][] = 'validate-' . $validate;
|
69 |
+
}
|
70 |
+
}
|
71 |
+
|
72 |
+
//$field = '';
|
73 |
+
$label_id = $args['id'];
|
74 |
+
$sort = $args['priority'] ? $args['priority'] : '';
|
75 |
+
$field_container = '<p class="form-row %1$s" id="%2$s" data-priority="' . esc_attr($sort) . '">%3$s</p>';
|
76 |
+
switch ($args['type']) {
|
77 |
+
|
78 |
+
case 'radio' :
|
79 |
+
$field = '';
|
80 |
+
|
81 |
+
if (!empty($args['options'])) {
|
82 |
+
|
83 |
+
$field .= ' <span class="woocommerce-radio-wrapper" ' . implode(' ', $custom_attributes) . '>';
|
84 |
+
|
85 |
+
foreach ($args['options'] as $option_key => $option_text) {
|
86 |
+
$field .= '<input type="radio" class="input-checkbox" value="' . esc_attr($option_key) . '" name="' . esc_attr($key) . '" id="' . esc_attr($key) . '_' . esc_attr($option_key) . '"' . checked($value, $option_key, false) . ' />';
|
87 |
+
$field .= '<label for="' . esc_attr($key) . '_' . esc_attr($option_key) . '" class="checkbox ' . implode(' ', $args['label_class']) . '">' . $option_text . '</label><br>';
|
88 |
+
}
|
89 |
+
|
90 |
+
$field .= ' </span>';
|
91 |
+
}
|
92 |
+
|
93 |
+
break;
|
94 |
+
|
95 |
+
case 'multiselect' :
|
96 |
+
|
97 |
+
$field = '';
|
98 |
+
|
99 |
+
$value = is_array($value) ? $value : array($value);
|
100 |
+
|
101 |
+
if (!empty($args['options'])) {
|
102 |
+
$field .= '<select name="' . esc_attr($key) . '[]" id="' . esc_attr($key) . '" class="select" multiple="multiple" ' . implode(' ', $custom_attributes) . '>';
|
103 |
+
foreach ($args['options'] as $option_key => $option_text) {
|
104 |
+
$field .= '<option value="' . esc_attr($option_key) . '" ' . selected(in_array($option_key, $value), 1, false) . '>' . esc_attr($option_text) . '</option>';
|
105 |
+
}
|
106 |
+
$field .= ' </select>';
|
107 |
+
}
|
108 |
+
|
109 |
+
break;
|
110 |
+
|
111 |
+
case 'multicheckbox' :
|
112 |
+
|
113 |
+
$field = '';
|
114 |
+
|
115 |
+
$value = is_array($value) ? $value : array($value);
|
116 |
+
|
117 |
+
if (!empty($args['options'])) {
|
118 |
+
|
119 |
+
$field .= ' <span class="woocommerce-multicheckbox-wrapper" ' . implode(' ', $custom_attributes) . '>';
|
120 |
+
|
121 |
+
foreach ($args['options'] as $option_key => $option_text) {
|
122 |
+
$field .='<label><input type="checkbox" name="' . esc_attr($key) . '[]" value="' . esc_attr($option_text) . '"' . checked(in_array($option_key, $value), 1, false) . ' /> ' . esc_attr($option_text) . '</label>';
|
123 |
+
}
|
124 |
+
|
125 |
+
$field .= '</span>';
|
126 |
+
}
|
127 |
+
|
128 |
+
break;
|
129 |
+
|
130 |
+
|
131 |
+
|
132 |
+
case 'file' :
|
133 |
+
|
134 |
+
$field = '';
|
135 |
+
|
136 |
+
$field .= '<button style="width:100%" class="wooccm-file-button button alt" type="button" class="button alt" id="' . esc_attr($key) . '_button">' . esc_html($args['placeholder']) . '</button>';
|
137 |
+
//$field .= '<input class="wooccm-file-field" type="text" name="' . esc_attr($key) . '" id="' . esc_attr($key) . '" value="test" />';
|
138 |
+
$field .= '<input class="wooccm-file-field" type="hidden" name="' . esc_attr($key) . '" id="' . esc_attr($args['id']) . '" value="" ' . implode(' ', $custom_attributes) . ' />';
|
139 |
+
$field .= '<input style="display:none;" class="fileinput-button" type="file" name="' . esc_attr($key) . '_file" id="' . esc_attr($key) . '_file" multiple="multiple" />';
|
140 |
+
$field .= '<span style="display:none;" class="wooccm-file-list"></span>';
|
141 |
+
|
142 |
+
break;
|
143 |
+
}
|
144 |
+
|
145 |
+
if (!empty($field)) {
|
146 |
+
$field_html = '';
|
147 |
+
|
148 |
+
if ($args['label'] && 'checkbox' !== $args['type']) {
|
149 |
+
$field_html .= '<label for="' . esc_attr($label_id) . '" class="' . esc_attr(implode(' ', $args['label_class'])) . '">' . $args['label'] . $required . '</label>';
|
150 |
+
}
|
151 |
+
|
152 |
+
$field_html .= '<span class="woocommerce-input-wrapper">' . $field;
|
153 |
+
|
154 |
+
if ($args['description']) {
|
155 |
+
$field_html .= '<span class="description" id="' . esc_attr($args['id']) . '-description" aria-hidden="true">' . wp_kses_post($args['description']) . '</span>';
|
156 |
+
}
|
157 |
+
|
158 |
+
$field_html .= '</span>';
|
159 |
+
|
160 |
+
$container_class = esc_attr(implode(' ', $args['class']));
|
161 |
+
$container_id = esc_attr($args['id']) . '_field';
|
162 |
+
$field = sprintf($field_container, $container_class, $container_id, $field_html);
|
163 |
+
}
|
164 |
+
|
165 |
+
return $field;
|
166 |
+
}
|
167 |
+
|
168 |
+
// Colorpicker
|
169 |
+
// ---------------------------------------------------------------------------
|
170 |
+
public function heading_field($field = '', $key, $args, $value) {
|
171 |
+
|
172 |
+
// Custom attribute handling.
|
173 |
+
$custom_attributes = array();
|
174 |
+
|
175 |
+
if (!empty($args['custom_attributes']) && is_array($args['custom_attributes'])) {
|
176 |
+
foreach ($args['custom_attributes'] as $attribute => $attribute_value) {
|
177 |
+
$custom_attributes[] = esc_attr($attribute) . '="' . esc_attr($attribute_value) . '"';
|
178 |
+
}
|
179 |
+
}
|
180 |
+
|
181 |
+
$sort = $args['priority'] ? $args['priority'] : '';
|
182 |
+
|
183 |
+
$field_html = '<h3 ' . implode(' ', $custom_attributes) . '>' . esc_html($args['label']) . '</h3>';
|
184 |
+
|
185 |
+
$container_class = esc_attr(implode(' ', $args['class']));
|
186 |
+
$container_id = esc_attr($args['id']) . '_field';
|
187 |
+
$field_container = '<div class="form-row %1$s" id="%2$s" data-priority="' . esc_attr($sort) . '">%3$s</div>';
|
188 |
+
|
189 |
+
return sprintf($field_container, $container_class, $container_id, $field_html);
|
190 |
+
}
|
191 |
+
|
192 |
+
// Colorpicker
|
193 |
+
// ---------------------------------------------------------------------------
|
194 |
+
public function colorpicker_field($field = '', $key, $args, $value) {
|
195 |
+
|
196 |
+
$args['type'] = 'text';
|
197 |
+
$args['maxlength'] = 7;
|
198 |
+
|
199 |
+
ob_start();
|
200 |
+
|
201 |
+
woocommerce_form_field($key, $args, $value);
|
202 |
+
|
203 |
+
$field = ob_get_clean();
|
204 |
+
|
205 |
+
$field = str_replace('</p>', ' <span class="wooccmcolorpicker_container" class="spec_shootd"></span></p>', $field);
|
206 |
+
|
207 |
+
return $field;
|
208 |
+
}
|
209 |
+
|
210 |
+
// Datepicker
|
211 |
+
// ---------------------------------------------------------------------------
|
212 |
+
public function datepicker_field($field = '', $key, $args, $value) {
|
213 |
+
|
214 |
+
$args['type'] = 'text';
|
215 |
+
|
216 |
+
ob_start();
|
217 |
+
|
218 |
+
woocommerce_form_field($key, $args, $value);
|
219 |
+
|
220 |
+
$field = ob_get_clean();
|
221 |
+
|
222 |
+
return $field;
|
223 |
+
}
|
224 |
+
|
225 |
+
// Timepicker
|
226 |
+
// ---------------------------------------------------------------------------
|
227 |
+
public function timepicker_field($field = '', $key, $args, $value) {
|
228 |
+
|
229 |
+
$args['type'] = 'text';
|
230 |
+
|
231 |
+
ob_start();
|
232 |
+
|
233 |
+
woocommerce_form_field($key, $args, $value);
|
234 |
+
|
235 |
+
$field = ob_get_clean();
|
236 |
+
|
237 |
+
return $field;
|
238 |
+
}
|
239 |
+
|
240 |
+
// Country
|
241 |
+
// ---------------------------------------------------------------------------
|
242 |
+
public function country_field($field = '', $key, $args, $value) {
|
243 |
+
|
244 |
+
static $instance = 0;
|
245 |
+
|
246 |
+
if ($instance) {
|
247 |
+
return $field;
|
248 |
+
}
|
249 |
+
|
250 |
+
$instance++;
|
251 |
+
|
252 |
+
ob_start();
|
253 |
+
|
254 |
+
if (!empty($args['default'])) {
|
255 |
+
$value = $args['default'];
|
256 |
+
}
|
257 |
+
|
258 |
+
woocommerce_form_field($key, $args, $value);
|
259 |
+
|
260 |
+
$field = ob_get_clean();
|
261 |
+
|
262 |
+
return $field;
|
263 |
+
}
|
264 |
+
|
265 |
+
// State
|
266 |
+
// ---------------------------------------------------------------------------
|
267 |
+
public function state_field($field = '', $key, $args, $value) {
|
268 |
+
|
269 |
+
static $instance = 0;
|
270 |
+
|
271 |
+
if ($instance) {
|
272 |
+
return $field;
|
273 |
+
}
|
274 |
+
|
275 |
+
$instance++;
|
276 |
+
|
277 |
+
ob_start();
|
278 |
+
|
279 |
+
if (!empty($args['default'])) {
|
280 |
+
$value = $args['default'];
|
281 |
+
}
|
282 |
+
|
283 |
+
woocommerce_form_field($key, $args, $value);
|
284 |
+
|
285 |
+
$field = ob_get_clean();
|
286 |
+
|
287 |
+
return $field;
|
288 |
+
}
|
289 |
+
|
290 |
+
public function init() {
|
291 |
+
add_filter('woocommerce_form_field_radio', array($this, 'custom_field'), 10, 4);
|
292 |
+
add_filter('woocommerce_form_field_multicheckbox', array($this, 'custom_field'), 10, 4);
|
293 |
+
add_filter('woocommerce_form_field_multiselect', array($this, 'custom_field'), 10, 4);
|
294 |
+
add_filter('woocommerce_form_field_file', array($this, 'custom_field'), 10, 4);
|
295 |
+
add_filter('woocommerce_form_field_heading', array($this, 'heading_field'), 10, 4);
|
296 |
+
add_filter('woocommerce_form_field_colorpicker', array($this, 'colorpicker_field'), 10, 4);
|
297 |
+
add_filter('woocommerce_form_field_datepicker', array($this, 'datepicker_field'), 10, 4);
|
298 |
+
add_filter('woocommerce_form_field_timepicker', array($this, 'timepicker_field'), 10, 4);
|
299 |
+
add_filter('woocommerce_form_field_country', array($this, 'country_field'), 10, 4);
|
300 |
+
add_filter('woocommerce_form_field_state', array($this, 'state_field'), 10, 4);
|
301 |
+
}
|
302 |
+
|
303 |
+
}
|
304 |
+
|
305 |
+
WOOCCM_Fields_Filter::instance();
|
includes/view/frontend/class-wooccm-fields-handler.php
ADDED
@@ -0,0 +1,277 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class WOOCCM_Fields_Handler {
|
4 |
+
|
5 |
+
protected static $_instance;
|
6 |
+
|
7 |
+
public function __construct() {
|
8 |
+
$this->init();
|
9 |
+
}
|
10 |
+
|
11 |
+
public static function instance() {
|
12 |
+
if (is_null(self::$_instance)) {
|
13 |
+
self::$_instance = new self();
|
14 |
+
}
|
15 |
+
return self::$_instance;
|
16 |
+
}
|
17 |
+
|
18 |
+
public function posted_data($data) {
|
19 |
+
|
20 |
+
if ($fields = WC()->session->wooccm) {
|
21 |
+
|
22 |
+
foreach ($fields['fields'] as $key => $field) {
|
23 |
+
|
24 |
+
switch ($field['type']) {
|
25 |
+
|
26 |
+
case 'select':
|
27 |
+
case 'radio':
|
28 |
+
case 'multiselect':
|
29 |
+
case 'multicheckbox':
|
30 |
+
|
31 |
+
if (isset($data[$key]) && is_array($field['options'])) {
|
32 |
+
|
33 |
+
if ($values = (array) explode(',', str_replace(' ', '', ($data[$key])))) {
|
34 |
+
|
35 |
+
$names = array();
|
36 |
+
|
37 |
+
foreach ($values as $id) {
|
38 |
+
|
39 |
+
if (isset($field['options'][$id])) {
|
40 |
+
$names[] = $field['options'][$id];
|
41 |
+
}
|
42 |
+
|
43 |
+
$data[$key] = join(', ', (array) $names);
|
44 |
+
}
|
45 |
+
}
|
46 |
+
}
|
47 |
+
break;
|
48 |
+
}
|
49 |
+
}
|
50 |
+
}
|
51 |
+
return $data;
|
52 |
+
}
|
53 |
+
|
54 |
+
public function init_session() {
|
55 |
+
|
56 |
+
if (isset(WC()->session) && !WC()->session->wooccm) {
|
57 |
+
|
58 |
+
WC()->session->wooccm = array(
|
59 |
+
'fields' => array(),
|
60 |
+
'fees' => array(),
|
61 |
+
'files' => array(),
|
62 |
+
);
|
63 |
+
}
|
64 |
+
}
|
65 |
+
|
66 |
+
public function clear_session() {
|
67 |
+
unset(WC()->session->wooccm);
|
68 |
+
}
|
69 |
+
|
70 |
+
public function add_field_filter($field) {
|
71 |
+
|
72 |
+
$session_data = WC()->session->wooccm;
|
73 |
+
|
74 |
+
// keep attr id = attr name
|
75 |
+
// -------------------------------------------------------------------------
|
76 |
+
unset($field['id']);
|
77 |
+
|
78 |
+
switch ($field['type']) {
|
79 |
+
|
80 |
+
case 'select':
|
81 |
+
case 'radio':
|
82 |
+
|
83 |
+
if (!empty($field['options'])) {
|
84 |
+
if (is_array($field['options'])) {
|
85 |
+
$field['add_price_total'] = array_column($field['options'], 'add_price_total');
|
86 |
+
$field['add_price_type'] = array_column($field['options'], 'add_price_type');
|
87 |
+
$field['add_price_tax'] = array_column($field['options'], 'add_price_tax');
|
88 |
+
$field['options'] = array_column($field['options'], 'label');
|
89 |
+
}
|
90 |
+
} else {
|
91 |
+
$field['disabled'] = true;
|
92 |
+
}
|
93 |
+
|
94 |
+
break;
|
95 |
+
|
96 |
+
case 'multiselect':
|
97 |
+
case 'multicheckbox':
|
98 |
+
|
99 |
+
if (!empty($field['options'])) {
|
100 |
+
if (is_array($field['options'])) {
|
101 |
+
$field['add_price_total'] = array_column($field['options'], 'add_price_total');
|
102 |
+
$field['add_price_type'] = array_column($field['options'], 'add_price_type');
|
103 |
+
$field['add_price_tax'] = array_column($field['options'], 'add_price_tax');
|
104 |
+
$field['default'] = array_column($field['options'], 'default');
|
105 |
+
$field['options'] = array_column($field['options'], 'label');
|
106 |
+
}
|
107 |
+
} else {
|
108 |
+
$field['disabled'] = true;
|
109 |
+
}
|
110 |
+
|
111 |
+
break;
|
112 |
+
|
113 |
+
case 'heading':
|
114 |
+
$field['required'] = false;
|
115 |
+
break;
|
116 |
+
}
|
117 |
+
|
118 |
+
// Priority
|
119 |
+
// -----------------------------------------------------------------------
|
120 |
+
if (isset($field['order'])) {
|
121 |
+
$field['priority'] = $field['order'] * 10;
|
122 |
+
}
|
123 |
+
|
124 |
+
// ii18n
|
125 |
+
// -----------------------------------------------------------------------
|
126 |
+
|
127 |
+
$field['label'] = esc_html__($field['label'], WOOCCM_WC_DOMAIN);
|
128 |
+
$field['placeholder'] = esc_html__($field['placeholder'], WOOCCM_WC_DOMAIN);
|
129 |
+
|
130 |
+
$session_data['fields'][$field['key']] = $field;
|
131 |
+
|
132 |
+
WC()->session->wooccm = $session_data;
|
133 |
+
|
134 |
+
return $field;
|
135 |
+
}
|
136 |
+
|
137 |
+
public function add_field_classes($field) {
|
138 |
+
|
139 |
+
// Position
|
140 |
+
// -----------------------------------------------------------------------
|
141 |
+
if (!empty($field['position'])) {
|
142 |
+
$field['class'] = array_diff($field['class'], array('form-row-wide', 'form-row-first', 'form-row-last'));
|
143 |
+
$field['class'][] = $field['position'];
|
144 |
+
}
|
145 |
+
|
146 |
+
// WOOCCM
|
147 |
+
// -----------------------------------------------------------------------
|
148 |
+
|
149 |
+
$field['class'][] = 'wooccm-field';
|
150 |
+
$field['class'][] = 'wooccm-field-' . $field['name'];
|
151 |
+
|
152 |
+
// Type
|
153 |
+
// -----------------------------------------------------------------------
|
154 |
+
if (!empty($field['type'])) {
|
155 |
+
$field['class'][] = 'wooccm-type-' . $field['type'];
|
156 |
+
}
|
157 |
+
|
158 |
+
// Color
|
159 |
+
// -----------------------------------------------------------------------
|
160 |
+
if (!empty($field['type']) && $field['type'] == 'colorpicker') {
|
161 |
+
$field['class'][] = 'wooccm-colorpicker-' . $field['pickertype'];
|
162 |
+
}
|
163 |
+
|
164 |
+
// Extra
|
165 |
+
// -----------------------------------------------------------------------
|
166 |
+
if (!empty($field['extra_class'])) {
|
167 |
+
$field['class'][] = $field['extra_class'];
|
168 |
+
}
|
169 |
+
|
170 |
+
// Clearfix
|
171 |
+
// -----------------------------------------------------------------------
|
172 |
+
if (!empty($field['clear'])) {
|
173 |
+
$field['class'][] = 'wooccm-clearfix';
|
174 |
+
}
|
175 |
+
|
176 |
+
// Required
|
177 |
+
// -----------------------------------------------------------------------
|
178 |
+
|
179 |
+
if (isset($field['required'])) {
|
180 |
+
$field['custom_attributes']['data-required'] = (int) $field['required'];
|
181 |
+
}
|
182 |
+
|
183 |
+
return $field;
|
184 |
+
}
|
185 |
+
|
186 |
+
public function remove_checkout_fields($fields) {
|
187 |
+
|
188 |
+
foreach ($fields as $key => $type) {
|
189 |
+
|
190 |
+
foreach ($type as $field_id => $field) {
|
191 |
+
|
192 |
+
// Remove disabled
|
193 |
+
// -------------------------------------------------------------------
|
194 |
+
if (!empty($field['disabled'])) {
|
195 |
+
unset($fields[$key][$field_id]);
|
196 |
+
}
|
197 |
+
}
|
198 |
+
}
|
199 |
+
|
200 |
+
// Fix for required address field
|
201 |
+
if (get_option('woocommerce_ship_to_destination') == 'billing_only') {
|
202 |
+
unset($fields['shipping']);
|
203 |
+
}
|
204 |
+
|
205 |
+
return $fields;
|
206 |
+
}
|
207 |
+
|
208 |
+
//function woocommerce_checkout_address_2_field($option) {
|
209 |
+
// return 'required';
|
210 |
+
//}
|
211 |
+
|
212 |
+
public function remove_fields_priority($fields) {
|
213 |
+
|
214 |
+
foreach ($fields as $key => $field) {
|
215 |
+
unset($fields[$key]['label']);
|
216 |
+
unset($fields[$key]['placeholder']);
|
217 |
+
unset($fields[$key]['priority']);
|
218 |
+
unset($fields[$key]['required']);
|
219 |
+
}
|
220 |
+
|
221 |
+
return $fields;
|
222 |
+
}
|
223 |
+
|
224 |
+
public function remove_address_fields($data) {
|
225 |
+
|
226 |
+
$remove = array(
|
227 |
+
'shipping_country',
|
228 |
+
'shipping_address_1',
|
229 |
+
'shipping_city',
|
230 |
+
'shipping_state',
|
231 |
+
'shipping_postcode'
|
232 |
+
);
|
233 |
+
|
234 |
+
foreach ($remove as $key) {
|
235 |
+
if (empty($data[$key])) {
|
236 |
+
unset($data[$key]);
|
237 |
+
}
|
238 |
+
}
|
239 |
+
|
240 |
+
return $data;
|
241 |
+
}
|
242 |
+
|
243 |
+
public function init() {
|
244 |
+
|
245 |
+
// Prepare
|
246 |
+
|
247 |
+
add_filter('wooccm_checkout_field_filter', array($this, 'add_field_filter'));
|
248 |
+
|
249 |
+
// Add field classes
|
250 |
+
add_filter('wooccm_checkout_field_filter', array($this, 'add_field_classes'));
|
251 |
+
|
252 |
+
// Remove fields
|
253 |
+
// -----------------------------------------------------------------------
|
254 |
+
add_filter('woocommerce_checkout_fields', array($this, 'remove_checkout_fields'));
|
255 |
+
|
256 |
+
// Fix address_2 field
|
257 |
+
// -----------------------------------------------------------------------
|
258 |
+
//add_filter('default_option_woocommerce_checkout_address_2_field', array($this, 'woocommerce_checkout_address_2_field'));
|
259 |
+
// Fix address fields priority
|
260 |
+
add_filter('woocommerce_get_country_locale_default', array($this, 'remove_fields_priority'));
|
261 |
+
|
262 |
+
add_filter('woocommerce_get_country_locale_base', array($this, 'remove_fields_priority'));
|
263 |
+
|
264 |
+
// Fix required country notice when shipping address is activated
|
265 |
+
// -----------------------------------------------------------------------
|
266 |
+
add_filter('woocommerce_checkout_posted_data', array($this, 'remove_address_fields'));
|
267 |
+
|
268 |
+
// Clear session
|
269 |
+
add_action('woocommerce_checkout_posted_data', array($this, 'posted_data'));
|
270 |
+
|
271 |
+
add_action('woocommerce_init', array($this, 'init_session'));
|
272 |
+
add_action('woocommerce_checkout_order_processed', array($this, 'clear_session'), 150);
|
273 |
+
}
|
274 |
+
|
275 |
+
}
|
276 |
+
|
277 |
+
WOOCCM_Fields_Handler::instance();
|
includes/view/frontend/class-wooccm-fields-register.php
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class WOOCCM_Fields_Register {
|
4 |
+
|
5 |
+
protected static $_instance;
|
6 |
+
|
7 |
+
public function __construct() {
|
8 |
+
$this->init();
|
9 |
+
}
|
10 |
+
|
11 |
+
public static function instance() {
|
12 |
+
if (is_null(self::$_instance)) {
|
13 |
+
self::$_instance = new self();
|
14 |
+
}
|
15 |
+
return self::$_instance;
|
16 |
+
}
|
17 |
+
|
18 |
+
public function add_billing_fields($fields) {
|
19 |
+
return WOOCCM()->billing->get_fields();
|
20 |
+
}
|
21 |
+
|
22 |
+
public function add_shipping_fields($fields) {
|
23 |
+
return WOOCCM()->shipping->get_fields();
|
24 |
+
}
|
25 |
+
|
26 |
+
public function add_keys($fields) {
|
27 |
+
|
28 |
+
$frontend_fields = array();
|
29 |
+
|
30 |
+
foreach ($fields as $field_id => $field) {
|
31 |
+
if (!empty($field['key']) && empty($field['disabled'])) {
|
32 |
+
$frontend_fields[$field['key']] = $field;
|
33 |
+
}
|
34 |
+
}
|
35 |
+
|
36 |
+
return $frontend_fields;
|
37 |
+
}
|
38 |
+
|
39 |
+
public function init() {
|
40 |
+
|
41 |
+
// Add keys
|
42 |
+
// -----------------------------------------------------------------------
|
43 |
+
add_filter('wooccm_additional_fields', array($this, 'add_keys'));
|
44 |
+
add_filter('wooccm_billing_fields', array($this, 'add_keys'));
|
45 |
+
add_filter('wooccm_shipping_fields', array($this, 'add_keys'));
|
46 |
+
|
47 |
+
// Billing fields
|
48 |
+
// -----------------------------------------------------------------------
|
49 |
+
add_filter('woocommerce_billing_fields', array($this, 'add_billing_fields'));
|
50 |
+
|
51 |
+
// Shipping fields
|
52 |
+
// -----------------------------------------------------------------------
|
53 |
+
|
54 |
+
add_filter('woocommerce_shipping_fields', array($this, 'add_shipping_fields'));
|
55 |
+
}
|
56 |
+
|
57 |
+
}
|
58 |
+
|
59 |
+
WOOCCM_Fields_Register::instance();
|
new/class-wooccm-admin.php
DELETED
@@ -1,127 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
if (!class_exists('WOOCCM_Field_Admin')) {
|
3 |
-
|
4 |
-
class WOOCCM_Field_Admin {
|
5 |
-
|
6 |
-
protected static $instance;
|
7 |
-
|
8 |
-
public function ajax_select_search_products() {
|
9 |
-
|
10 |
-
if (current_user_can('manage_woocommerce') && check_ajax_referer('search-products', 'security') && isset($_REQUEST['term'])) {
|
11 |
-
|
12 |
-
if (empty($term) && isset($_GET['term'])) {
|
13 |
-
$term = (string) wc_clean(wp_unslash($_GET['term']));
|
14 |
-
}
|
15 |
-
|
16 |
-
if (empty($term)) {
|
17 |
-
wp_die();
|
18 |
-
}
|
19 |
-
|
20 |
-
if (!empty($_GET['limit'])) {
|
21 |
-
$limit = absint($_GET['limit']);
|
22 |
-
} else {
|
23 |
-
$limit = absint(apply_filters('woocommerce_json_search_limit', 30));
|
24 |
-
}
|
25 |
-
|
26 |
-
$include_ids = !empty($_GET['include']) ? array_map('absint', (array) wp_unslash($_GET['include'])) : array();
|
27 |
-
$exclude_ids = !empty($_GET['exclude']) ? array_map('absint', (array) wp_unslash($_GET['exclude'])) : array();
|
28 |
-
$selected_ids = !empty($_GET['selected']) ? array_map('absint', (array) wp_unslash($_GET['selected'])) : array();
|
29 |
-
|
30 |
-
$include_variations = false;
|
31 |
-
|
32 |
-
$data_store = WC_Data_Store::load('product');
|
33 |
-
$ids = $data_store->search_products($term, '', (bool) $include_variations, false, $limit, $include_ids, $exclude_ids + $selected_ids);
|
34 |
-
|
35 |
-
$product_objects = array_filter(array_map('wc_get_product', $ids), 'wc_products_array_filter_readable');
|
36 |
-
$products = array();
|
37 |
-
|
38 |
-
foreach ($product_objects as $product_object) {
|
39 |
-
$formatted_name = $product_object->get_formatted_name();
|
40 |
-
$managing_stock = $product_object->managing_stock();
|
41 |
-
|
42 |
-
if ($managing_stock && !empty($_GET['display_stock'])) {
|
43 |
-
$stock_amount = $product_object->get_stock_quantity();
|
44 |
-
/* Translators: %d stock amount */
|
45 |
-
$formatted_name .= ' – ' . sprintf(__('Stock: %d', 'woocommerce'), wc_format_stock_quantity_for_display($stock_amount, $product_object));
|
46 |
-
}
|
47 |
-
|
48 |
-
$products[$product_object->get_id()] = rawurldecode($formatted_name);
|
49 |
-
}
|
50 |
-
|
51 |
-
wp_send_json(apply_filters('woocommerce_json_search_found_products', $products));
|
52 |
-
}
|
53 |
-
}
|
54 |
-
|
55 |
-
// public function ajax_select_search_states() {
|
56 |
-
//
|
57 |
-
// if (current_user_can('manage_woocommerce') && check_ajax_referer('search-states', 'security') && isset($_REQUEST['country'])) {
|
58 |
-
//
|
59 |
-
// if ($states = WC()->countries->get_states($_REQUEST['country'])) {
|
60 |
-
// wp_send_json($states);
|
61 |
-
// }
|
62 |
-
// }
|
63 |
-
// }
|
64 |
-
|
65 |
-
function enqueue_scripts() {
|
66 |
-
|
67 |
-
wp_register_style('wooccm-admin', plugins_url('assets/css/wooccm-admin.css', WOOCCM_PLUGIN_FILE), array('media-views', /* 'woocommerce_admin_marketplace_styles' */), WOOCCM_PLUGIN_VERSION, 'all');
|
68 |
-
|
69 |
-
wp_register_script('wooccm-admin', plugins_url('assets/js/wooccm-admin.js', WOOCCM_PLUGIN_FILE), array('jquery'), WOOCCM_PLUGIN_VERSION, true);
|
70 |
-
|
71 |
-
if (isset($_GET['tab']) && $_GET['tab'] === WOOCCM_PREFIX) {
|
72 |
-
wp_enqueue_style('wooccm-admin');
|
73 |
-
wp_enqueue_script('wooccm-admin');
|
74 |
-
}
|
75 |
-
}
|
76 |
-
|
77 |
-
function add_beta_badge() {
|
78 |
-
?>
|
79 |
-
<style>
|
80 |
-
body #adminmenu #toplevel_page_woocommerce a[href="<?php echo admin_url('admin.php?page=wc-settings&tab=' . sanitize_title(WOOCCM_PREFIX)); ?>"]:before {
|
81 |
-
content: 'BETA';
|
82 |
-
color: #fff;
|
83 |
-
background-color: #21c2f8;
|
84 |
-
padding: 1px 7px;
|
85 |
-
font-size: 9px;
|
86 |
-
font-weight: 700;
|
87 |
-
border-radius: 10px;
|
88 |
-
position: absolute;
|
89 |
-
right: 15px;
|
90 |
-
line-height: 16px;
|
91 |
-
font-style: italic;
|
92 |
-
}
|
93 |
-
</style>
|
94 |
-
<?php
|
95 |
-
}
|
96 |
-
|
97 |
-
function add_tab($settings_tabs) {
|
98 |
-
$settings_tabs[WOOCCM_PREFIX] = esc_html__('Checkout', 'woocommerce-checkout-manager');
|
99 |
-
return $settings_tabs;
|
100 |
-
}
|
101 |
-
|
102 |
-
function add_menu_page() {
|
103 |
-
add_submenu_page('woocommerce', esc_html__('Checkout', 'woocommerce-checkout-manager'), esc_html__('Checkout', 'woocommerce-checkout-manager'), 'manage_woocommerce', admin_url('admin.php?page=wc-settings&tab=' . sanitize_title(WOOCCM_PREFIX)));
|
104 |
-
}
|
105 |
-
|
106 |
-
function init() {
|
107 |
-
add_action('wp_ajax_wooccm_select_search_products', array($this, 'ajax_select_search_products'));
|
108 |
-
//add_action('wp_ajax_wooccm_select_search_states', array($this, 'ajax_select_search_states'));
|
109 |
-
|
110 |
-
add_action('admin_enqueue_scripts', array($this, 'enqueue_scripts'));
|
111 |
-
add_action('admin_head', array($this, 'add_beta_badge'));
|
112 |
-
add_action('admin_menu', array($this, 'add_menu_page'));
|
113 |
-
add_filter('woocommerce_settings_tabs_array', array($this, 'add_tab'), 50);
|
114 |
-
}
|
115 |
-
|
116 |
-
public static function instance() {
|
117 |
-
if (!isset(self::$instance)) {
|
118 |
-
self::$instance = new self();
|
119 |
-
self::$instance->init();
|
120 |
-
}
|
121 |
-
return self::$instance;
|
122 |
-
}
|
123 |
-
|
124 |
-
}
|
125 |
-
|
126 |
-
WOOCCM_Field_Admin::instance();
|
127 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
new/class-wooccm-install.php
DELETED
@@ -1,19 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class WOOCCM_Install {
|
4 |
-
|
5 |
-
public static function install() {
|
6 |
-
|
7 |
-
// Check if we are not already running this routine.
|
8 |
-
if ('yes' === get_transient('wooccm_installing')) {
|
9 |
-
return;
|
10 |
-
}
|
11 |
-
|
12 |
-
// If we made it till here nothing is running yet, lets set the transient now.
|
13 |
-
set_transient('wooccm_installing', 'yes', MINUTE_IN_SECONDS * 10);
|
14 |
-
set_transient('wooccm-first-rating', true, MONTH_IN_SECONDS);
|
15 |
-
|
16 |
-
wooccm_install();
|
17 |
-
}
|
18 |
-
|
19 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
new/controller/class-wooccm-order-controller.php
DELETED
@@ -1,342 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
if (!class_exists('WOOCCM_Order_Controller')) {
|
4 |
-
|
5 |
-
class WOOCCM_Order_Controller extends WOOCCM_Upload {
|
6 |
-
|
7 |
-
protected static $instance;
|
8 |
-
|
9 |
-
public function enqueue_scripts() {
|
10 |
-
|
11 |
-
WOOCCM()->register_scripts();
|
12 |
-
|
13 |
-
wp_register_script('wooccm-order-upload', plugins_url('assets/js/wooccm-order-upload.js', WOOCCM_PLUGIN_FILE), array(), WOOCCM_PLUGIN_VERSION, true);
|
14 |
-
|
15 |
-
wp_localize_script('wooccm-order-upload', 'wooccm_upload', array(
|
16 |
-
'ajax_url' => admin_url('admin-ajax.php?metabox=' . is_admin()),
|
17 |
-
'nonce' => wp_create_nonce('wooccm_upload'),
|
18 |
-
'message' => array(
|
19 |
-
'uploading' => esc_html__('Uploading, please wait...', 'woocommerce-checkout-manager'),
|
20 |
-
'saving' => esc_html__('Saving, please wait...', 'woocommerce-checkout-manager'),
|
21 |
-
'success' => esc_html__('Files uploaded successfully.', 'woocommerce-checkout-manager'),
|
22 |
-
'deleted' => esc_html__('Deleted successfully.', 'woocommerce-checkout-manager'),
|
23 |
-
),
|
24 |
-
'icons' => array(
|
25 |
-
'interactive' => site_url('wp-includes/images/media/interactive.png'),
|
26 |
-
'spreadsheet' => site_url('wp-includes/images/media/spreadsheet.png'),
|
27 |
-
'archive' => site_url('wp-includes/images/media/archive.png'),
|
28 |
-
'audio' => site_url('wp-includes/images/media/audio.png'),
|
29 |
-
'text' => site_url('wp-includes/images/media/text.png'),
|
30 |
-
'video' => site_url('wp-includes/images/media/video.png')
|
31 |
-
)
|
32 |
-
));
|
33 |
-
|
34 |
-
if (is_admin() && $screen = get_current_screen()) {
|
35 |
-
if (in_array($screen->id, array(/* 'product', 'edit-product', */'shop_order', 'edit-shop_order'))) {
|
36 |
-
wp_enqueue_script('wooccm-order-upload');
|
37 |
-
}
|
38 |
-
}
|
39 |
-
|
40 |
-
if (is_account_page()) {
|
41 |
-
wp_enqueue_style('wooccm');
|
42 |
-
wp_enqueue_style('dashicons');
|
43 |
-
wp_enqueue_script('wooccm-order-upload');
|
44 |
-
}
|
45 |
-
}
|
46 |
-
|
47 |
-
public function ajax_order_attachment_upload() {
|
48 |
-
|
49 |
-
if (!empty($_REQUEST) && check_admin_referer('wooccm_upload', 'nonce')) {
|
50 |
-
|
51 |
-
$files = ( isset($_FILES['wooccm_order_attachment_upload']) ? $_FILES['wooccm_order_attachment_upload'] : false );
|
52 |
-
|
53 |
-
if (empty($files)) {
|
54 |
-
//wc_order_notice(esc_html__('No uploads were recognised. Files were not uploaded.', 'woocommerce-checkout-manager'), 'error');
|
55 |
-
wp_send_json_error(esc_html__('No uploads were recognised. Files were not uploaded.', 'woocommerce-checkout-manager'), 'error');
|
56 |
-
}
|
57 |
-
|
58 |
-
$order_id = ( isset($_REQUEST['order_id']) ? absint($_REQUEST['order_id']) : false );
|
59 |
-
|
60 |
-
if (empty($order_id)) {
|
61 |
-
wp_send_json_error(esc_html__('Empty order id.', 'woocommerce-checkout-manager'));
|
62 |
-
}
|
63 |
-
|
64 |
-
if (!$post = get_post($order_id)) {
|
65 |
-
wp_send_json_error(esc_html__('Invalid order id.', 'woocommerce-checkout-manager'));
|
66 |
-
}
|
67 |
-
|
68 |
-
if (count($attachment_ids = $this->process_uploads($files, 'wooccm_order_attachment_upload', $order_id))) {
|
69 |
-
|
70 |
-
ob_start();
|
71 |
-
|
72 |
-
if (!empty($_REQUEST['metabox'])) {
|
73 |
-
$this->add_metabox_content($post);
|
74 |
-
} else {
|
75 |
-
$this->add_upload_files($post->ID);
|
76 |
-
}
|
77 |
-
|
78 |
-
wp_send_json_success(ob_get_clean());
|
79 |
-
/* send email
|
80 |
-
$email_recipients = $options['checkness']['wooccm_notification_email'];
|
81 |
-
if (empty($email_recipients))
|
82 |
-
$email_recipients = get_option('admin_email');
|
83 |
-
$email_heading = __('Files Uploaded by Customer', 'woocommerce-checkout-manager');
|
84 |
-
$subject = sprintf(__('WooCommerce Checkout Manager - %s [%s]', 'woocommerce-checkout-manager'), $email_heading, $order->billing_first_name . ' ' . $order->billing_last_name);
|
85 |
-
|
86 |
-
$mailer = WC()->mailer();
|
87 |
-
|
88 |
-
// Buffer
|
89 |
-
ob_start();
|
90 |
-
?>
|
91 |
-
<p>This is an automatic message from WooCommerce Checkout Manager, reporting that files have been uploaded by <?php echo $order->billing_first_name; ?> <?php echo $order->billing_last_name; ?>.</p>
|
92 |
-
<h3>Customer Details</h3>
|
93 |
-
<ul>
|
94 |
-
<li>Name: <?php echo $order->billing_first_name; ?> <?php $order->billing_last_name; ?></li>
|
95 |
-
<li>E-mail: <?php echo $order->billing_email; ?></li>
|
96 |
-
<li>Order Number: <?php echo $order_id; ?></li>
|
97 |
-
</ul>
|
98 |
-
<p>You can view the files and order details via back-end by following this <a href="<?php echo admin_url('/post.php?post=' . $order_id . '&action=edit'); ?>" target="_blank">link</a>.</p>
|
99 |
-
<?php
|
100 |
-
// Get contents
|
101 |
-
$message = ob_get_clean();
|
102 |
-
|
103 |
-
$message = $mailer->wrap_message($email_heading, $message);
|
104 |
-
|
105 |
-
// add_filter( 'wp_mail_content_type', 'wooccm_set_html_content_type' );
|
106 |
-
// wc_mail( $email_recipients, $subject, $message );
|
107 |
-
$mailer->send($email_recipients, strip_tags($subject), $message);
|
108 |
-
// remove_filter( 'wp_mail_content_type', 'wooccm_set_html_content_type' ); */
|
109 |
-
}
|
110 |
-
wp_send_json_error(esc_html__('Unknow error.', 'woocommerce-checkout-manager'));
|
111 |
-
}
|
112 |
-
}
|
113 |
-
|
114 |
-
public function add_upload_files($order_id) {
|
115 |
-
|
116 |
-
if (get_option('wooccm_order_upload_files', 'no') === 'yes') {
|
117 |
-
|
118 |
-
if ($order = wc_get_order($order_id)) {
|
119 |
-
|
120 |
-
if (in_array("wc-{$order->get_status()}", array_values(get_option('wooccm_order_upload_files_order_status', array())))) {
|
121 |
-
|
122 |
-
$attachments = get_posts(array(
|
123 |
-
'fields' => 'ids',
|
124 |
-
'post_type' => 'attachment',
|
125 |
-
'numberposts' => -1,
|
126 |
-
'post_status' => null,
|
127 |
-
'post_parent' => $order->get_id())
|
128 |
-
);
|
129 |
-
|
130 |
-
wc_get_template('templates/order/order-upload-files.php', array('order' => $order, 'attachments' => $attachments), '', WOOCCM_PLUGIN_DIR);
|
131 |
-
}
|
132 |
-
}
|
133 |
-
}
|
134 |
-
}
|
135 |
-
|
136 |
-
public function add_custom_fields($order_id) {
|
137 |
-
|
138 |
-
if (get_option('wooccm_order_custom_fields', 'no') === 'yes') {
|
139 |
-
|
140 |
-
if ($order = wc_get_order($order_id)) {
|
141 |
-
|
142 |
-
if (in_array("wc-{$order->get_status()}", array_values(get_option('wooccm_order_custom_fields_status', array())))) {
|
143 |
-
|
144 |
-
wc_get_template('templates/order/order-custom-fields.php', array('order_id' => $order_id), '', WOOCCM_PLUGIN_DIR);
|
145 |
-
}
|
146 |
-
}
|
147 |
-
}
|
148 |
-
}
|
149 |
-
|
150 |
-
public function add_metabox_content($post) {
|
151 |
-
|
152 |
-
if ($order = wc_get_order($post->ID)) {
|
153 |
-
|
154 |
-
$attachments = get_posts(array(
|
155 |
-
'fields' => 'ids',
|
156 |
-
'post_type' => 'attachment',
|
157 |
-
'numberposts' => -1,
|
158 |
-
'post_status' => null,
|
159 |
-
'post_parent' => $order->get_id()
|
160 |
-
));
|
161 |
-
?>
|
162 |
-
|
163 |
-
<?php wp_enqueue_style('wccm_upload_file_style', plugins_url('assets/old/edit-order-uploads-file_editing_table.css', WOOCCM_PLUGIN_FILE)); ?>
|
164 |
-
|
165 |
-
<?php include WOOCCM_PLUGIN_DIR . 'new/view/backend/meta-boxes/html-order-uploads.php'; ?>
|
166 |
-
|
167 |
-
<?php
|
168 |
-
|
169 |
-
}
|
170 |
-
}
|
171 |
-
|
172 |
-
// Admin
|
173 |
-
// -------------------------------------------------------------------------
|
174 |
-
|
175 |
-
public function add_metabox() {
|
176 |
-
add_meta_box('woocommerce-order-files', esc_html__('Order Uploaded Files', 'woocommerce-checkout-manager'), array($this, 'add_metabox_content'), 'shop_order', 'normal', 'default');
|
177 |
-
}
|
178 |
-
|
179 |
-
public function get_settings() {
|
180 |
-
return array(
|
181 |
-
array(
|
182 |
-
'type' => 'title',
|
183 |
-
'id' => 'section_title'
|
184 |
-
),
|
185 |
-
array(
|
186 |
-
'name' => esc_html__('Add upload files', 'woocommerce-checkout-manager'),
|
187 |
-
'desc_tip' => esc_html__('Allow customers to upload files in the order.', 'woocommerce-checkout-manager'),
|
188 |
-
'id' => 'wooccm_order_upload_files',
|
189 |
-
'type' => 'select',
|
190 |
-
'class' => 'chosen_select',
|
191 |
-
'options' => array(
|
192 |
-
'yes' => esc_html__('Yes', 'woocommerce-checkout-manager'),
|
193 |
-
'no' => esc_html__('No', 'woocommerce-checkout-manager'),
|
194 |
-
),
|
195 |
-
'default' => 'no',
|
196 |
-
),
|
197 |
-
array(
|
198 |
-
'name' => esc_html__('Add for this order status', 'woocommerce-checkout-manager'),
|
199 |
-
'desc_tip' => esc_html__('Allow customers to upload files in the order.', 'woocommerce-checkout-manager'),
|
200 |
-
'id' => 'wooccm_order_upload_files_order_status',
|
201 |
-
'type' => 'multiselect',
|
202 |
-
'class' => 'chosen_select',
|
203 |
-
'options' => wc_get_order_statuses(),
|
204 |
-
),
|
205 |
-
array(
|
206 |
-
'name' => esc_html__('Add upload files title', 'woocommerce-checkout-manager'),
|
207 |
-
'desc_tip' => esc_html__('Add custom title for the uploads files table.', 'woocommerce-checkout-manager'),
|
208 |
-
'id' => 'wooccm_order_upload_files_title',
|
209 |
-
'type' => 'text',
|
210 |
-
'placeholder' => esc_html__('Upload files', 'woocommerce-checkout-manager')
|
211 |
-
),
|
212 |
-
array(
|
213 |
-
'name' => esc_html__('Add custom fields', 'woocommerce-checkout-manager'),
|
214 |
-
'desc_tip' => esc_html__('Show the selected fields in the order.', 'woocommerce-checkout-manager'),
|
215 |
-
'id' => 'wooccm_order_custom_fields',
|
216 |
-
'type' => 'select',
|
217 |
-
'class' => 'chosen_select',
|
218 |
-
'options' => array(
|
219 |
-
'yes' => esc_html__('Yes', 'woocommerce-checkout-manager'),
|
220 |
-
'no' => esc_html__('No', 'woocommerce-checkout-manager'),
|
221 |
-
),
|
222 |
-
'default' => 'no',
|
223 |
-
),
|
224 |
-
array(
|
225 |
-
'name' => esc_html__('Add for this order status', 'woocommerce-checkout-manager'),
|
226 |
-
'desc_tip' => esc_html__('Allow customers to upload files in the order.', 'woocommerce-checkout-manager'),
|
227 |
-
'id' => 'wooccm_order_custom_fields_status',
|
228 |
-
'type' => 'multiselect',
|
229 |
-
'class' => 'chosen_select',
|
230 |
-
'options' => wc_get_order_statuses(),
|
231 |
-
),
|
232 |
-
array(
|
233 |
-
'name' => esc_html__('Add custom fields title', 'woocommerce-checkout-manager'),
|
234 |
-
'desc_tip' => esc_html__('Add custom title for the uploads files table.', 'woocommerce-checkout-manager'),
|
235 |
-
'id' => 'wooccm_order_custom_fields_title',
|
236 |
-
'type' => 'text',
|
237 |
-
'placeholder' => esc_html__('Order extra', 'woocommerce-checkout-manager')
|
238 |
-
),
|
239 |
-
array(
|
240 |
-
'type' => 'sectionend',
|
241 |
-
'id' => 'section_end'
|
242 |
-
)
|
243 |
-
);
|
244 |
-
}
|
245 |
-
|
246 |
-
public function add_section() {
|
247 |
-
|
248 |
-
global $current_section;
|
249 |
-
|
250 |
-
if ('order' == $current_section) {
|
251 |
-
|
252 |
-
$settings = $this->get_settings();
|
253 |
-
|
254 |
-
include_once(WOOCCM_PLUGIN_DIR . 'new/view/backend/pages/order.php');
|
255 |
-
}
|
256 |
-
}
|
257 |
-
|
258 |
-
public function save_settings() {
|
259 |
-
woocommerce_update_options($this->get_settings());
|
260 |
-
}
|
261 |
-
|
262 |
-
// Compatibility
|
263 |
-
// -------------------------------------------------------------------------
|
264 |
-
|
265 |
-
public function enable_file_upload($value) {
|
266 |
-
|
267 |
-
$options = get_option('wccs_settings');
|
268 |
-
|
269 |
-
if (!empty($options['checkness']['enable_file_upload'])) {
|
270 |
-
return 'yes';
|
271 |
-
}
|
272 |
-
|
273 |
-
return $value;
|
274 |
-
}
|
275 |
-
|
276 |
-
public function upload_os($value) {
|
277 |
-
|
278 |
-
$options = get_option('wccs_settings');
|
279 |
-
|
280 |
-
if (!empty($options['checkness']['upload_os'])) {
|
281 |
-
return (array) implode(',', $options['checkness']['upload_os']);
|
282 |
-
}
|
283 |
-
|
284 |
-
return $value;
|
285 |
-
}
|
286 |
-
|
287 |
-
public function upload_title($value) {
|
288 |
-
|
289 |
-
$options = get_option('wccs_settings');
|
290 |
-
|
291 |
-
if (!empty($options['checkness']['upload_title'])) {
|
292 |
-
return $options['checkness']['upload_title'];
|
293 |
-
}
|
294 |
-
|
295 |
-
return $value;
|
296 |
-
}
|
297 |
-
|
298 |
-
function init() {
|
299 |
-
//
|
300 |
-
// global $wooccm_sections;
|
301 |
-
//
|
302 |
-
// $wooccm_sections['order'] = esc_html__('Order', 'woocommerce-checkout-manager');
|
303 |
-
|
304 |
-
add_action('wp_enqueue_scripts', array($this, 'enqueue_scripts'));
|
305 |
-
|
306 |
-
add_action('wp_ajax_wooccm_order_attachment_upload', array($this, 'ajax_order_attachment_upload'));
|
307 |
-
add_action('wp_ajax_nopriv_wooccm_order_attachment_upload', array($this, 'ajax_order_attachment_upload'));
|
308 |
-
|
309 |
-
add_action('add_meta_boxes', array($this, 'add_metabox'));
|
310 |
-
|
311 |
-
add_action('woocommerce_sections_' . WOOCCM_PREFIX, array($this, 'add_section'), 99);
|
312 |
-
add_action('woocommerce_settings_save_' . WOOCCM_PREFIX, array($this, 'save_settings'));
|
313 |
-
|
314 |
-
// Frontend
|
315 |
-
// -----------------------------------------------------------------------
|
316 |
-
|
317 |
-
add_action('woocommerce_thankyou', array($this, 'add_upload_files'));
|
318 |
-
add_action('woocommerce_view_order', array($this, 'add_upload_files'));
|
319 |
-
|
320 |
-
add_action('woocommerce_thankyou', array($this, 'add_custom_fields'));
|
321 |
-
add_action('woocommerce_view_order', array($this, 'add_custom_fields'));
|
322 |
-
|
323 |
-
// Compatibility
|
324 |
-
// -----------------------------------------------------------------------
|
325 |
-
|
326 |
-
add_filter('default_option_wooccm_order_upload_files', array($this, 'enable_file_upload'));
|
327 |
-
add_filter('default_option_wooccm_order_upload_files_order_status', array($this, 'upload_os'));
|
328 |
-
add_filter('default_option_wooccm_order_upload_files_title', array($this, 'upload_title'));
|
329 |
-
}
|
330 |
-
|
331 |
-
public static function instance() {
|
332 |
-
if (!isset(self::$instance)) {
|
333 |
-
self::$instance = new self();
|
334 |
-
self::$instance->init();
|
335 |
-
}
|
336 |
-
return self::$instance;
|
337 |
-
}
|
338 |
-
|
339 |
-
}
|
340 |
-
|
341 |
-
WOOCCM_Order_Controller::instance();
|
342 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
new/install.php
DELETED
@@ -1,147 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
if (!class_exists('WOOCCM_Install')) {
|
4 |
-
|
5 |
-
class WOOCCM_Install {
|
6 |
-
|
7 |
-
protected static $instance;
|
8 |
-
|
9 |
-
static function add_field_defaults($field, $key) {
|
10 |
-
|
11 |
-
$defaults = array(
|
12 |
-
'order' => '',
|
13 |
-
'cow' => '',
|
14 |
-
'type' => '',
|
15 |
-
'default' => '',
|
16 |
-
'label' => '',
|
17 |
-
'placeholder' => '',
|
18 |
-
'force_title2' => '',
|
19 |
-
'position' => '',
|
20 |
-
'class' => '',
|
21 |
-
'extra_class' => '',
|
22 |
-
'clear' => '',
|
23 |
-
'clear_row' => '',
|
24 |
-
'options' => '',
|
25 |
-
'options_array' => '',
|
26 |
-
//'user_role' => '',
|
27 |
-
'role_options' => '',
|
28 |
-
'role_options2' => '',
|
29 |
-
'required' => '',
|
30 |
-
'checkbox' => '',
|
31 |
-
'wooccm_required' => '',
|
32 |
-
'color' => '',
|
33 |
-
'colorpickerd' => '',
|
34 |
-
'colorpickertype' => '',
|
35 |
-
'priority' => '',
|
36 |
-
'fancy' => '',
|
37 |
-
'conditional_tie' => ''
|
38 |
-
);
|
39 |
-
|
40 |
-
$field = wp_parse_args($field, $defaults);
|
41 |
-
|
42 |
-
if (in_array('form-row-first', $field['class'])) {
|
43 |
-
$field['position'] = 'form-row-first';
|
44 |
-
} elseif (in_array('form-row-last', $field['class'])) {
|
45 |
-
$field['position'] = 'form-row-last';
|
46 |
-
$field['clear'] = true;
|
47 |
-
$field['clear_fow'] = true;
|
48 |
-
} else {
|
49 |
-
$field['position'] = 'form-row-wide';
|
50 |
-
}
|
51 |
-
|
52 |
-
$field['cow'] = $key;
|
53 |
-
$field['checkbox'] = $field['required'];
|
54 |
-
$field['wooccm_required'] = $field['required'];
|
55 |
-
|
56 |
-
$field['type'] = ($field['type'] == 'checkbox' ) ? 'checkbox_wccm' : $field['type'];
|
57 |
-
$field['type'] = ($field['type'] == 'text' ) ? 'wooccmtext' : $field['type'];
|
58 |
-
$field['type'] = ($field['type'] == 'select' ) ? 'wooccmselect' : $field['type'];
|
59 |
-
$field['type'] = ($field['type'] == 'country' ) ? 'wooccmcountry' : $field['type'];
|
60 |
-
$field['type'] = ($field['type'] == 'state' ) ? 'wooccmstate' : $field['type'];
|
61 |
-
$field['type'] = ($field['type'] == 'date' ) ? 'datepicker' : $field['type'];
|
62 |
-
|
63 |
-
return $field;
|
64 |
-
}
|
65 |
-
|
66 |
-
static function add_fields_defaults($fields) {
|
67 |
-
|
68 |
-
$fields_defaults = array();
|
69 |
-
|
70 |
-
$i = 0;
|
71 |
-
foreach ($fields as $key => $field) {
|
72 |
-
$fields_defaults[$i] = self::add_field_defaults($field, $key);
|
73 |
-
$i++;
|
74 |
-
}
|
75 |
-
|
76 |
-
return $fields_defaults;
|
77 |
-
}
|
78 |
-
|
79 |
-
static function field_defaults() {
|
80 |
-
|
81 |
-
add_filter('option_woocommerce_checkout_company_field', '__return_null');
|
82 |
-
add_filter('option_woocommerce_checkout_address_2_field', '__return_null');
|
83 |
-
|
84 |
-
// Billing fields
|
85 |
-
// -----------------------------------------------------------------------
|
86 |
-
add_filter('woocommerce_billing_fields', array('WOOCCM_Install', 'add_fields_defaults'));
|
87 |
-
|
88 |
-
// Shipping fields
|
89 |
-
// -----------------------------------------------------------------------
|
90 |
-
|
91 |
-
add_filter('woocommerce_shipping_fields', array('WOOCCM_Install', 'add_fields_defaults'));
|
92 |
-
}
|
93 |
-
|
94 |
-
static function wccs_settings() {
|
95 |
-
if (!get_option('wccs_settings')) {
|
96 |
-
update_option('wccs_settings', array('checkness' => array(
|
97 |
-
'position' => 'after_order_notes',
|
98 |
-
'wooccm_notification_email' => get_option('admin_email'),
|
99 |
-
'payment_method_d' => 'Payment Method',
|
100 |
-
'time_stamp_title' => 'Order Time',
|
101 |
-
'payment_method_t' => '1',
|
102 |
-
'shipping_method_d' => 'Shipping Method',
|
103 |
-
'shipping_method_t' => '1',
|
104 |
-
)));
|
105 |
-
}
|
106 |
-
}
|
107 |
-
|
108 |
-
static function wccs_settings2() {
|
109 |
-
if (!get_option('wccs_settings2')) {
|
110 |
-
update_option('wccs_settings2', array('shipping_buttons' => apply_filters('woocommerce_shipping_fields', WC()->countries->get_default_address_fields())));
|
111 |
-
}
|
112 |
-
}
|
113 |
-
|
114 |
-
static function wccs_settings3() {
|
115 |
-
if (!get_option('wccs_settings3')) {
|
116 |
-
update_option('wccs_settings3', array('billing_buttons' => apply_filters('woocommerce_billing_fields', WC()->countries->get_default_address_fields())));
|
117 |
-
}
|
118 |
-
}
|
119 |
-
|
120 |
-
static function do_activation() {
|
121 |
-
self::field_defaults();
|
122 |
-
self::wccs_settings();
|
123 |
-
self::wccs_settings2();
|
124 |
-
self::wccs_settings3();
|
125 |
-
}
|
126 |
-
|
127 |
-
function woocommerce() {
|
128 |
-
self::field_defaults();
|
129 |
-
}
|
130 |
-
|
131 |
-
function init() {
|
132 |
-
|
133 |
-
add_action('woocommerce_init', array($this, 'woocommerce'));
|
134 |
-
}
|
135 |
-
|
136 |
-
public static function instance() {
|
137 |
-
if (!isset(self::$instance)) {
|
138 |
-
self::$instance = new self();
|
139 |
-
///self::$instance->init();
|
140 |
-
}
|
141 |
-
return self::$instance;
|
142 |
-
}
|
143 |
-
|
144 |
-
}
|
145 |
-
|
146 |
-
WOOCCM_Install::instance();
|
147 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
new/model/class-wooccm-field.php
DELETED
@@ -1,229 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class WOOCCM_Field {
|
4 |
-
|
5 |
-
protected $prefix = '';
|
6 |
-
protected $option_name = '';
|
7 |
-
protected $defaults = array();
|
8 |
-
|
9 |
-
protected function order_fields($a, $b) {
|
10 |
-
|
11 |
-
if (!isset($a['order']) || !isset($b['order']))
|
12 |
-
return 0;
|
13 |
-
|
14 |
-
if ($a['order'] == $b['order'])
|
15 |
-
return 0;
|
16 |
-
|
17 |
-
return ( $a['order'] < $b['order'] ) ? -1 : 1;
|
18 |
-
}
|
19 |
-
|
20 |
-
protected function duplicated_name($name, $fields) {
|
21 |
-
|
22 |
-
if (!empty($fields)) {
|
23 |
-
if (is_array($fields)) {
|
24 |
-
foreach ($fields as $item) {
|
25 |
-
if (isset($item['name']) && $item['name'] == $name) {
|
26 |
-
return true;
|
27 |
-
}
|
28 |
-
}
|
29 |
-
}
|
30 |
-
}
|
31 |
-
}
|
32 |
-
|
33 |
-
public function get_id($fields) {
|
34 |
-
return absint(key(array_slice($fields, -1, 1, true))) + 1;
|
35 |
-
}
|
36 |
-
|
37 |
-
public function get_name($field_id) {
|
38 |
-
return WOOCCM_PREFIX . $field_id;
|
39 |
-
}
|
40 |
-
|
41 |
-
public function get_key($prefix = '', $name) {
|
42 |
-
return sprintf("%s_%s", $prefix, $name);
|
43 |
-
}
|
44 |
-
|
45 |
-
public function get_conditional_types() {
|
46 |
-
|
47 |
-
$fields = self::get_types();
|
48 |
-
|
49 |
-
unset($fields['heading']);
|
50 |
-
unset($fields['button']);
|
51 |
-
|
52 |
-
return array_keys($fields);
|
53 |
-
}
|
54 |
-
|
55 |
-
public function get_multiple_types() {
|
56 |
-
|
57 |
-
return array(
|
58 |
-
'multicheckbox',
|
59 |
-
'multiselect',
|
60 |
-
'wooccmselect',
|
61 |
-
'select',
|
62 |
-
'radio'
|
63 |
-
);
|
64 |
-
}
|
65 |
-
|
66 |
-
public function get_template_types() {
|
67 |
-
|
68 |
-
return array(
|
69 |
-
'heading',
|
70 |
-
'button',
|
71 |
-
'message',
|
72 |
-
'file',
|
73 |
-
'country',
|
74 |
-
'state'
|
75 |
-
);
|
76 |
-
}
|
77 |
-
|
78 |
-
public function get_types() {
|
79 |
-
|
80 |
-
return apply_filters('wooccm_fields_fields_types', array(
|
81 |
-
'heading' => __('Heading', 'woocommerce-checkout-manager'),
|
82 |
-
'text' => __('Text', 'woocommerce-checkout-manager'),
|
83 |
-
'textarea' => __('Textarea', 'woocommerce-checkout-manager'),
|
84 |
-
'password' => __('Password', 'woocommerce-checkout-manager'),
|
85 |
-
'select' => __('Select', 'woocommerce-checkout-manager'),
|
86 |
-
'radio' => __('Radio', 'woocommerce-checkout-manager'),
|
87 |
-
'checkbox' => __('Checkbox', 'woocommerce-checkout-manager'),
|
88 |
-
'country' => __('Country', 'woocommerce-checkout-manager'),
|
89 |
-
'state' => __('State', 'woocommerce-checkout-manager'),
|
90 |
-
'multiselect' => __('Multiselect', 'woocommerce-checkout-manager'),
|
91 |
-
'multicheckbox' => __('Multicheckbox', 'woocommerce-checkout-manager'),
|
92 |
-
'colorpicker' => __('Colorpicker', 'woocommerce-checkout-manager'),
|
93 |
-
'file' => __('File', 'woocommerce-checkout-manager'),
|
94 |
-
//'button' => __('Button', 'woocommerce-checkout-manager'),
|
95 |
-
//'datepicker' => __('Datepicker', 'woocommerce-checkout-manager'),
|
96 |
-
//'timepicker' => __('Timepicker', 'woocommerce-checkout-manager'),
|
97 |
-
));
|
98 |
-
}
|
99 |
-
|
100 |
-
function get_args() {
|
101 |
-
|
102 |
-
return array(
|
103 |
-
'id' => null,
|
104 |
-
'key' => '',
|
105 |
-
'name' => '',
|
106 |
-
'type' => 'text',
|
107 |
-
'disabled' => false,
|
108 |
-
'order' => null,
|
109 |
-
'priority' => null,
|
110 |
-
'label' => '',
|
111 |
-
'placeholder' => '',
|
112 |
-
'default' => '',
|
113 |
-
'position' => 'form-row-wide',
|
114 |
-
'clear' => false,
|
115 |
-
'options' => '',
|
116 |
-
'required' => false,
|
117 |
-
'class' => array(),
|
118 |
-
// Display
|
119 |
-
// -------------------------------------------------------------------
|
120 |
-
'show_role' => array(),
|
121 |
-
'hide_role' => array(),
|
122 |
-
'more_product' => false,
|
123 |
-
'show_product' => array(),
|
124 |
-
'hide_product' => array(),
|
125 |
-
'show_product_cat' => array(),
|
126 |
-
'hide_product_cat' => array(),
|
127 |
-
// Timing
|
128 |
-
// -------------------------------------------------------------------
|
129 |
-
'time_limit_start' => null,
|
130 |
-
'time_limit_end' => null,
|
131 |
-
'time_limit_interval' => null,
|
132 |
-
'date_limit' => 'fixed',
|
133 |
-
'date_limit_variable_min' => 1,
|
134 |
-
'date_limit_variable_max' => 1,
|
135 |
-
'date_limit_fixed_min' => date('Y-m-d'),
|
136 |
-
'date_limit_fixed_max' => date('Y-m-d'),
|
137 |
-
// Amount
|
138 |
-
// -------------------------------------------------------------------
|
139 |
-
'add_amount' => false,
|
140 |
-
'add_amount_name' => '',
|
141 |
-
'add_amount_total' => null,
|
142 |
-
'add_amount_type' => '',
|
143 |
-
'add_amount_tax' => false,
|
144 |
-
'extra_class' => '',
|
145 |
-
// Conditional
|
146 |
-
// -------------------------------------------------------------------
|
147 |
-
'conditional' => false,
|
148 |
-
'conditional_parent_name' => '',
|
149 |
-
'conditional_parent_value' => '',
|
150 |
-
// State
|
151 |
-
// -------------------------------------------------------------------
|
152 |
-
'country' => '',
|
153 |
-
// Upload
|
154 |
-
// -------------------------------------------------------------------
|
155 |
-
'file_limit' => 1,
|
156 |
-
'file_types' => array(),
|
157 |
-
// Listing
|
158 |
-
// -------------------------------------------------------------------
|
159 |
-
'listable' => false,
|
160 |
-
'sortable' => false,
|
161 |
-
'filterable' => false,
|
162 |
-
);
|
163 |
-
}
|
164 |
-
|
165 |
-
public function sanitize_field_data($field_data) {
|
166 |
-
|
167 |
-
$args = $this->get_args();
|
168 |
-
|
169 |
-
foreach ($field_data as $key => $value) {
|
170 |
-
|
171 |
-
if (array_key_exists($key, $args)) {
|
172 |
-
|
173 |
-
$type = $args[$key];
|
174 |
-
|
175 |
-
if (is_null($type) && !is_numeric($value)) {
|
176 |
-
$field_data[$key] = (int) $value;
|
177 |
-
} elseif (is_bool($type) && !is_bool($value)) {
|
178 |
-
$field_data[$key] = ($value === 'true' || $value === '1' || $value === 1);
|
179 |
-
} elseif (is_string($type) && !is_string($value)) {
|
180 |
-
$field_data[$key] = strval($value);
|
181 |
-
} elseif (is_array($type) && !is_array($value)) {
|
182 |
-
$field_data[$key] = (array) $type;
|
183 |
-
}
|
184 |
-
} else {
|
185 |
-
unset($field_data[$key]);
|
186 |
-
}
|
187 |
-
}
|
188 |
-
|
189 |
-
return $field_data;
|
190 |
-
}
|
191 |
-
|
192 |
-
public function get_default_fields() {
|
193 |
-
|
194 |
-
$fields = array();
|
195 |
-
|
196 |
-
if ($this->prefix) {
|
197 |
-
|
198 |
-
$prefix = sprintf('%s_', $this->prefix);
|
199 |
-
|
200 |
-
$filters = WOOCCM_Fields_Register::instance();
|
201 |
-
|
202 |
-
//fix nesting level
|
203 |
-
remove_filter('woocommerce_' . $prefix . 'fields', array($filters, 'add_checkout_' . $prefix . 'fields'));
|
204 |
-
|
205 |
-
foreach (WC()->countries->get_address_fields('', $prefix) as $key => $field) {
|
206 |
-
|
207 |
-
$field['name'] = str_replace($prefix, '', $key);
|
208 |
-
|
209 |
-
$fields[] = $field;
|
210 |
-
}
|
211 |
-
}
|
212 |
-
|
213 |
-
//error_log(json_encode($fields));
|
214 |
-
|
215 |
-
return $fields;
|
216 |
-
}
|
217 |
-
|
218 |
-
public function get_defaults() {
|
219 |
-
return $this->defaults;
|
220 |
-
}
|
221 |
-
|
222 |
-
public function delete_fields() {
|
223 |
-
|
224 |
-
delete_option($this->option_name);
|
225 |
-
|
226 |
-
return false;
|
227 |
-
}
|
228 |
-
|
229 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
new/view/backend/pages/modals/parts/edit-info.php
DELETED
@@ -1,45 +0,0 @@
|
|
1 |
-
<span class="settings-save-status">
|
2 |
-
<span class="spinner"></span>
|
3 |
-
<span class="saved"><?php esc_html_e('Saved.'); ?></span>
|
4 |
-
</span>
|
5 |
-
|
6 |
-
<div class="details">
|
7 |
-
<div class="filename"><strong><?php esc_html_e('Field id', 'woocommerce-checkout-manager'); ?>:</strong> {{data.id}}</div>
|
8 |
-
<div class="filename"><strong><?php esc_html_e('Field name', 'woocommerce-checkout-manager'); ?>:</strong> {{data.name}}</div>
|
9 |
-
<!--
|
10 |
-
<div class="filename"><strong><?php esc_html_e('Field type', 'woocommerce-checkout-manager'); ?>:</strong> {{data.type}}</div>
|
11 |
-
-->
|
12 |
-
<div class="filename"><strong><?php esc_html_e('Field key', 'woocommerce-checkout-manager'); ?>:</strong> #{{data.key}}</div>
|
13 |
-
</div>
|
14 |
-
|
15 |
-
<div class="settings">
|
16 |
-
<label class="setting" data-setting="label">
|
17 |
-
<span class="name"><?php esc_html_e('Conditional', 'woocommerce-checkout-manager'); ?></span>
|
18 |
-
<input <# if (data.conditional) { #>checked<# } #> type="checkbox" name="conditional" value="1">
|
19 |
-
</label>
|
20 |
-
<p class="description"><?php esc_html_e('Activate conditional field requirement.', 'woocommerce-checkout-manager'); ?></p>
|
21 |
-
<label class="setting" data-setting="label">
|
22 |
-
<span class="name"><?php esc_html_e('Conditional parent', 'woocommerce-checkout-manager'); ?></span>
|
23 |
-
<select class="select short" name="conditional_parent_name">
|
24 |
-
<?php foreach ($fields as $key => $field) : ?>
|
25 |
-
<?php if (in_array($field['type'], $conditionals)): ?>
|
26 |
-
<# if ( data.id != '<?php echo esc_attr($field['id']); ?>' ) { #>
|
27 |
-
<option <# if ( data.conditional_parent_name == '<?php echo esc_attr($field['name']); ?>' ) { #>selected="selected"<# } #> value="<?php echo esc_attr($field['name']); ?>"><?php echo esc_html($field['label']); ?></option>
|
28 |
-
<# } #>
|
29 |
-
<?php endif; ?>
|
30 |
-
<?php endforeach; ?>
|
31 |
-
</select>
|
32 |
-
</label>
|
33 |
-
<p class="description"><?php esc_html_e('Select conditional parent field.', 'woocommerce-checkout-manager'); ?></p>
|
34 |
-
<label class="setting" data-setting="label">
|
35 |
-
<span class="name"><?php esc_html_e('Coditional value', 'woocommerce-checkout-manager'); ?></span>
|
36 |
-
<input type="text" name="conditional_parent_value" placeholder="<?php esc_html_e('Yes'); ?>" value="{{data.conditional_parent_value}}">
|
37 |
-
</label>
|
38 |
-
<p class="description"><?php esc_html_e('Show field if parent has this value.', 'woocommerce-checkout-manager'); ?></p>
|
39 |
-
</div>
|
40 |
-
|
41 |
-
<div class="actions">
|
42 |
-
<a target="_blank" class="view-attachment" href="<?php echo wc_get_page_permalink('checkout'); ?>"><?php esc_html_e('View checkout page', 'woocommerce-checkout-manager'); ?></a> |
|
43 |
-
<a target="_blank" href="<?php echo WOOCCM_PURCHASE_URL; ?>"><?php esc_html_e('Get premium version', 'woocommerce-checkout-manager'); ?></a> |
|
44 |
-
<a target="_blank" href="<?php echo WOOCCM_DOCUMENTATION_URL; ?>"><?php esc_html_e('View documentation', 'woocommerce-checkout-manager'); ?></a>
|
45 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
new/view/backend/pages/modals/parts/edit-info_1.php
DELETED
@@ -1,77 +0,0 @@
|
|
1 |
-
<span class="settings-save-status">
|
2 |
-
<span class="spinner"></span>
|
3 |
-
<span class="saved"><?php esc_html_e('Saved.'); ?></span>
|
4 |
-
</span>
|
5 |
-
|
6 |
-
<div class="details">
|
7 |
-
<div class="filename"><strong><?php esc_html_e('Field id', 'woocommerce-checkout-manager'); ?>:</strong> {{data.id}}</div>
|
8 |
-
|
9 |
-
<div class="filename"><strong><?php esc_html_e('Field name', 'woocommerce-checkout-manager'); ?>:</strong> {{data.name}}</div>
|
10 |
-
|
11 |
-
<!--
|
12 |
-
<div class="filename"><strong><?php esc_html_e('Field type', 'woocommerce-checkout-manager'); ?>:</strong> {{data.type}}</div>
|
13 |
-
-->
|
14 |
-
<div class="filename"><strong><?php esc_html_e('Field key', 'woocommerce-checkout-manager'); ?>:</strong> #{{data.key}}</div>
|
15 |
-
</div>
|
16 |
-
|
17 |
-
<div class="settings">
|
18 |
-
|
19 |
-
<label class="setting" data-setting="label">
|
20 |
-
<span class="name"><?php esc_html_e('Type', 'woocommerce-checkout-manager'); ?></span>
|
21 |
-
<# if ( _.contains(<?php echo json_encode($defaults); ?>, data.name)) { #>
|
22 |
-
<input type="text" name="type" value="{{data.type}}" disabled="disabled">
|
23 |
-
<# } else { #>
|
24 |
-
<select class="media-modal-change" 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"<# } #> value="<?php echo esc_attr($type); ?>"><?php echo esc_html($name); ?></option>
|
28 |
-
<?php endforeach; ?>
|
29 |
-
<?php endif; ?>
|
30 |
-
</select>
|
31 |
-
<# } #>
|
32 |
-
</label>
|
33 |
-
<# if ( _.contains(<?php echo json_encode($defaults); ?>, data.name)) { #>
|
34 |
-
<p class="description"><?php esc_html_e('You can\'t change the type of default fields.', 'woocommerce-checkout-manager'); ?></p>
|
35 |
-
<# } else { #>
|
36 |
-
<p class="description"><?php esc_html_e('Type of the checkout field', 'woocommerce-checkout-manager'); ?></p>
|
37 |
-
<# } #>
|
38 |
-
|
39 |
-
<label class="setting" data-setting="label">
|
40 |
-
<span class="name"><?php esc_html_e('Label', 'woocommerce-checkout-manager'); ?></span>
|
41 |
-
<input type="text" name="label" placeholder="<?php esc_html_e('My Field Name', 'woocommerce-checkout-manager'); ?>" value="{{data.label}}">
|
42 |
-
</label>
|
43 |
-
<p class="description"><?php esc_html_e('Label text for the checkout field.', 'woocommerce-checkout-manager'); ?></p>
|
44 |
-
|
45 |
-
<label class="setting" data-setting="placeholder">
|
46 |
-
<span class="name"><?php esc_html_e('Placeholder', 'woocommerce-checkout-manager'); ?></span>
|
47 |
-
<input type="text" name="placeholder" placeholder="<?php esc_html_e('Example red', 'woocommerce-checkout-manager'); ?>" value="{{data.placeholder}}">
|
48 |
-
</label>
|
49 |
-
<p class="description"><?php esc_html_e('Placeholder text for the checkout field.', 'woocommerce-checkout-manager'); ?></p>
|
50 |
-
|
51 |
-
<label class="setting" data-setting="extra_class">
|
52 |
-
<span class="name"><?php esc_html_e('Extra class', 'woocommerce-checkout-manager'); ?></span>
|
53 |
-
<input class="short" type="text" name="extra_class" value="{{data.extra_class}}">
|
54 |
-
</label>
|
55 |
-
</div>
|
56 |
-
|
57 |
-
<div class="settings">
|
58 |
-
<label class="setting" data-setting="default">
|
59 |
-
<span class="name"><?php esc_html_e('Default', 'woocommerce-checkout-manager'); ?></span>
|
60 |
-
<input type="text" name="default" placeholder="<?php esc_html_e('Enter a default value (optional)', 'woocommerce-checkout-manager'); ?>" value="{{data.default}}">
|
61 |
-
</label>
|
62 |
-
</div>
|
63 |
-
|
64 |
-
<# if ( _.contains(<?php echo json_encode($multiple); ?>, data.type)) { #>
|
65 |
-
<div class="settings">
|
66 |
-
<label class="setting" data-setting="options">
|
67 |
-
<span class="name"><?php esc_html_e('Options', 'woocommerce-checkout-manager'); ?></span>
|
68 |
-
<input type="text" name="options" placeholder="Option 1||Option 2||Option 3" value="{{data.options}}">
|
69 |
-
</label>
|
70 |
-
</div>
|
71 |
-
<# } #>
|
72 |
-
|
73 |
-
<div class="actions">
|
74 |
-
<a target="_blank" class="view-attachment" href="<?php echo wc_get_page_permalink('checkout'); ?>"><?php esc_html_e('View checkout page', 'woocommerce-checkout-manager'); ?></a> |
|
75 |
-
<a target="_blank" href="<?php echo WOOCCM_PURCHASE_URL; ?>"><?php esc_html_e('Get premium version', 'woocommerce-checkout-manager'); ?></a> |
|
76 |
-
<a target="_blank" href="<?php echo WOOCCM_DOCUMENTATION_URL; ?>"><?php esc_html_e('View documentation', 'woocommerce-checkout-manager'); ?></a>
|
77 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
new/view/backend/pages/modals/parts/edit-tabs.php
DELETED
@@ -1,30 +0,0 @@
|
|
1 |
-
<ul class="product_data_tabs wc-tabs">
|
2 |
-
<li class="general_options active">
|
3 |
-
<a href="#tab_field_general"><span><?php esc_html_e('General', 'woocommerce-checkout-manager'); ?></span></a>
|
4 |
-
</li>
|
5 |
-
<!--<li class="conditional_options">
|
6 |
-
<a href="#tab_field_conditional"><span><?php esc_html_e('Conditional', 'woocommerce-checkout-manager'); ?></span></a>
|
7 |
-
</li>
|
8 |
-
<li class="amount_options">
|
9 |
-
<a href="#tab_field_amount"><span><?php esc_html_e('Amount', 'woocommerce-checkout-manager'); ?></span></a>
|
10 |
-
</li>-->
|
11 |
-
<li class="display_options">
|
12 |
-
<a href="#tab_field_display"><span><?php esc_html_e('Display', 'woocommerce-checkout-manager'); ?></span></a>
|
13 |
-
</li>
|
14 |
-
<!--<# if (data.type == 'datepicker') { #>
|
15 |
-
<li class="datepicker_options">
|
16 |
-
<a href="#tab_field_datepicker"><span><?php esc_html_e('Datepicker', 'woocommerce-checkout-manager'); ?></span></a>
|
17 |
-
</li>
|
18 |
-
<# } #>
|
19 |
-
<# if (data.type == 'timepicker') { #>
|
20 |
-
<li class="timepicker_options">
|
21 |
-
<a href="#tab_field_timepicker"><span><?php esc_html_e('Timepicker', 'woocommerce-checkout-manager'); ?></span></a>
|
22 |
-
</li>
|
23 |
-
<# } #>
|
24 |
-
<li class="advanced_advanced">
|
25 |
-
<a href="#tab_field_advanced"><span><?php esc_html_e('Advanced', 'woocommerce-checkout-manager'); ?></span></a>
|
26 |
-
</li>
|
27 |
-
<li class="suggestions_options">
|
28 |
-
<a href="#tab_field_suggestions"><span><?php esc_html_e('Suggestions', 'woocommerce-checkout-manager'); ?></span></a>
|
29 |
-
</li>-->
|
30 |
-
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
new/view/backend/pages/modals/parts/panel-amount.php
DELETED
@@ -1,38 +0,0 @@
|
|
1 |
-
<div id="tab_field_amount" class="panel woocommerce_options_panel hidden" style="display: none;">
|
2 |
-
|
3 |
-
<div class="options_group">
|
4 |
-
<p class="form-field">
|
5 |
-
<label><?php esc_html_e('Add Amount', 'woocommerce-checkout-manager'); ?></label>
|
6 |
-
<input <# if ( data.add_amount ) { #>checked<# } #> type="checkbox" name="add_amount" value="1">
|
7 |
-
</p>
|
8 |
-
<p class="form-field">
|
9 |
-
<label><?php esc_html_e('Amount Name', 'woocommerce-checkout-manager'); ?></label>
|
10 |
-
<input class="short" name="add_amount_name" type="text" value="{{data.add_amount_name}}" placeholder="<?php esc_html_e('My Custom Charge', 'woocommerce-checkout-manager'); ?>">
|
11 |
-
</p>
|
12 |
-
<p class="form-field">
|
13 |
-
<label><?php esc_html_e('Amount Total', 'woocommerce-checkout-manager'); ?></label>
|
14 |
-
<input class="short" name="add_amount_total" type="text" value="{{data.add_amount_total}}" placeholder="50">
|
15 |
-
<select style="margin:0 0 0 10px;line-height: 30px; height: 30px;" class="select" name="add_amount_type">
|
16 |
-
<option value="fixed" selected="selected">$</option>
|
17 |
-
<option value="percent">%</option>
|
18 |
-
</select>
|
19 |
-
</p>
|
20 |
-
</div>
|
21 |
-
|
22 |
-
<div class="options_group">
|
23 |
-
<p class="form-field">
|
24 |
-
<label><?php esc_html_e('Amount Tax', 'woocommerce-checkout-manager'); ?></label>
|
25 |
-
<input <# if ( data.add_amount_tax ) { #>checked<# } #> type="checkbox" name="add_amount_tax" value="1">
|
26 |
-
</p>
|
27 |
-
<p class="form-field">
|
28 |
-
<label><?php esc_html_e('Deny Checkout', 'woocommerce-checkout-manager'); ?></label>
|
29 |
-
<input <# if ( data.deny_checkout ) { #>checked<# } #> type="checkbox" name="deny_checkout" value="1">
|
30 |
-
</p>
|
31 |
-
<p class="form-field">
|
32 |
-
<label><?php esc_html_e('Deny Receipt', 'woocommerce-checkout-manager'); ?></label>
|
33 |
-
<input <# if ( data.deny_receipt ) { #>checked<# } #> type="checkbox" name="deny_receipt" value="1">
|
34 |
-
</p>
|
35 |
-
|
36 |
-
</div>
|
37 |
-
|
38 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
new/view/backend/pages/modals/parts/panel-conditional.php
DELETED
@@ -1,24 +0,0 @@
|
|
1 |
-
<div id="tab_field_conditional" class="panel woocommerce_options_panel hidden" style="display: none;">
|
2 |
-
<div class="options_group">
|
3 |
-
<p class="form-field">
|
4 |
-
<label><?php esc_html_e('Conditional', 'woocommerce-checkout-manager'); ?></label>
|
5 |
-
<input <# if (data.conditional) { #>checked<# } #> type="checkbox" name="conditional" value="1">
|
6 |
-
</p>
|
7 |
-
<p class="form-field">
|
8 |
-
<label><?php esc_html_e('Parent', 'woocommerce-checkout-manager'); ?></label>
|
9 |
-
<select class="select short" name="conditional_parent_name">
|
10 |
-
<?php foreach ($fields as $key => $field) : ?>
|
11 |
-
<?php if (in_array($field['type'], $conditionals)): ?>
|
12 |
-
<# if ( data.id != '<?php echo esc_attr($field['id']); ?>' ) { #>
|
13 |
-
<option <# if ( data.conditional_parent_name == '<?php echo esc_attr($field['name']); ?>' ) { #>selected="selected"<# } #> value="<?php echo esc_attr($field['name']); ?>"><?php echo esc_html($field['label']); ?></option>
|
14 |
-
<# } #>
|
15 |
-
<?php endif; ?>
|
16 |
-
<?php endforeach; ?>
|
17 |
-
</select>
|
18 |
-
</p>
|
19 |
-
<p class="form-field">
|
20 |
-
<label><?php esc_html_e('Value', 'woocommerce-checkout-manager'); ?></label>
|
21 |
-
<input class="short" type="text" name="conditional_parent_value" placeholder="<?php esc_html_e('Yes'); ?>" value="{{data.conditional_parent_value}}">
|
22 |
-
</p>
|
23 |
-
</div>
|
24 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
new/view/frontend/class-wooccm-fields-additional.php
DELETED
@@ -1,135 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
if (!class_exists('WOOCCM_Fields_Additional')) {
|
3 |
-
|
4 |
-
class WOOCCM_Fields_Additional extends WOOCCM_Fields_Register {
|
5 |
-
|
6 |
-
protected static $instance;
|
7 |
-
|
8 |
-
function add_checkout_require_notice($fields) {
|
9 |
-
|
10 |
-
if ($fields = WOOCCM()->field->additional->get_fields('old')) {
|
11 |
-
|
12 |
-
foreach ($fields as $field_id => $field) {
|
13 |
-
|
14 |
-
if (!empty($field['cow']) /* && empty($field['deny_checkout']) */) {
|
15 |
-
|
16 |
-
//$key = sprintf("%s_%s", $prefix, $field['cow']);
|
17 |
-
|
18 |
-
$field = $this->add_checkout_field_filter($fields, $field, 'additional');
|
19 |
-
|
20 |
-
if (!empty($field['required']) && !empty($field['cow']) /* && empty($field['deny_checkout']) */ && empty($field['disabled'])) {
|
21 |
-
|
22 |
-
if (empty($_POST[$field['cow']])) {
|
23 |
-
$message = sprintf(__('%s is a required field.', 'woocommerce-checkout-manager'), '<strong>' . wooccm_wpml_string($field['label']) . '</strong>');
|
24 |
-
wc_add_notice($message, 'error');
|
25 |
-
}
|
26 |
-
}
|
27 |
-
}
|
28 |
-
}
|
29 |
-
}
|
30 |
-
}
|
31 |
-
|
32 |
-
function add_order_meta($order_id = 0) {
|
33 |
-
|
34 |
-
$fields = WOOCCM()->field->additional->get_fields('old');
|
35 |
-
|
36 |
-
if (count($fields)) {
|
37 |
-
|
38 |
-
foreach ($fields as $id => $field) {
|
39 |
-
|
40 |
-
$key = $name = $field['cow'];
|
41 |
-
|
42 |
-
if (!empty($_POST[$key])) {
|
43 |
-
|
44 |
-
$value = $_POST[$key];
|
45 |
-
|
46 |
-
if ($field['type'] == 'wooccmtextarea') {
|
47 |
-
update_post_meta($order_id, $name, wp_kses($value, false));
|
48 |
-
} else if (is_array($value)) {
|
49 |
-
update_post_meta($order_id, $name, maybe_serialize(array_map('sanitize_text_field', $value)));
|
50 |
-
} else {
|
51 |
-
update_post_meta($order_id, $name, sanitize_text_field($value));
|
52 |
-
}
|
53 |
-
}
|
54 |
-
}
|
55 |
-
}
|
56 |
-
}
|
57 |
-
|
58 |
-
function add_checkout_additional_fields($checkout) {
|
59 |
-
?>
|
60 |
-
<div class="wooccm-clearfix"></div>
|
61 |
-
<div class="wooccm-additional-fields">
|
62 |
-
<?php
|
63 |
-
if ($custom_fields = apply_filters('wooccm_additional_fields', WOOCCM()->field->additional->get_fields('old'))) {
|
64 |
-
|
65 |
-
foreach ($custom_fields as $field_id => $custom_field) {
|
66 |
-
|
67 |
-
if (!empty($custom_field['cow']) /* && empty($field['deny_checkout']) */ && empty($custom_field['disabled'])) {
|
68 |
-
|
69 |
-
woocommerce_form_field($custom_field['cow'], $custom_field, $checkout->get_value($custom_field['cow']));
|
70 |
-
}
|
71 |
-
}
|
72 |
-
}
|
73 |
-
?>
|
74 |
-
</div>
|
75 |
-
<?php
|
76 |
-
}
|
77 |
-
|
78 |
-
function position($position = 'after_order_notes') {
|
79 |
-
|
80 |
-
$options = get_option('wccs_settings');
|
81 |
-
|
82 |
-
if (!empty($options['checkness']['position'])) {
|
83 |
-
return sanitize_text_field($options['checkness']['position']);
|
84 |
-
}
|
85 |
-
}
|
86 |
-
|
87 |
-
function init() {
|
88 |
-
add_action('woocommerce_checkout_process', array($this, 'add_checkout_require_notice'));
|
89 |
-
add_action('woocommerce_checkout_update_order_meta', array($this, 'add_order_meta'));
|
90 |
-
|
91 |
-
// Additional fields
|
92 |
-
// -----------------------------------------------------------------------
|
93 |
-
switch (get_option('wooccm_additional_position', 'after_order_notes')) {
|
94 |
-
case 'before_shipping_form':
|
95 |
-
add_action('woocommerce_before_checkout_shipping_form', array($this, 'add_checkout_additional_fields'));
|
96 |
-
break;
|
97 |
-
|
98 |
-
case 'after_shipping_form':
|
99 |
-
add_action('woocommerce_after_checkout_shipping_form', array($this, 'add_checkout_additional_fields'));
|
100 |
-
break;
|
101 |
-
|
102 |
-
case 'before_billing_form':
|
103 |
-
add_action('woocommerce_before_checkout_billing_form', array($this, 'add_checkout_additional_fields'));
|
104 |
-
break;
|
105 |
-
|
106 |
-
case 'after_billing_form':
|
107 |
-
add_action('woocommerce_after_checkout_billing_form', array($this, 'add_checkout_additional_fields'));
|
108 |
-
break;
|
109 |
-
|
110 |
-
case 'before_order_notes':
|
111 |
-
add_action('woocommerce_before_order_notes', array($this, 'add_checkout_additional_fields'));
|
112 |
-
break;
|
113 |
-
|
114 |
-
case 'after_order_notes':
|
115 |
-
add_action('woocommerce_after_order_notes', array($this, 'add_checkout_additional_fields'));
|
116 |
-
break;
|
117 |
-
}
|
118 |
-
// Compatibility
|
119 |
-
// -----------------------------------------------------------------------
|
120 |
-
|
121 |
-
add_filter('default_option_wooccm_additional_position', array($this, 'position'));
|
122 |
-
}
|
123 |
-
|
124 |
-
public static function instance() {
|
125 |
-
if (!isset(self::$instance)) {
|
126 |
-
self::$instance = new self();
|
127 |
-
self::$instance->init();
|
128 |
-
}
|
129 |
-
return self::$instance;
|
130 |
-
}
|
131 |
-
|
132 |
-
}
|
133 |
-
|
134 |
-
WOOCCM_Fields_Additional::instance();
|
135 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
new/view/frontend/class-wooccm-fields-conditional.php
DELETED
@@ -1,59 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
if (!class_exists('WOOCCM_Fields_Conditional')) {
|
4 |
-
|
5 |
-
class WOOCCM_Fields_Conditional {
|
6 |
-
|
7 |
-
protected static $instance;
|
8 |
-
protected static $i = 0;
|
9 |
-
|
10 |
-
function remove_required($fields) {
|
11 |
-
|
12 |
-
if (array_key_exists('woocommerce-process-checkout-nonce', $_REQUEST)) {
|
13 |
-
|
14 |
-
foreach ($fields as $key => $type) {
|
15 |
-
|
16 |
-
foreach ($type as $field_id => $field) {
|
17 |
-
|
18 |
-
// Remove required
|
19 |
-
// -------------------------------------------------------------------
|
20 |
-
if (!empty($field['conditional_parent_use']) && !empty($field['conditional_tie']) && !empty($field['chosen_valt']) && ($field['conditional_tie'] != $field['cow'])) {
|
21 |
-
if (empty($_POST[$field['conditional_tie']]) || $_POST[$field['conditional_tie']] != $field['chosen_valt']) {
|
22 |
-
$field['required'] = false;
|
23 |
-
unset($fields[$key][$field_id]);
|
24 |
-
}
|
25 |
-
}
|
26 |
-
}
|
27 |
-
}
|
28 |
-
}
|
29 |
-
|
30 |
-
return $fields;
|
31 |
-
}
|
32 |
-
|
33 |
-
function add_field_attributes($field, $key) {
|
34 |
-
if (!empty($field['conditional_parent_use']) && !empty($field['conditional_tie']) && !empty($field['chosen_valt']) && ($field['conditional_tie'] != $field['cow'])) {
|
35 |
-
$field['class'][] = 'wooccm-conditional-child';
|
36 |
-
$field['custom_attributes']['data-conditional-parent'] = $field['conditional_tie'];
|
37 |
-
$field['custom_attributes']['data-conditional-parent-value'] = $field['chosen_valt'];
|
38 |
-
}
|
39 |
-
return $field;
|
40 |
-
}
|
41 |
-
|
42 |
-
function init() {
|
43 |
-
// Add field attributes
|
44 |
-
add_filter('wooccm_checkout_field_filter', array($this, 'add_field_attributes'), 10, 2);
|
45 |
-
add_action('woocommerce_checkout_fields', array($this, 'remove_required'));
|
46 |
-
}
|
47 |
-
|
48 |
-
public static function instance() {
|
49 |
-
if (!isset(self::$instance)) {
|
50 |
-
self::$instance = new self();
|
51 |
-
self::$instance->init();
|
52 |
-
}
|
53 |
-
return self::$instance;
|
54 |
-
}
|
55 |
-
|
56 |
-
}
|
57 |
-
|
58 |
-
WOOCCM_Fields_Conditional::instance();
|
59 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
new/view/frontend/class-wooccm-fields-display.php
DELETED
@@ -1,197 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
if (!class_exists('WOOCCM_Fields_Display')) {
|
4 |
-
|
5 |
-
class WOOCCM_Fields_Display {
|
6 |
-
|
7 |
-
protected static $instance;
|
8 |
-
|
9 |
-
function disable_by_role($field, $key) {
|
10 |
-
|
11 |
-
global $current_user;
|
12 |
-
|
13 |
-
$user_roles = (array) $current_user->roles;
|
14 |
-
|
15 |
-
if (!empty($field['role_option2'])) {
|
16 |
-
|
17 |
-
$rolekeys2 = explode('||', $field['role_option2']);
|
18 |
-
|
19 |
-
if (array_intersect($user_roles, $rolekeys2)) {
|
20 |
-
$field['disabled'] = true;
|
21 |
-
} else {
|
22 |
-
$field['disabled'] = false;
|
23 |
-
}
|
24 |
-
}
|
25 |
-
|
26 |
-
if (!empty($field['role_option'])) {
|
27 |
-
|
28 |
-
$rolekeys = explode('||', $field['role_option']);
|
29 |
-
|
30 |
-
if (!array_intersect($user_roles, $rolekeys)) {
|
31 |
-
$field['disabled'] = true;
|
32 |
-
} else {
|
33 |
-
$field['disabled'] = false;
|
34 |
-
}
|
35 |
-
}
|
36 |
-
|
37 |
-
return $field;
|
38 |
-
}
|
39 |
-
|
40 |
-
function disable_by_category($field, $key) {
|
41 |
-
|
42 |
-
if (empty($field['disabled']) && (!empty($field['single_p_cat']) || !empty($field['single_px_cat']))) {
|
43 |
-
|
44 |
-
if (count($cart_contents = WC()->cart->get_cart_contents())) {
|
45 |
-
|
46 |
-
$hide_cats_array = (array) explode(',', @$field['single_p_cat']);
|
47 |
-
|
48 |
-
$show_cats_array = (array) explode('||', @$field['single_px_cat']);
|
49 |
-
|
50 |
-
$product_cats = array();
|
51 |
-
|
52 |
-
foreach ($cart_contents as $key => $values) {
|
53 |
-
if ($cats = wp_get_post_terms($values['product_id'], 'product_cat', array('orderby' => 'name', 'order' => 'ASC', 'fields' => 'slugs'))) {
|
54 |
-
$product_cats += $cats;
|
55 |
-
}
|
56 |
-
}
|
57 |
-
|
58 |
-
// field without more
|
59 |
-
// -------------------------------------------------------------------
|
60 |
-
if (empty($field['more_content']) && count($cart_contents) < 2) {
|
61 |
-
// hide field
|
62 |
-
// -----------------------------------------------------------------
|
63 |
-
if (!empty($field['single_p_cat'])) {
|
64 |
-
if (array_intersect($product_cats, $hide_cats_array)) {
|
65 |
-
$field['disabled'] = true;
|
66 |
-
}
|
67 |
-
}
|
68 |
-
|
69 |
-
// show field
|
70 |
-
// -----------------------------------------------------------------
|
71 |
-
if (!empty($field['single_px_cat'])) {
|
72 |
-
if (!array_intersect($product_cats, $show_cats_array)) {
|
73 |
-
$field['disabled'] = true;
|
74 |
-
} else {
|
75 |
-
$field['disabled'] = false;
|
76 |
-
}
|
77 |
-
}
|
78 |
-
}
|
79 |
-
|
80 |
-
// field with more
|
81 |
-
// -------------------------------------------------------------------
|
82 |
-
if (!empty($field['more_content'])) {
|
83 |
-
|
84 |
-
// hide field
|
85 |
-
// -------------------------------------------------------------
|
86 |
-
if (!empty($field['single_p_cat'])) {
|
87 |
-
if (array_intersect($product_cats, $hide_cats_array)) {
|
88 |
-
$field['disabled'] = true;
|
89 |
-
}
|
90 |
-
}
|
91 |
-
|
92 |
-
// show field
|
93 |
-
// ---------------------------------------------------------------
|
94 |
-
if (!empty($field['single_px_cat'])) {
|
95 |
-
if (!array_intersect($product_cats, $show_cats_array)) {
|
96 |
-
$field['disabled'] = true;
|
97 |
-
} else {
|
98 |
-
$field['disabled'] = false;
|
99 |
-
}
|
100 |
-
}
|
101 |
-
}
|
102 |
-
}
|
103 |
-
}
|
104 |
-
|
105 |
-
return $field;
|
106 |
-
}
|
107 |
-
|
108 |
-
function disable_by_product($field, $key) {
|
109 |
-
|
110 |
-
if (empty($field['disabled']) && (!empty($field['single_p']) || !empty($field['single_px']))) {
|
111 |
-
|
112 |
-
if (count($cart_contents = WC()->cart->get_cart_contents())) {
|
113 |
-
|
114 |
-
$hide_ids_array = (array) explode(',', @$field['single_p']);
|
115 |
-
|
116 |
-
$show_ids_array = (array) explode('||', @$field['single_px']);
|
117 |
-
|
118 |
-
$product_ids = array_column($cart_contents, 'product_id');
|
119 |
-
|
120 |
-
// field without more
|
121 |
-
// -------------------------------------------------------------------
|
122 |
-
if (empty($field['more_content']) && count($cart_contents) < 2) {
|
123 |
-
// hide field
|
124 |
-
// -----------------------------------------------------------------
|
125 |
-
if (!empty($field['single_p'])) {
|
126 |
-
if (array_intersect($product_ids, $hide_ids_array)) {
|
127 |
-
//error_log('more_content:empty, hide on, hidden');
|
128 |
-
$field['disabled'] = true;
|
129 |
-
}
|
130 |
-
}
|
131 |
-
|
132 |
-
// show field
|
133 |
-
// -----------------------------------------------------------------
|
134 |
-
if (!empty($field['single_px'])) {
|
135 |
-
if (!array_intersect($product_ids, $show_ids_array)) {
|
136 |
-
//error_log('more_content:empty, show on, hidden');
|
137 |
-
$field['disabled'] = true;
|
138 |
-
} else {
|
139 |
-
//error_log('more_content:empty, show on, show');
|
140 |
-
$field['disabled'] = false;
|
141 |
-
}
|
142 |
-
}
|
143 |
-
}
|
144 |
-
|
145 |
-
// field with more
|
146 |
-
// -------------------------------------------------------------------
|
147 |
-
if (!empty($field['more_content'])) {
|
148 |
-
|
149 |
-
// hide field
|
150 |
-
// -------------------------------------------------------------
|
151 |
-
if (!empty($field['single_p'])) {
|
152 |
-
if (array_intersect($product_ids, $hide_ids_array)) {
|
153 |
-
//error_log('more_content:true, hide on, hidden');
|
154 |
-
$field['disabled'] = true;
|
155 |
-
}
|
156 |
-
}
|
157 |
-
|
158 |
-
// show field
|
159 |
-
// ---------------------------------------------------------------
|
160 |
-
if (!empty($field['single_px'])) {
|
161 |
-
if (!array_intersect($product_ids, $show_ids_array)) {
|
162 |
-
//error_log('more_content:true, show on, hidden');
|
163 |
-
$field['disabled'] = true;
|
164 |
-
} else {
|
165 |
-
//error_log('more_content:true, show on, show');
|
166 |
-
$field['disabled'] = false;
|
167 |
-
}
|
168 |
-
}
|
169 |
-
}
|
170 |
-
}
|
171 |
-
}
|
172 |
-
|
173 |
-
return $field;
|
174 |
-
}
|
175 |
-
|
176 |
-
function init() {
|
177 |
-
|
178 |
-
// Remove by product
|
179 |
-
add_filter('wooccm_checkout_field_filter', array($this, 'disable_by_product'), 10, 2);
|
180 |
-
// Remove by category
|
181 |
-
add_filter('wooccm_checkout_field_filter', array($this, 'disable_by_category'), 10, 2);
|
182 |
-
// Remove by role
|
183 |
-
add_filter('wooccm_checkout_field_filter', array($this, 'disable_by_role'), 10, 2);
|
184 |
-
}
|
185 |
-
|
186 |
-
public static function instance() {
|
187 |
-
if (!isset(self::$instance)) {
|
188 |
-
self::$instance = new self();
|
189 |
-
self::$instance->init();
|
190 |
-
}
|
191 |
-
return self::$instance;
|
192 |
-
}
|
193 |
-
|
194 |
-
}
|
195 |
-
|
196 |
-
WOOCCM_Fields_Display::instance();
|
197 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
new/view/frontend/class-wooccm-fields-handler.php
DELETED
@@ -1,148 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
if (!class_exists('WOOCCM_Fields_Handler')) {
|
4 |
-
|
5 |
-
class WOOCCM_Fields_Handler {
|
6 |
-
|
7 |
-
protected static $instance;
|
8 |
-
protected static $i = 0;
|
9 |
-
|
10 |
-
function add_field_classes($field, $key) {
|
11 |
-
|
12 |
-
// Position
|
13 |
-
// -----------------------------------------------------------------------
|
14 |
-
if (!empty($field['position'])) {
|
15 |
-
$field['class'] = array_diff($field['class'], array('form-row-wide', 'form-row-first', 'form-row-last'));
|
16 |
-
$field['class'][] = $field['position'];
|
17 |
-
}
|
18 |
-
|
19 |
-
// WOOCCM
|
20 |
-
// -----------------------------------------------------------------------
|
21 |
-
|
22 |
-
$field['class'][] = 'wooccm-field';
|
23 |
-
$field['class'][] = 'wooccm-field-' . $field['cow'];
|
24 |
-
|
25 |
-
// Type
|
26 |
-
// -----------------------------------------------------------------------
|
27 |
-
if (!empty($field['type'])) {
|
28 |
-
$field['class'][] = 'wooccm-type-' . $field['type'];
|
29 |
-
}
|
30 |
-
|
31 |
-
// Color
|
32 |
-
// -----------------------------------------------------------------------
|
33 |
-
if (!empty($field['type']) && $field['type'] == 'colorpicker') {
|
34 |
-
$field['class'][] = 'wooccm-colorpicker-' . $field['colorpickertype'];
|
35 |
-
}
|
36 |
-
|
37 |
-
// Extra
|
38 |
-
// -----------------------------------------------------------------------
|
39 |
-
if (!empty($field['extra_class'])) {
|
40 |
-
$field['class'][] = $field['extra_class'];
|
41 |
-
}
|
42 |
-
|
43 |
-
// Clearfix
|
44 |
-
// -----------------------------------------------------------------------
|
45 |
-
if (!empty($field['clear_row'])) {
|
46 |
-
$field['class'][] = 'wooccm-clearfix';
|
47 |
-
}
|
48 |
-
|
49 |
-
// Required
|
50 |
-
// -----------------------------------------------------------------------
|
51 |
-
|
52 |
-
if (isset($field['required'])) {
|
53 |
-
$field['custom_attributes']['data-required'] = (int) $field['required'];
|
54 |
-
}
|
55 |
-
|
56 |
-
return $field;
|
57 |
-
}
|
58 |
-
|
59 |
-
function remove_checkout_fields($fields) {
|
60 |
-
|
61 |
-
foreach ($fields as $key => $type) {
|
62 |
-
|
63 |
-
foreach ($type as $field_id => $field) {
|
64 |
-
|
65 |
-
// Remove disabled
|
66 |
-
// -------------------------------------------------------------------
|
67 |
-
if (!empty($field['disabled'])) {
|
68 |
-
unset($fields[$key][$field_id]);
|
69 |
-
}
|
70 |
-
}
|
71 |
-
}
|
72 |
-
|
73 |
-
// Fix for required address field
|
74 |
-
if (get_option('woocommerce_ship_to_destination') == 'billing_only') {
|
75 |
-
unset($fields['shipping']);
|
76 |
-
}
|
77 |
-
|
78 |
-
return $fields;
|
79 |
-
}
|
80 |
-
|
81 |
-
//function woocommerce_checkout_address_2_field($option) {
|
82 |
-
// return 'required';
|
83 |
-
//}
|
84 |
-
|
85 |
-
function remove_fields_priority($fields) {
|
86 |
-
|
87 |
-
foreach ($fields as $key => $field) {
|
88 |
-
unset($fields[$key]['label']);
|
89 |
-
unset($fields[$key]['placeholder']);
|
90 |
-
unset($fields[$key]['priority']);
|
91 |
-
unset($fields[$key]['required']);
|
92 |
-
}
|
93 |
-
|
94 |
-
return $fields;
|
95 |
-
}
|
96 |
-
|
97 |
-
function remove_address_fields($data) {
|
98 |
-
|
99 |
-
$remove = array(
|
100 |
-
'shipping_country',
|
101 |
-
'shipping_address_1',
|
102 |
-
'shipping_city',
|
103 |
-
'shipping_state',
|
104 |
-
'shipping_postcode'
|
105 |
-
);
|
106 |
-
|
107 |
-
foreach ($remove as $key) {
|
108 |
-
if (empty($data[$key])) {
|
109 |
-
unset($data[$key]);
|
110 |
-
}
|
111 |
-
}
|
112 |
-
|
113 |
-
return $data;
|
114 |
-
}
|
115 |
-
|
116 |
-
function init() {
|
117 |
-
|
118 |
-
// Add field classes
|
119 |
-
add_filter('wooccm_checkout_field_filter', array($this, 'add_field_classes'), 10, 2);
|
120 |
-
|
121 |
-
// Remove fields
|
122 |
-
// -----------------------------------------------------------------------
|
123 |
-
add_filter('woocommerce_checkout_fields', array($this, 'remove_checkout_fields'));
|
124 |
-
|
125 |
-
// Fix address_2 field
|
126 |
-
// -----------------------------------------------------------------------
|
127 |
-
//add_filter('default_option_woocommerce_checkout_address_2_field', array($this, 'woocommerce_checkout_address_2_field'));
|
128 |
-
// Fix address fields priority
|
129 |
-
add_filter('woocommerce_get_country_locale_default', array($this, 'remove_fields_priority'));
|
130 |
-
add_filter('woocommerce_get_country_locale_base', array($this, 'remove_fields_priority'));
|
131 |
-
|
132 |
-
// Fix required country notice when shipping address is activated
|
133 |
-
// -----------------------------------------------------------------------
|
134 |
-
add_filter('woocommerce_checkout_posted_data', array($this, 'remove_address_fields'));
|
135 |
-
}
|
136 |
-
|
137 |
-
public static function instance() {
|
138 |
-
if (!isset(self::$instance)) {
|
139 |
-
self::$instance = new self();
|
140 |
-
self::$instance->init();
|
141 |
-
}
|
142 |
-
return self::$instance;
|
143 |
-
}
|
144 |
-
|
145 |
-
}
|
146 |
-
|
147 |
-
WOOCCM_Fields_Handler::instance();
|
148 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
new/view/frontend/class-wooccm-fields-register.php
DELETED
@@ -1,213 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
if (!class_exists('WOOCCM_Fields_Register')) {
|
4 |
-
|
5 |
-
class WOOCCM_Fields_Register {
|
6 |
-
|
7 |
-
protected static $instance;
|
8 |
-
|
9 |
-
function add_checkout_field_filter($fields, $custom_field, $prefix = '') {
|
10 |
-
|
11 |
-
$key = sprintf("%s_%s", $prefix, $custom_field['cow']);
|
12 |
-
|
13 |
-
$fields[$key] = wp_parse_args($custom_field, (array) @$fields[$key]);
|
14 |
-
|
15 |
-
// Conditonal
|
16 |
-
// -----------------------------------------------------------------------
|
17 |
-
if (!empty($fields[$key]['conditional_parent_use']) && !empty($fields[$key]['conditional_tie']) && !empty($fields[$key]['chosen_valt']) && ($fields[$key]['conditional_tie'] != $fields[$key]['cow'])) {
|
18 |
-
$fields[$key]['conditional_tie'] = sprintf("%s_%s", $prefix, @$fields[$key]['conditional_tie']);
|
19 |
-
}
|
20 |
-
// Class
|
21 |
-
// -----------------------------------------------------------------------
|
22 |
-
if (!is_array(@$fields[$key]['class'])) {
|
23 |
-
$fields[$key]['class'] = array();
|
24 |
-
}
|
25 |
-
|
26 |
-
// Priority
|
27 |
-
// -----------------------------------------------------------------------
|
28 |
-
if (isset($custom_field['order'])) {
|
29 |
-
$fields[$key]['priority'] = $fields[$key]['order'] * 10;
|
30 |
-
}
|
31 |
-
|
32 |
-
// Color
|
33 |
-
// -----------------------------------------------------------------------
|
34 |
-
if (isset($custom_field['colorpickerd'])) {
|
35 |
-
$fields[$key]['color'] = $fields[$key]['colorpickerd'];
|
36 |
-
}
|
37 |
-
|
38 |
-
// Options
|
39 |
-
// -----------------------------------------------------------------------
|
40 |
-
if (!empty($custom_field['option_array'])) {
|
41 |
-
|
42 |
-
$options = explode('||', @$custom_field['option_array']);
|
43 |
-
|
44 |
-
$fields[$key]['options'] = array_combine($options, $options);
|
45 |
-
}
|
46 |
-
|
47 |
-
// Default
|
48 |
-
// -----------------------------------------------------------------------
|
49 |
-
//if (isset($custom_field['force_title2'])) {
|
50 |
-
$fields[$key]['default'] = @$fields[$key]['force_title2'];
|
51 |
-
//}
|
52 |
-
// Clear
|
53 |
-
// -----------------------------------------------------------------------
|
54 |
-
if (isset($custom_field['clear_row'])) {
|
55 |
-
$fields[$key]['clear'] = $fields[$key]['clear_row'];
|
56 |
-
}
|
57 |
-
|
58 |
-
// Remove placeholder
|
59 |
-
// -----------------------------------------------------------------------
|
60 |
-
if ($custom_field['cow'] !== 'country' || $custom_field['cow'] !== 'state') {
|
61 |
-
$fields[$key]['placeholder'] = ( isset($custom_field['placeholder']) ? $custom_field['placeholder'] : '' );
|
62 |
-
}
|
63 |
-
|
64 |
-
// Scape wooccm field fielter
|
65 |
-
// -----------------------------------------------------------------------
|
66 |
-
if ($fields[$key]['type'] == 'wooccmtext') {
|
67 |
-
$fields[$key]['type'] = 'text';
|
68 |
-
}
|
69 |
-
if ($fields[$key]['type'] == 'wooccmradio') {
|
70 |
-
$fields[$key]['type'] = 'radio';
|
71 |
-
}
|
72 |
-
if ($fields[$key]['type'] == 'wooccmpassword') {
|
73 |
-
$fields[$key]['type'] = 'password';
|
74 |
-
}
|
75 |
-
if ($fields[$key]['type'] == 'wooccmstate') {
|
76 |
-
$fields[$key]['type'] = 'state';
|
77 |
-
}
|
78 |
-
if ($fields[$key]['type'] == 'wooccmcountry') {
|
79 |
-
$fields[$key]['type'] = 'country';
|
80 |
-
}
|
81 |
-
if ($fields[$key]['type'] == 'wooccmselect') {
|
82 |
-
$fields[$key]['type'] = 'select';
|
83 |
-
}
|
84 |
-
if ($fields[$key]['type'] == 'wooccmtextarea') {
|
85 |
-
$fields[$key]['type'] = 'textarea';
|
86 |
-
}
|
87 |
-
if ($fields[$key]['type'] == 'checkbox_wccm') {
|
88 |
-
$fields[$key]['type'] = 'checkbox';
|
89 |
-
}
|
90 |
-
if ($fields[$key]['type'] == 'time') {
|
91 |
-
$fields[$key]['type'] = 'timepicker';
|
92 |
-
}
|
93 |
-
|
94 |
-
// Required
|
95 |
-
// -----------------------------------------------------------------------
|
96 |
-
if (!empty($custom_field['checkbox'])) {
|
97 |
-
$fields[$key]['checkbox'] = true;
|
98 |
-
$fields[$key]['required'] = true;
|
99 |
-
$fields[$key]['wooccm_required'] = true;
|
100 |
-
} else {
|
101 |
-
$fields[$key]['checkbox'] = false;
|
102 |
-
$fields[$key]['required'] = false;
|
103 |
-
$fields[$key]['wooccm_required'] = false;
|
104 |
-
}
|
105 |
-
|
106 |
-
// Remove required for heading
|
107 |
-
// -----------------------------------------------------------------------
|
108 |
-
if ($custom_field['type'] == 'heading') {
|
109 |
-
$fields[$key]['required'] = false;
|
110 |
-
}
|
111 |
-
|
112 |
-
// Fancy
|
113 |
-
// -----------------------------------------------------------------------
|
114 |
-
//if (!empty($custom_field['option_array'])) {
|
115 |
-
$fields[$key]['fancy'] = @$custom_field['fancy'];
|
116 |
-
//}
|
117 |
-
// Check if Multi-checkbox has options assigned to it
|
118 |
-
// -----------------------------------------------------------------------
|
119 |
-
if ($custom_field['type'] == 'multicheckbox' && empty($custom_field['option_array'])) {
|
120 |
-
$custom_field['disabled'] = true;
|
121 |
-
}
|
122 |
-
|
123 |
-
// Override for State fields
|
124 |
-
// -----------------------------------------------------------------------
|
125 |
-
if ($fields[$key]['type'] == 'state') {
|
126 |
-
|
127 |
-
//$fields[$key]['country'] = $fields[$key]['default'];
|
128 |
-
|
129 |
-
unset($fields[$key]['default']);
|
130 |
-
|
131 |
-
$country_key = false;
|
132 |
-
if ($key == 'billing_state') {
|
133 |
-
$country_key = 'billing_country';
|
134 |
-
}
|
135 |
-
if ($key == 'shipping_state') {
|
136 |
-
$country_key = 'shipping_country';
|
137 |
-
}
|
138 |
-
if (!empty($country_key)) {
|
139 |
-
$current_cc = WC()->checkout->get_value($country_key);
|
140 |
-
$states = WC()->countries->get_states($current_cc);
|
141 |
-
if (empty($states)) {
|
142 |
-
$fields[$key]['required'] = false;
|
143 |
-
$fields[$key]['wooccm_required'] = false;
|
144 |
-
}
|
145 |
-
}
|
146 |
-
}
|
147 |
-
|
148 |
-
//error_log(json_encode($fields[$key]));
|
149 |
-
|
150 |
-
return apply_filters('wooccm_checkout_field_filter', $fields[$key], $key);
|
151 |
-
}
|
152 |
-
|
153 |
-
function add_checkout_fields_filter($fields, $prefix = '') {
|
154 |
-
|
155 |
-
$frontend_fields = array();
|
156 |
-
|
157 |
-
if ($custom_fields = WOOCCM()->field->$prefix->get_fields('old')) {
|
158 |
-
|
159 |
-
foreach ($custom_fields as $field_id => $custom_field) {
|
160 |
-
|
161 |
-
if (!empty($custom_field['cow']) && empty($custom_field['disabled'])) {
|
162 |
-
|
163 |
-
$key = sprintf("%s_%s", $prefix, $custom_field['cow']);
|
164 |
-
|
165 |
-
$frontend_fields[$key] = $this->add_checkout_field_filter($fields, $custom_field, $prefix);
|
166 |
-
}
|
167 |
-
}
|
168 |
-
|
169 |
-
return $frontend_fields;
|
170 |
-
}
|
171 |
-
|
172 |
-
return $fields;
|
173 |
-
}
|
174 |
-
|
175 |
-
function add_checkout_billing_fields($fields) {
|
176 |
-
return $this->add_checkout_fields_filter($fields, 'billing');
|
177 |
-
}
|
178 |
-
|
179 |
-
function add_checkout_shipping_fields($fields) {
|
180 |
-
return $this->add_checkout_fields_filter($fields, 'shipping');
|
181 |
-
}
|
182 |
-
|
183 |
-
function add_checkout_additional_fields($fields) {
|
184 |
-
return $this->add_checkout_fields_filter($fields, 'additional');
|
185 |
-
}
|
186 |
-
|
187 |
-
function init() {
|
188 |
-
|
189 |
-
// Billing fields
|
190 |
-
// -----------------------------------------------------------------------
|
191 |
-
add_filter('woocommerce_billing_fields', array($this, 'add_checkout_billing_fields'));
|
192 |
-
|
193 |
-
// Shipping fields
|
194 |
-
// -----------------------------------------------------------------------
|
195 |
-
add_filter('woocommerce_shipping_fields', array($this, 'add_checkout_shipping_fields'));
|
196 |
-
|
197 |
-
// Additional fields
|
198 |
-
// -----------------------------------------------------------------------
|
199 |
-
add_filter('wooccm_additional_fields', array($this, 'add_checkout_additional_fields'));
|
200 |
-
}
|
201 |
-
|
202 |
-
public static function instance() {
|
203 |
-
if (!isset(self::$instance)) {
|
204 |
-
self::$instance = new self();
|
205 |
-
self::$instance->init();
|
206 |
-
}
|
207 |
-
return self::$instance;
|
208 |
-
}
|
209 |
-
|
210 |
-
}
|
211 |
-
|
212 |
-
WOOCCM_Fields_Register::instance();
|
213 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
new/view/frontend/filters.php
DELETED
@@ -1,269 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* WooCommerce Checkout Manager
|
4 |
-
*/
|
5 |
-
// Exit if accessed directly
|
6 |
-
if (!defined('ABSPATH'))
|
7 |
-
exit;
|
8 |
-
|
9 |
-
// File Picker
|
10 |
-
// -----------------------------------------------------------------------------
|
11 |
-
|
12 |
-
function wooccm_checkout_field_upload_handler($field = '', $key, $args, $value) {
|
13 |
-
|
14 |
-
$upload_name = (!empty($args['placeholder']) ? esc_attr($args['placeholder']) : __('Upload Files', 'woocommerce-checkout-manager') );
|
15 |
-
|
16 |
-
if ($args['wooccm_required']) {
|
17 |
-
$args['class'][] = 'validate-required';
|
18 |
-
$required = ' <abbr class="required" title="' . esc_attr__('required', 'woocommerce') . '">*</abbr>';
|
19 |
-
} else {
|
20 |
-
$required = '';
|
21 |
-
}
|
22 |
-
|
23 |
-
$args['maxlength'] = ( $args['maxlength'] ) ? 'maxlength="' . absint($args['maxlength']) . '"' : '';
|
24 |
-
|
25 |
-
if (is_string($args['label_class'])) {
|
26 |
-
$args['label_class'] = array($args['label_class']);
|
27 |
-
}
|
28 |
-
|
29 |
-
if (is_null($value)) {
|
30 |
-
$value = $args['default'];
|
31 |
-
}
|
32 |
-
|
33 |
-
// Custom attribute handling
|
34 |
-
$custom_attributes = array();
|
35 |
-
|
36 |
-
if (!empty($args['custom_attributes']) && is_array($args['custom_attributes'])) {
|
37 |
-
foreach ($args['custom_attributes'] as $attribute => $attribute_value) {
|
38 |
-
$custom_attributes[] = esc_attr($attribute) . '="' . esc_attr($attribute_value) . '"';
|
39 |
-
}
|
40 |
-
}
|
41 |
-
|
42 |
-
if (!empty($args['validate'])) {
|
43 |
-
foreach ($args['validate'] as $validate) {
|
44 |
-
$args['class'][] = 'validate-' . $validate;
|
45 |
-
}
|
46 |
-
}
|
47 |
-
|
48 |
-
if (!empty($args['type'])) {
|
49 |
-
$args['class'][] = $args['type'] . '-field';
|
50 |
-
}
|
51 |
-
|
52 |
-
ob_start();
|
53 |
-
?>
|
54 |
-
<p class="form-row <?php echo esc_attr(implode(' ', $args['class'])); ?>" id="<?php echo esc_attr($args['id']); ?>_field" data-cow="<?php echo esc_attr($args['cow']); ?>">
|
55 |
-
<?php if ($args['label']) : ?>
|
56 |
-
<label for="<?php echo esc_attr($args['id']); ?>" class="<?php echo esc_attr(implode(' ', $args['label_class'])); ?>">
|
57 |
-
<?php echo esc_html($args['label']) . $required; ?>
|
58 |
-
</label>
|
59 |
-
<?php endif; ?>
|
60 |
-
<button style="width:100%" class="wooccmupload_button button alt" type="button" class="button alt" id="<?php echo esc_attr($key); ?>_button"><?php echo esc_html($upload_name); ?></button>
|
61 |
-
<input style="display:none;" class="wooccmupload_field" type="hidden" name="<?php echo esc_attr($key); ?>" id="<?php echo esc_attr($key); ?>" value="" />
|
62 |
-
<input style="display:none;" class="fileinput-button" type="file" name="<?php echo esc_attr($key); ?>_file" id="<?php echo esc_attr($key); ?>_file" multiple="multiple" />
|
63 |
-
<span style="display:none;" class="wooccmupload_list"></span>
|
64 |
-
</p>
|
65 |
-
<?php if (!empty($args['clear'])) : ?>
|
66 |
-
<div class="clear"></div>
|
67 |
-
<?php
|
68 |
-
endif;
|
69 |
-
return ob_get_clean();
|
70 |
-
}
|
71 |
-
|
72 |
-
add_filter('woocommerce_form_field_wooccmupload', 'wooccm_checkout_field_upload_handler', 10, 4);
|
73 |
-
|
74 |
-
// Radio Buttons
|
75 |
-
function wooccm_checkout_field_radio_handler($field = '', $key, $args, $value) {
|
76 |
-
|
77 |
-
if (!empty($args['clear']))
|
78 |
-
$after = '<div class="clear"></div>';
|
79 |
-
else
|
80 |
-
$after = '';
|
81 |
-
|
82 |
-
if ($args['wooccm_required']) {
|
83 |
-
$args['class'][] = 'validate-required';
|
84 |
-
$required = ' <abbr class="required" title="' . esc_attr__('required', 'woocommerce') . '">*</abbr>';
|
85 |
-
} else {
|
86 |
-
$required = '';
|
87 |
-
}
|
88 |
-
|
89 |
-
$args['maxlength'] = ( $args['maxlength'] ) ? 'maxlength="' . absint($args['maxlength']) . '"' : '';
|
90 |
-
|
91 |
-
$field = '<div class="form-row ' . esc_attr(implode(' ', $args['class'])) . '" id="' . esc_attr($key) . '_field">';
|
92 |
-
|
93 |
-
$field .= '<fieldset><legend>' . $args['label'] . $required . '</legend>';
|
94 |
-
|
95 |
-
if (!empty($args['options'])) {
|
96 |
-
foreach ($args['options'] as $option_key => $option_text) {
|
97 |
-
$field .= '<label style="display:block;"><input type="radio" ' . checked($value, wooccm_wpml_string(esc_attr($option_text)), false) . ' name="' . esc_attr($key) . '" value="' . wooccm_wpml_string(esc_attr($option_text)) . '" /> ' . wooccm_wpml_string(esc_html($option_text)) . '</label>';
|
98 |
-
}
|
99 |
-
}
|
100 |
-
|
101 |
-
$field .= '</fieldset></div>' . $after;
|
102 |
-
|
103 |
-
return $field;
|
104 |
-
}
|
105 |
-
|
106 |
-
add_filter('woocommerce_form_field_radio', 'wooccm_checkout_field_radio_handler', 10, 4);
|
107 |
-
|
108 |
-
// Multi-Checkbox
|
109 |
-
function wooccm_checkout_field_multicheckbox_handler($field = '', $key, $args, $value) {
|
110 |
-
|
111 |
-
if (!empty($args['clear']))
|
112 |
-
$after = '<div class="clear"></div>';
|
113 |
-
else
|
114 |
-
$after = '';
|
115 |
-
|
116 |
-
if ($args['wooccm_required']) {
|
117 |
-
$args['class'][] = 'validate-required';
|
118 |
-
$required = ' <abbr class="required" title="' . esc_attr__('required', 'woocommerce') . '">*</abbr>';
|
119 |
-
} else {
|
120 |
-
$required = '';
|
121 |
-
}
|
122 |
-
|
123 |
-
$args['maxlength'] = ( $args['maxlength'] ) ? 'maxlength="' . absint($args['maxlength']) . '"' : '';
|
124 |
-
|
125 |
-
$options = '';
|
126 |
-
|
127 |
-
if (!empty($args['options'])) {
|
128 |
-
foreach ($args['options'] as $option_key => $option_text) {
|
129 |
-
$options .= '<label><input type="checkbox" name="' . esc_attr($key) . '[]" value="' . wooccm_wpml_string(esc_attr($option_text)) . '"' . selected($value, $option_key, false) . ' /> ' . wooccm_wpml_string(esc_attr($option_text)) . '</label>';
|
130 |
-
}
|
131 |
-
}
|
132 |
-
|
133 |
-
$field = '<p class="form-row ' . esc_attr(implode(' ', $args['class'])) . '" id="' . esc_attr($key) . '_field">';
|
134 |
-
|
135 |
-
if ($args['label'])
|
136 |
-
$field .= '<label class="' . implode(' ', $args['label_class']) . '">' . $args['label'] . $required . '</label>';
|
137 |
-
|
138 |
-
$field .= $options . '
|
139 |
-
</p>' . $after;
|
140 |
-
|
141 |
-
return $field;
|
142 |
-
}
|
143 |
-
|
144 |
-
add_filter('woocommerce_form_field_multicheckbox', 'wooccm_checkout_field_multicheckbox_handler', 10, 4);
|
145 |
-
|
146 |
-
// Multiselect
|
147 |
-
// -----------------------------------------------------------------------------
|
148 |
-
function wooccm_checkout_field_multiselect_handler($field = '', $key, $args, $value) {
|
149 |
-
|
150 |
-
$args['type'] = 'select';
|
151 |
-
|
152 |
-
ob_start();
|
153 |
-
|
154 |
-
woocommerce_form_field($key, $args, $value);
|
155 |
-
|
156 |
-
$field = str_replace('<select ', ' <select multiple="multiple" ', ob_get_clean());
|
157 |
-
$field = str_replace('name="' . esc_attr($key) . '"', 'name="' . esc_attr($key) . '[]"', $field);
|
158 |
-
|
159 |
-
return $field;
|
160 |
-
}
|
161 |
-
|
162 |
-
add_filter('woocommerce_form_field_multiselect', 'wooccm_checkout_field_multiselect_handler', 10, 4);
|
163 |
-
|
164 |
-
// Colorpicker
|
165 |
-
// -----------------------------------------------------------------------------
|
166 |
-
function wooccm_checkout_field_colorpicker_handler($field = '', $key, $args, $value) {
|
167 |
-
|
168 |
-
$args['type'] = 'text';
|
169 |
-
$args['maxlength'] = 7;
|
170 |
-
|
171 |
-
ob_start();
|
172 |
-
|
173 |
-
woocommerce_form_field($key, $args, $value);
|
174 |
-
|
175 |
-
return str_replace('</p>', ' <span class="wooccmcolorpicker_container" class="spec_shootd"></span></p>', ob_get_clean());
|
176 |
-
}
|
177 |
-
|
178 |
-
add_filter('woocommerce_form_field_colorpicker', 'wooccm_checkout_field_colorpicker_handler', 10, 4);
|
179 |
-
|
180 |
-
// Datepicker
|
181 |
-
// -----------------------------------------------------------------------------
|
182 |
-
function wooccm_checkout_field_datepicker_handler($field = '', $key, $args, $value) {
|
183 |
-
|
184 |
-
$args['type'] = 'text';
|
185 |
-
|
186 |
-
ob_start();
|
187 |
-
|
188 |
-
woocommerce_form_field($key, $args, $value);
|
189 |
-
|
190 |
-
return ob_get_clean();
|
191 |
-
}
|
192 |
-
|
193 |
-
add_filter('woocommerce_form_field_datepicker', 'wooccm_checkout_field_datepicker_handler', 10, 4);
|
194 |
-
|
195 |
-
// Timepicker
|
196 |
-
// -----------------------------------------------------------------------------
|
197 |
-
function wooccm_checkout_field_timepicker_handler($field = '', $key, $args, $value) {
|
198 |
-
|
199 |
-
$args['type'] = 'text';
|
200 |
-
|
201 |
-
ob_start();
|
202 |
-
|
203 |
-
woocommerce_form_field($key, $args, $value);
|
204 |
-
|
205 |
-
return ob_get_clean();
|
206 |
-
}
|
207 |
-
|
208 |
-
add_filter('woocommerce_form_field_timepicker', 'wooccm_checkout_field_timepicker_handler', 10, 4);
|
209 |
-
|
210 |
-
// Heading
|
211 |
-
// -----------------------------------------------------------------------------
|
212 |
-
function wooccm_checkout_field_heading_handler($field = '', $key, $args, $value) {
|
213 |
-
|
214 |
-
$field = '<h3 class="form-row ' . esc_attr(implode(' ', $args['class'])) . '" id="' . esc_attr($key) . '_field">' . $args['label'] . '</h3>';
|
215 |
-
|
216 |
-
return $field;
|
217 |
-
}
|
218 |
-
|
219 |
-
add_filter('woocommerce_form_field_heading', 'wooccm_checkout_field_heading_handler', 10, 4);
|
220 |
-
|
221 |
-
// Country
|
222 |
-
// -----------------------------------------------------------------------------
|
223 |
-
function wooccm_checkout_field_country_handler($field = '', $key, $args, $value) {
|
224 |
-
|
225 |
-
static $instance = 0;
|
226 |
-
|
227 |
-
if ($instance) {
|
228 |
-
return $field;
|
229 |
-
}
|
230 |
-
|
231 |
-
$instance++;
|
232 |
-
|
233 |
-
ob_start();
|
234 |
-
|
235 |
-
if (!empty($args['default'])) {
|
236 |
-
$value = $args['default'];
|
237 |
-
}
|
238 |
-
|
239 |
-
woocommerce_form_field($key, $args, $value);
|
240 |
-
|
241 |
-
return ob_get_clean();
|
242 |
-
}
|
243 |
-
|
244 |
-
add_filter('woocommerce_form_field_country', 'wooccm_checkout_field_country_handler', 10, 4);
|
245 |
-
|
246 |
-
// State
|
247 |
-
// -----------------------------------------------------------------------------
|
248 |
-
function wooccm_checkout_field_state_handler($field = '', $key, $args, $value) {
|
249 |
-
|
250 |
-
static $instance = 0;
|
251 |
-
|
252 |
-
if ($instance) {
|
253 |
-
return $field;
|
254 |
-
}
|
255 |
-
|
256 |
-
$instance++;
|
257 |
-
|
258 |
-
ob_start();
|
259 |
-
|
260 |
-
if (!empty($args['default'])) {
|
261 |
-
$value = $args['default'];
|
262 |
-
}
|
263 |
-
|
264 |
-
woocommerce_form_field($key, $args, $value);
|
265 |
-
|
266 |
-
return ob_get_clean();
|
267 |
-
}
|
268 |
-
|
269 |
-
add_filter('woocommerce_form_field_state', 'wooccm_checkout_field_state_handler', 10, 4);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://quadlayers.com/
|
|
4 |
Tags: woocommerce, woocommerce checkout, field manager, checkout editor, checkout field, shipping field, billing field, order field, additional field
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 5.2.3
|
7 |
-
Stable tag: 4.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -119,7 +119,7 @@ Example:
|
|
119 |
|
120 |
== Screenshots ==
|
121 |
|
122 |
-
1.
|
123 |
|
124 |
2. New Checkout fields appear in the Order Summary.
|
125 |
|
@@ -137,6 +137,15 @@ Example:
|
|
137 |
|
138 |
== Changelog ==
|
139 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
140 |
= 4.5.6 =
|
141 |
* Fix: woocommerce settings page permissions
|
142 |
|
4 |
Tags: woocommerce, woocommerce checkout, field manager, checkout editor, checkout field, shipping field, billing field, order field, additional field
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 5.2.3
|
7 |
+
Stable tag: 4.6.0
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
119 |
|
120 |
== Screenshots ==
|
121 |
|
122 |
+
1. Customize or add additional fields to your checkout screen.
|
123 |
|
124 |
2. New Checkout fields appear in the Order Summary.
|
125 |
|
137 |
|
138 |
== Changelog ==
|
139 |
|
140 |
+
= 4.6.0 =
|
141 |
+
* Improvement: woocommerce checkout manager admin panel rebuilt
|
142 |
+
* Improvement: woocommerce checkout manager field conditional rebuilt
|
143 |
+
* Improvement: woocommerce checkout manager field options rebuilt
|
144 |
+
* Fix: woocommerce multicheckbox default value
|
145 |
+
|
146 |
+
= 4.5.7 =
|
147 |
+
* Fix: woocommerce default label and placeholder i18n
|
148 |
+
|
149 |
= 4.5.6 =
|
150 |
* Fix: woocommerce settings page permissions
|
151 |
|
templates/order/order-custom-fields.php
CHANGED
@@ -1,53 +1,54 @@
|
|
1 |
-
<h2 class="woocommerce-order-details__title"><?php echo ($title = get_option('wooccm_order_custom_fields_title', false)) ? esc_html($title) : esc_html__('
|
2 |
|
3 |
-
<?php
|
4 |
-
<table class="woocommerce-table
|
5 |
<tbody>
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
|
|
11 |
<?php echo esc_html($field['label']); ?>
|
12 |
</th>
|
13 |
-
<td
|
14 |
<?php echo esc_html($value); ?>
|
15 |
</td>
|
16 |
</tr>
|
17 |
<?php endif; ?>
|
18 |
<?php endif; ?>
|
19 |
<?php endforeach; ?>
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
|
|
25 |
<?php echo esc_html($field['label']); ?>
|
26 |
</th>
|
27 |
-
<td
|
28 |
<?php echo esc_html($value); ?>
|
29 |
</td>
|
30 |
</tr>
|
31 |
<?php endif; ?>
|
32 |
<?php endif; ?>
|
33 |
<?php endforeach; ?>
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
$value = get_post_meta($order_id, sprintf('_%
|
38 |
-
|
39 |
-
|
40 |
-
<tr id="tr-<?php echo esc_attr($field['key']); ?>" class="woocommerce-table__line-item order_item">
|
41 |
-
<th class="woocommerce-table__product-name product-name">
|
42 |
<?php echo esc_html($field['label']); ?>
|
43 |
</th>
|
44 |
-
<td
|
45 |
<?php echo esc_html($value); ?>
|
46 |
</td>
|
47 |
</tr>
|
48 |
<?php endif; ?>
|
49 |
<?php endif; ?>
|
50 |
<?php endforeach; ?>
|
|
|
51 |
</tbody>
|
52 |
</table>
|
53 |
<?php
|
1 |
+
<h2 class="woocommerce-order-details__title"><?php echo ($title = get_option('wooccm_order_custom_fields_title', false)) ? esc_html($title) : esc_html__('Custom fields', 'woocommerce-checkout-manager'); ?></h2>
|
2 |
|
3 |
+
<?php $option = WOOCCM()->billing->get_option_types(); ?>
|
4 |
+
<table class="woocommerce-table shop_table order_details">
|
5 |
<tbody>
|
6 |
+
|
7 |
+
<?php foreach (WOOCCM()->billing->get_fields() as $field_id => $field) : ?>
|
8 |
+
<?php if (!in_array($field['name'], WOOCCM()->billing->get_defaults())) : ?>
|
9 |
+
<?php if ($value = get_post_meta($order_id, sprintf('_%s', $field['key']), true)): ?>
|
10 |
+
<tr id="tr-<?php echo esc_attr($field['key']); ?>">
|
11 |
+
<th>
|
12 |
<?php echo esc_html($field['label']); ?>
|
13 |
</th>
|
14 |
+
<td>
|
15 |
<?php echo esc_html($value); ?>
|
16 |
</td>
|
17 |
</tr>
|
18 |
<?php endif; ?>
|
19 |
<?php endif; ?>
|
20 |
<?php endforeach; ?>
|
21 |
+
|
22 |
+
<?php foreach (WOOCCM()->shipping->get_fields() as $field_id => $field) : ?>
|
23 |
+
<?php if (!in_array($field['name'], WOOCCM()->shipping->get_defaults())) : ?>
|
24 |
+
<?php if ($value = get_post_meta($order_id, sprintf('_%s', 'shipping', $field['key']), true)): ?>
|
25 |
+
<tr id="tr-<?php echo esc_attr($field['key']); ?>">
|
26 |
+
<th>
|
27 |
<?php echo esc_html($field['label']); ?>
|
28 |
</th>
|
29 |
+
<td>
|
30 |
<?php echo esc_html($value); ?>
|
31 |
</td>
|
32 |
</tr>
|
33 |
<?php endif; ?>
|
34 |
<?php endif; ?>
|
35 |
<?php endforeach; ?>
|
36 |
+
|
37 |
+
<?php foreach (WOOCCM()->additional->get_fields() as $field_id => $field) : ?>
|
38 |
+
<?php if (!in_array($field['name'], WOOCCM()->billing->get_defaults())) : ?>
|
39 |
+
<?php if (($value = get_post_meta($order_id, sprintf('_%s', $field['key']), true)) ? $value : get_post_meta($order_id, sprintf('%s', $field['name']), true)): ?>
|
40 |
+
<tr id="tr-<?php echo esc_attr($field['key']); ?>">
|
41 |
+
<th>
|
|
|
|
|
42 |
<?php echo esc_html($field['label']); ?>
|
43 |
</th>
|
44 |
+
<td>
|
45 |
<?php echo esc_html($value); ?>
|
46 |
</td>
|
47 |
</tr>
|
48 |
<?php endif; ?>
|
49 |
<?php endif; ?>
|
50 |
<?php endforeach; ?>
|
51 |
+
|
52 |
</tbody>
|
53 |
</table>
|
54 |
<?php
|
templates/order/order-upload-files.php
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
<h2 class="woocommerce-order-details__title"><?php echo ($title = get_option('wooccm_order_upload_files_title', false)) ? esc_html($title) : esc_html__('
|
2 |
|
3 |
<div id="wooccm_order_attachment_inner">
|
4 |
<table class="woocommerce_order_items shop_table">
|
1 |
+
<h2 class="woocommerce-order-details__title"><?php echo ($title = get_option('wooccm_order_upload_files_title', false)) ? esc_html($title) : esc_html__('Upload files', 'woocommerce-checkout-manager'); ?></h2>
|
2 |
|
3 |
<div id="wooccm_order_attachment_inner">
|
4 |
<table class="woocommerce_order_items shop_table">
|
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 |
* 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.
|
21 |
}
|
22 |
if (!defined('WOOCCM_PLUGIN_FILE')) {
|
23 |
define('WOOCCM_PLUGIN_FILE', __FILE__);
|
@@ -50,8 +50,12 @@ if (!defined('WOOCCM_GROUP_URL')) {
|
|
50 |
define('WOOCCM_GROUP_URL', 'https://www.facebook.com/groups/quadlayers');
|
51 |
}
|
52 |
|
|
|
|
|
|
|
|
|
53 |
if (!class_exists('WOOCCM', false)) {
|
54 |
-
include_once WOOCCM_PLUGIN_DIR . '
|
55 |
}
|
56 |
|
57 |
function WOOCCM() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid
|
@@ -59,5 +63,4 @@ function WOOCCM() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionNam
|
|
59 |
}
|
60 |
|
61 |
// Global for backwards compatibility.
|
62 |
-
$GLOBALS['wooccm'] = WOOCCM();
|
63 |
-
|
3 |
/**
|
4 |
* Plugin Name: WooCommerce Checkout Manager
|
5 |
* Description: Manages WooCommerce Checkout, the advanced way.
|
6 |
+
* Version: 4.6.0
|
7 |
* Author: QuadLayers
|
8 |
* Author URI: https://www.quadlayers.com
|
9 |
* Copyright: 2019 QuadLayers (https://www.quadlayers.com)
|
17 |
define('WOOCCM_PLUGIN_NAME', 'WooCommerce Checkout Manager');
|
18 |
}
|
19 |
if (!defined('WOOCCM_PLUGIN_VERSION')) {
|
20 |
+
define('WOOCCM_PLUGIN_VERSION', '4.6.0');
|
21 |
}
|
22 |
if (!defined('WOOCCM_PLUGIN_FILE')) {
|
23 |
define('WOOCCM_PLUGIN_FILE', __FILE__);
|
50 |
define('WOOCCM_GROUP_URL', 'https://www.facebook.com/groups/quadlayers');
|
51 |
}
|
52 |
|
53 |
+
if (!defined('WOOCCM_WC_DOMAIN')) {
|
54 |
+
define('WOOCCM_WC_DOMAIN', 'woocommerce');
|
55 |
+
}
|
56 |
+
|
57 |
if (!class_exists('WOOCCM', false)) {
|
58 |
+
include_once( WOOCCM_PLUGIN_DIR . 'includes/class-wooccm.php' );
|
59 |
}
|
60 |
|
61 |
function WOOCCM() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid
|
63 |
}
|
64 |
|
65 |
// Global for backwards compatibility.
|
66 |
+
$GLOBALS['wooccm'] = WOOCCM();
|
|