Version Description
GUI + Code clean up. Multi-lang Save issue fix.
Download this release
Release Info
Developer | Emark |
Plugin | WooCommerce Checkout Manager |
Version | 3.6.6 |
Comparing to | |
See all releases |
Code changes from version 3.6.5 to 3.6.6
- readme.txt +6 -122
- style_wccs.css +89 -0
- woocommerce-checkout-manager.php +824 -1090
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: Emark
|
|
3 |
Donate link: http://www.trottyzone.com/donation/
|
4 |
Tags: woocommerce, checkout settings, remove fields, shipping, order, fields, checkout page, checkout field, checkout manager, required remove, woocommerce checkout manager, checkout, checkout field editor, field editor, woocommerce custom checkout options , custom checkout, checkout option, field, payment, sell, buy, pay, tax, notice, re-order, order, new field, save field, manager, options, field editor
|
5 |
Requires at least: 3.0
|
6 |
-
Tested up to: 4.
|
7 |
-
Stable tag: 3.6.
|
8 |
License: GPLv2 or later
|
9 |
|
10 |
Manages WooCommerce Checkout
|
@@ -183,8 +183,7 @@ Should you have any questions or concerns please contact at the <a href="http://
|
|
183 |
|
184 |
7. SELECT OPTIONS
|
185 |
|
186 |
-
|
187 |
-
== Upgrade Notice ==
|
188 |
= 1.0 =
|
189 |
Initial
|
190 |
|
@@ -303,121 +302,6 @@ WPML bug fixes 3
|
|
303 |
= 3.6.5 =
|
304 |
WPML bug fixes 4
|
305 |
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
= 1.2 =
|
311 |
-
Added required attribute removal
|
312 |
-
|
313 |
-
= 1.3 =
|
314 |
-
bug fix!
|
315 |
-
|
316 |
-
= 1.4 =
|
317 |
-
More features added.
|
318 |
-
|
319 |
-
= 1.5 =
|
320 |
-
some bugs fixed
|
321 |
-
|
322 |
-
= 1.6 =
|
323 |
-
more bugs fixed
|
324 |
-
|
325 |
-
= 1.7 =
|
326 |
-
add/remove required field for each new fields
|
327 |
-
|
328 |
-
= 2.0 =
|
329 |
-
Custom fields data are added to the receipt
|
330 |
-
|
331 |
-
= 2.1 =
|
332 |
-
Checkout process fix
|
333 |
-
|
334 |
-
= 2.2 =
|
335 |
-
bug fix
|
336 |
-
|
337 |
-
= 2.3 =
|
338 |
-
Additional features
|
339 |
-
|
340 |
-
= 2.4 =
|
341 |
-
Localization Ready
|
342 |
-
|
343 |
-
= 2.5 =
|
344 |
-
Added features for shipping
|
345 |
-
|
346 |
-
= 2.6 =
|
347 |
-
remove fields for shipping
|
348 |
-
|
349 |
-
= 2.7 =
|
350 |
-
required attribute bug fix and included translations
|
351 |
-
|
352 |
-
= 2.8 =
|
353 |
-
Bug fixes
|
354 |
-
|
355 |
-
= 2.9 =
|
356 |
-
Bug fixes
|
357 |
-
|
358 |
-
= 3.0 =
|
359 |
-
Javascript fix and rename fields inserted
|
360 |
-
|
361 |
-
= 3.1 =
|
362 |
-
bug fix
|
363 |
-
|
364 |
-
= 3.2 =
|
365 |
-
code review
|
366 |
-
|
367 |
-
= 3.3 =
|
368 |
-
fields positioning, fixed.
|
369 |
-
|
370 |
-
= 3.4 =
|
371 |
-
bug fixed.
|
372 |
-
|
373 |
-
= 3.5 =
|
374 |
-
Select date function, included.
|
375 |
-
|
376 |
-
= 3.5.1 =
|
377 |
-
Select option and checkbox functions, included.
|
378 |
-
|
379 |
-
= 3.5.2 =
|
380 |
-
updating to standard.
|
381 |
-
|
382 |
-
= 3.5.3 =
|
383 |
-
bug fix- force selection for option and minor fix.
|
384 |
-
|
385 |
-
= 3.5.4 =
|
386 |
-
Added feature.
|
387 |
-
|
388 |
-
= 3.5.5 =
|
389 |
-
Translations updated
|
390 |
-
|
391 |
-
= 3.5.6 =
|
392 |
-
Included translations - Vietnamse, Italian, European Portuguese, Brazilian Portuguese
|
393 |
-
Layout fixed on Order Summary Page
|
394 |
-
|
395 |
-
= 3.5.7 =
|
396 |
-
Bug fix.
|
397 |
-
|
398 |
-
= 3.5.8 =
|
399 |
-
Bug fix.
|
400 |
-
|
401 |
-
= 3.5.81 =
|
402 |
-
Bulgarian language by Ivo Minchev
|
403 |
-
|
404 |
-
= 3.5.9 =
|
405 |
-
Bug fix.
|
406 |
-
|
407 |
-
= 3.6 =
|
408 |
-
Bug fixes.
|
409 |
-
|
410 |
-
= 3.6.1 =
|
411 |
-
Compatibility with 2.1.7 WooCommerce && WPML
|
412 |
-
|
413 |
-
= 3.6.2 =
|
414 |
-
WPML bug fix
|
415 |
-
|
416 |
-
= 3.6.3 =
|
417 |
-
WPML bug fix 2 (translation for e-mails)
|
418 |
-
|
419 |
-
= 3.6.4 =
|
420 |
-
WPML bug fixes 3
|
421 |
-
|
422 |
-
= 3.6.5 =
|
423 |
-
WPML bug fixes 4
|
3 |
Donate link: http://www.trottyzone.com/donation/
|
4 |
Tags: woocommerce, checkout settings, remove fields, shipping, order, fields, checkout page, checkout field, checkout manager, required remove, woocommerce checkout manager, checkout, checkout field editor, field editor, woocommerce custom checkout options , custom checkout, checkout option, field, payment, sell, buy, pay, tax, notice, re-order, order, new field, save field, manager, options, field editor
|
5 |
Requires at least: 3.0
|
6 |
+
Tested up to: 4.2
|
7 |
+
Stable tag: 3.6.6
|
8 |
License: GPLv2 or later
|
9 |
|
10 |
Manages WooCommerce Checkout
|
183 |
|
184 |
7. SELECT OPTIONS
|
185 |
|
186 |
+
== Changelog ==
|
|
|
187 |
= 1.0 =
|
188 |
Initial
|
189 |
|
302 |
= 3.6.5 =
|
303 |
WPML bug fixes 4
|
304 |
|
305 |
+
= 3.6.6 =
|
306 |
+
GUI + Code clean up.
|
307 |
+
Multi-lang Save issue fix.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
style_wccs.css
ADDED
@@ -0,0 +1,89 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.wooccm_title {
|
2 |
+
margin: 5px 0 15px 10px;
|
3 |
+
color: #fff;
|
4 |
+
font-size: 18px;
|
5 |
+
float: left;
|
6 |
+
background: #0074a2;
|
7 |
+
padding: 15px 20px;
|
8 |
+
border-radius: 5px;
|
9 |
+
margin-left: 0px;
|
10 |
+
}
|
11 |
+
input[type="text"] {
|
12 |
+
width: 100%;
|
13 |
+
}
|
14 |
+
.small {
|
15 |
+
font-size: 10px;
|
16 |
+
}
|
17 |
+
.wooccm_feed {
|
18 |
+
float: right;
|
19 |
+
margin-right: 10px;
|
20 |
+
font-size: 14px;
|
21 |
+
}
|
22 |
+
.wccs-clone {
|
23 |
+
display:none;
|
24 |
+
}
|
25 |
+
.clear_wccm {
|
26 |
+
float: left;
|
27 |
+
}
|
28 |
+
p.submit {
|
29 |
+
float: right;
|
30 |
+
padding: 0 !IMPORTANT;
|
31 |
+
margin: 0 !IMPORTANT;
|
32 |
+
}
|
33 |
+
.clear_wccm.title {
|
34 |
+
margin-top: 30px;
|
35 |
+
margin-right: 12px;
|
36 |
+
margin-left: 12px;
|
37 |
+
width: 14%;
|
38 |
+
}
|
39 |
+
.clear_wccm.data {
|
40 |
+
width: 97%;
|
41 |
+
}
|
42 |
+
.clear_wccm ul {
|
43 |
+
float: left;
|
44 |
+
padding: 0 32px;
|
45 |
+
list-style: square;
|
46 |
+
}
|
47 |
+
.widefat input {
|
48 |
+
float: right;
|
49 |
+
}
|
50 |
+
.wccs_replace {
|
51 |
+
width: 20%;
|
52 |
+
}
|
53 |
+
.wccs-order {
|
54 |
+
cursor:move;
|
55 |
+
}
|
56 |
+
.wccs-table > tbody > tr > td {
|
57 |
+
background: #fff;
|
58 |
+
border-right: 1px solid #ededed;
|
59 |
+
border-bottom: 1px solid #ededed;
|
60 |
+
padding: 8px;
|
61 |
+
position: relative;
|
62 |
+
}
|
63 |
+
.wccs-table > tbody > tr:last-child td { border-bottom: 0 none; }
|
64 |
+
.wccs-table > tbody > tr td:last-child { border-right: 0 none; }
|
65 |
+
.wccs-table > thead > tr > th { border-right: 1px solid #e1e1e1; }
|
66 |
+
.wccs-table > thead > tr > th:last-child { border-right: 0 none; }
|
67 |
+
.wccs-table tr td.wccs-order,
|
68 |
+
.wccs-table tr th.wccs-order {
|
69 |
+
width: 16px;
|
70 |
+
text-align: center;
|
71 |
+
vertical-align: middle;
|
72 |
+
color: #aaa;
|
73 |
+
text-shadow: #fff 0 1px 0;
|
74 |
+
}
|
75 |
+
.wccs-table .wccs-remove {
|
76 |
+
font-size: 20px;
|
77 |
+
font-weight: 700;
|
78 |
+
vertical-align: middle;
|
79 |
+
text-align: center;
|
80 |
+
}
|
81 |
+
.wccs-table input[type="text"] {
|
82 |
+
width: 100%;
|
83 |
+
}
|
84 |
+
.wccs-table-footer {
|
85 |
+
position: relative;
|
86 |
+
overflow: hidden;
|
87 |
+
margin-top: 10px;
|
88 |
+
padding: 8px 0;
|
89 |
+
}
|
woocommerce-checkout-manager.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: WooCommerce Checkout Manager
|
4 |
Plugin URI: http://www.trottyzone.com/product/woocommerce-checkout-manager-pro
|
5 |
Description: Manages WooCommerce Checkout fields
|
6 |
-
Version: 3.6.
|
7 |
Author: Ephrain Marchan
|
8 |
Author URI: http://www.trottyzone.com
|
9 |
License: GPLv2 or later
|
@@ -21,1218 +21,952 @@ You should have received a copy of the GNU General Public License
|
|
21 |
along with this program; if not, write to the Free Software
|
22 |
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
23 |
*/
|
24 |
-
|
25 |
-
|
|
|
26 |
load_plugin_textdomain('woocommerce-checkout-manager', false, dirname(plugin_basename(__FILE__)) . '/languages/');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
function wccs_install() {
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
|
|
|
|
|
|
41 |
add_option( 'wccs_settings', apply_filters( 'wccs_defaults', $defaults ) );
|
42 |
}
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
add_action( 'admin_init', 'wccs_register_setting' );
|
50 |
-
} else {
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
}
|
55 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
function wccs_admin_menu() {
|
57 |
-
|
58 |
-
add_options_page( __('WooCommerce Checkout Manager', 'woocommerce-checkout-manager'), __('WooCommerce Checkout Manager', 'woocommerce-checkout-manager'), 'manage_options', __FILE__ , 'wccs__options_page');
|
59 |
}
|
|
|
|
|
60 |
function wccs_register_setting() {
|
61 |
-
register_setting( 'wccs_options', 'wccs_settings', 'wccs_options_validate' );
|
62 |
}
|
63 |
-
|
|
|
64 |
function wccs__options_page() {
|
65 |
-
|
66 |
-
|
67 |
-
{
|
68 |
-
wp_die( __('You do not have sufficient permissions to access this page.') );
|
69 |
}
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
$options = get_option( 'wccs_settings' );
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
|
|
80 |
}
|
81 |
-
|
82 |
echo '<div class="wrap">';
|
83 |
-
// icon for settings
|
84 |
echo '<div id="icon-themes" class="icon32"><br></div>';
|
85 |
-
|
86 |
-
|
87 |
-
// settings form
|
88 |
?>
|
89 |
-
|
|
|
90 |
<div class="wooccm_feed">
|
91 |
-
<?php
|
92 |
-
|
93 |
|
94 |
-
|
95 |
-
$rss = fetch_feed( 'http://www.trottyzone.com/category/news-feed/' );
|
96 |
|
97 |
-
|
|
|
|
|
|
|
|
|
98 |
|
99 |
-
|
100 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
|
102 |
-
|
103 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
104 |
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
<
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
<
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
<
|
135 |
-
|
136 |
-
|
137 |
-
<
|
138 |
-
|
139 |
-
<input
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
<
|
148 |
-
|
149 |
-
<
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
<
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
<tbody>
|
163 |
-
<tr>
|
164 |
-
<input type="hidden" name="<?php echo $hidden_field_name; ?>" value="Y">
|
165 |
-
<td><?php _e('Last Name', 'woocommerce-checkout-manager'); ?></td>
|
166 |
-
<td><input name="wccs_settings[checkness][wccs_opt_2]" type="checkbox" class="rm" value="1" <?php echo (isset($options['checkness']['wccs_opt_2'])) ? "checked='checked'" : ""; ?> /></td>
|
167 |
-
<td><input name="wccs_settings[checkness][wccs_rq_2]" type="checkbox" class="rq" value="1" <?php echo (isset($options['checkness']['wccs_rq_2'])) ? "checked='checked'" : ""; ?> /></td>
|
168 |
-
<td><input type="text" name="wccs_settings[replace][label1]"
|
169 |
-
value="<?php echo esc_attr( $options['replace']['label1'] ); ?>" /></td>
|
170 |
-
<td><input type="text" name="wccs_settings[replace][placeholder1]"
|
171 |
-
value="<?php echo esc_attr( $options['replace']['placeholder1'] ); ?>" /></td>
|
172 |
-
</tr>
|
173 |
-
</tbody>
|
174 |
-
<tbody>
|
175 |
-
<tr>
|
176 |
-
<input type="hidden" name="<?php echo $hidden_field_name; ?>" value="Y">
|
177 |
-
<td><?php _e('Country', 'woocommerce-checkout-manager'); ?></td>
|
178 |
-
<td><input name="wccs_settings[checkness][wccs_opt_8]" type="checkbox" class="rm" value="1" <?php echo (isset($options['checkness']['wccs_opt_8'])) ? "checked='checked'" : ""; ?> /></td>
|
179 |
-
<td><input name="wccs_settings[checkness][wccs_rq_8]" type="checkbox" class="rq" value="1" <?php echo (isset($options['checkness']['wccs_rq_8'])) ? "checked='checked'" : ""; ?> /></td>
|
180 |
-
<td><input type="text" name="wccs_settings[replace][label2]"
|
181 |
-
value="<?php echo esc_attr( $options['replace']['label2'] ); ?>" /></td>
|
182 |
-
<td></td>
|
183 |
-
</tr>
|
184 |
-
</tbody>
|
185 |
-
<tbody>
|
186 |
-
<tr>
|
187 |
-
<input type="hidden" name="<?php echo $hidden_field_name; ?>" value="Y">
|
188 |
-
<td><?php _e('Phone', 'woocommerce-checkout-manager'); ?></td>
|
189 |
-
<td><input name="wccs_settings[checkness][wccs_opt_10]" type="checkbox" class="rm" value="1" <?php echo (isset($options['checkness']['wccs_opt_10'])) ? "checked='checked'" : ""; ?> /></td>
|
190 |
-
<td><input name="wccs_settings[checkness][wccs_rq_10]" type="checkbox" class="rq" value="1" <?php echo (isset($options['checkness']['wccs_rq_10'])) ? "checked='checked'" : ""; ?> /></td>
|
191 |
-
<td><input type="text" name="wccs_settings[replace][label3]"
|
192 |
-
value="<?php echo esc_attr( $options['replace']['label3'] ); ?>" /></td>
|
193 |
-
<td><input type="text" name="wccs_settings[replace][placeholder3]"
|
194 |
-
value="<?php echo esc_attr( $options['replace']['placeholder3'] ); ?>" /></td>
|
195 |
-
</tr>
|
196 |
-
</tbody>
|
197 |
-
<tbody>
|
198 |
-
<tr>
|
199 |
-
<input type="hidden" name="<?php echo $hidden_field_name; ?>" value="Y">
|
200 |
-
<td><?php _e('Email', 'woocommerce-checkout-manager'); ?></td>
|
201 |
-
<td><input name="wccs_settings[checkness][wccs_opt_11]" type="checkbox" class="rm" value="1" <?php echo (isset($options['checkness']['wccs_opt_11'])) ? "checked='checked'" : ""; ?> /></td>
|
202 |
-
<td><input name="wccs_settings[checkness][wccs_rq_11]" type="checkbox" class="rq" value="1" <?php echo (isset($options['checkness']['wccs_rq_11'])) ? "checked='checked'" : ""; ?> /></td>
|
203 |
-
<td><input type="text" name="wccs_settings[replace][label4]"
|
204 |
-
value="<?php echo esc_attr( $options['replace']['label4'] ); ?>" /></td>
|
205 |
-
<td><input type="text" name="wccs_settings[replace][placeholder4]"
|
206 |
-
value="<?php echo esc_attr( $options['replace']['placeholder4'] ); ?>" /></td>
|
207 |
-
</tr>
|
208 |
-
</tbody>
|
209 |
-
<tbody>
|
210 |
-
<tr>
|
211 |
-
<input type="hidden" name="<?php echo $hidden_field_name; ?>" value="Y">
|
212 |
-
<td><?php _e('Company', 'woocommerce-checkout-manager'); ?></td>
|
213 |
-
<td><input name="wccs_settings[checkness][wccs_opt_3]" type="checkbox" class="rm" value="1" <?php echo (isset($options['checkness']['wccs_opt_3'])) ? "checked='checked'" : ""; ?> /></td>
|
214 |
-
<td></td>
|
215 |
-
<td><input type="text" name="wccs_settings[replace][label5]"
|
216 |
-
value="<?php echo esc_attr( $options['replace']['label5'] ); ?>" /></td>
|
217 |
-
<td><input type="text" name="wccs_settings[replace][placeholder5]"
|
218 |
-
value="<?php echo esc_attr( $options['replace']['placeholder5'] ); ?>" /></td>
|
219 |
-
</tr>
|
220 |
-
</tbody>
|
221 |
-
<tbody>
|
222 |
-
<tr>
|
223 |
-
<input type="hidden" name="<?php echo $hidden_field_name; ?>" value="Y">
|
224 |
-
<td><?php _e('Order Notes', 'woocommerce-checkout-manager'); ?></td>
|
225 |
-
<td><input name="wccs_settings[checkness][wccs_opt_12]" type="checkbox" class="rm" value="1" <?php echo (isset($options['checkness']['wccs_opt_12'])) ? "checked='checked'" : ""; ?> /></td>
|
226 |
-
<td></td>
|
227 |
-
<td><input type="text" name="wccs_settings[replace][label11]"
|
228 |
-
value="<?php echo esc_attr( $options['replace']['label11'] ); ?>" /></td>
|
229 |
-
<td><input type="text" name="wccs_settings[replace][placeholder11]"
|
230 |
-
value="<?php echo esc_attr( $options['replace']['placeholder11'] ); ?>" /></td>
|
231 |
-
</tr>
|
232 |
-
</tbody>
|
233 |
-
<tbody>
|
234 |
-
<tr>
|
235 |
-
<input type="hidden" name="<?php echo $hidden_field_name; ?>" value="Y">
|
236 |
-
<td><?php _e('Address 1', 'woocommerce-checkout-manager'); ?></td>
|
237 |
-
<td><input name="wccs_settings[checkness][wccs_opt_4]" type="checkbox" class="rm" value="1" <?php echo (isset($options['checkness']['wccs_opt_4'])) ? "checked='checked'" : ""; ?></td>
|
238 |
-
<td></td>
|
239 |
-
<td></td>
|
240 |
-
<td></td>
|
241 |
-
</tr>
|
242 |
-
</tbody>
|
243 |
-
<tbody>
|
244 |
-
<tr>
|
245 |
-
<input type="hidden" name="<?php echo $hidden_field_name; ?>" value="Y">
|
246 |
-
<td><?php _e('Address 2', 'woocommerce-checkout-manager'); ?></td>
|
247 |
-
<td><input name="wccs_settings[checkness][wccs_opt_5]" type="checkbox" class="rm" value="1" <?php echo (isset($options['checkness']['wccs_opt_5'])) ? "checked='checked'" : ""; ?> /></td>
|
248 |
-
<td></td>
|
249 |
-
<td></td>
|
250 |
-
<td></td>
|
251 |
-
</tr>
|
252 |
-
</tbody>
|
253 |
-
<tbody>
|
254 |
-
<tr>
|
255 |
-
<input type="hidden" name="<?php echo $hidden_field_name; ?>" value="Y">
|
256 |
-
<td><?php _e('City', 'woocommerce-checkout-manager'); ?></td>
|
257 |
-
<td><input name="wccs_settings[checkness][wccs_opt_6]" type="checkbox" class="rm" value="1" <?php echo (isset($options['checkness']['wccs_opt_6'])) ? "checked='checked'" : ""; ?> /></td>
|
258 |
-
<td></td>
|
259 |
-
<td></td>
|
260 |
-
<td></td>
|
261 |
-
</tr>
|
262 |
-
</tbody>
|
263 |
-
<tbody>
|
264 |
-
<tr>
|
265 |
-
<input type="hidden" name="<?php echo $hidden_field_name; ?>" value="Y">
|
266 |
-
<td><?php _e('Postal Code', 'woocommerce-checkout-manager'); ?></td>
|
267 |
-
<td><input name="wccs_settings[checkness][wccs_opt_7]" type="checkbox" class="rm" value="1" <?php echo (isset($options['checkness']['wccs_opt_7'])) ? "checked='checked'" : ""; ?> /></td>
|
268 |
-
<td></td>
|
269 |
-
<td></td>
|
270 |
-
<td></td>
|
271 |
-
</tr>
|
272 |
-
</tbody>
|
273 |
-
<tbody>
|
274 |
-
<tr>
|
275 |
-
<input type="hidden" name="<?php echo $hidden_field_name; ?>" value="Y">
|
276 |
-
<td><?php _e('State', 'woocommerce-checkout-manager'); ?></td>
|
277 |
-
<td><input name="wccs_settings[checkness][wccs_opt_9]" type="checkbox" class="rm" value="1" <?php echo (isset($options['checkness']['wccs_opt_9'])) ? "checked='checked'" : ""; ?> /></td>
|
278 |
-
<td></td>
|
279 |
-
<td></td>
|
280 |
-
<td></td>
|
281 |
-
</tr>
|
282 |
-
</tbody>
|
283 |
-
<?php submit_button( __( 'Save Changes', 'woocommerce-checkout-manager' ) ); ?>
|
284 |
-
<div style="margin:5px 0 15px 10px;color:green;font-size:18px;float:left;">= <?php _e('Billing Section', 'woocommerce-checkout-manager'); ?> =</div>
|
285 |
-
</table>
|
286 |
-
<table class="widefat" border="1" >
|
287 |
-
<thead>
|
288 |
-
<tr>
|
289 |
-
<th><?php _e('Field Name', 'woocommerce-checkout-manager'); ?></th>
|
290 |
-
<th><?php _e('Remove Field Entirely', 'woocommerce-checkout-manager'); ?></th>
|
291 |
-
<th><?php _e('Remove Required Attribute', 'woocommerce-checkout-manager'); ?></th>
|
292 |
-
<th class="wccs_replace"><?php _e('Replace Label Name', 'woocommerce-checkout-manager'); ?></th>
|
293 |
-
<th class="wccs_replace"><?php _e('Replace Placeholder Name', 'woocommerce-checkout-manager'); ?></th>
|
294 |
-
</tr>
|
295 |
-
</thead>
|
296 |
-
<tbody>
|
297 |
-
<tr>
|
298 |
-
<input type="hidden" name="<?php echo $hidden_field_name; ?>" value="Y">
|
299 |
-
<td><strong><?php _e('Select All Check boxes in this Column', 'woocommerce-checkout-manager'); ?></strong></td>
|
300 |
-
<td><input name="wccs_settings[check][select_all_rm_s]" type="checkbox" id="select_all_rm_s" value="1" <?php echo (isset($options['check']['select_all_rm_s'])) ? "checked='checked'" : ""; ?> /></td>
|
301 |
-
<td><input name="wccs_settings[check][select_all_rq_s]" type="checkbox" id="select_all_rq_s" value="1" <?php echo (isset($options['check']['select_all_rq_s'])) ? "checked='checked'" : ""; ?> /></td>
|
302 |
-
<td></td>
|
303 |
-
<td></td>
|
304 |
-
</tr>
|
305 |
-
</tbody>
|
306 |
-
<tbody>
|
307 |
-
<tr>
|
308 |
-
<input type="hidden" name="<?php echo $hidden_field_name; ?>" value="Y">
|
309 |
-
<td><?php _e('First Name', 'woocommerce-checkout-manager'); ?></td>
|
310 |
-
<td><input name="wccs_settings[check][wccs_opt_1_s]" type="checkbox" class="rm_s" value="1"
|
311 |
-
<?php echo (isset($options['check']['wccs_opt_1_s'])) ? "checked='checked'" : ""; ?> /></td>
|
312 |
-
<td><input name="wccs_settings[check][wccs_rq_1_s]" type="checkbox" class="rq_s" value="1" <?php echo (isset($options['check']['wccs_rq_1_s'])) ? "checked='checked'" : ""; ?> /></td>
|
313 |
-
<td><input type="text" name="wccs_settings[replace][label_s]"
|
314 |
-
value="<?php echo esc_attr( $options['replace']['label_s'] ); ?>" /></td>
|
315 |
-
<td><input type="text" name="wccs_settings[replace][placeholder_s]"
|
316 |
-
value="<?php echo esc_attr( $options['replace']['placeholder_s'] ); ?>" /></td>
|
317 |
-
</tr>
|
318 |
-
</tbody>
|
319 |
-
<tbody>
|
320 |
-
<tr>
|
321 |
-
<input type="hidden" name="<?php echo $hidden_field_name; ?>" value="Y">
|
322 |
-
<td><?php _e('Last Name', 'woocommerce-checkout-manager'); ?></td>
|
323 |
-
<td><input name="wccs_settings[check][wccs_opt_2_s]" type="checkbox" class="rm_s" value="1" <?php echo (isset($options['check']['wccs_opt_2_s'])) ? "checked='checked'" : ""; ?> /></td>
|
324 |
-
<td><input name="wccs_settings[check][wccs_rq_2_s]" type="checkbox" class="rq_s" value="1" <?php echo (isset($options['check']['wccs_rq_2_s'])) ? "checked='checked'" : ""; ?> /></td>
|
325 |
-
<td><input type="text" name="wccs_settings[replace][label_s1]"
|
326 |
-
value="<?php echo esc_attr( $options['replace']['label_s1'] ); ?>" /></td>
|
327 |
-
<td><input type="text" name="wccs_settings[replace][placeholder_s1]"
|
328 |
-
value="<?php echo esc_attr( $options['replace']['placeholder_s1'] ); ?>" /></td>
|
329 |
-
</tr>
|
330 |
-
</tbody>
|
331 |
-
<tbody>
|
332 |
-
<tr>
|
333 |
-
<input type="hidden" name="<?php echo $hidden_field_name; ?>" value="Y">
|
334 |
-
<td><?php _e('Company', 'woocommerce-checkout-manager'); ?></td>
|
335 |
-
<td><input name="wccs_settings[check][wccs_opt_3_s]" type="checkbox" class="rm_s" value="1" <?php echo (isset($options['check']['wccs_opt_3_s'])) ? "checked='checked'" : ""; ?> /></td>
|
336 |
-
<td></td>
|
337 |
-
<td><input type="text" name="wccs_settings[replace][label_s2]"
|
338 |
-
value="<?php echo esc_attr( $options['replace']['label_s2'] ); ?>" /></td>
|
339 |
-
<td><input type="text" name="wccs_settings[replace][placeholder_s2]"
|
340 |
-
value="<?php echo esc_attr( $options['replace']['placeholder_s2'] ); ?>" /></td>
|
341 |
-
</tr>
|
342 |
-
</tbody>
|
343 |
-
<tbody>
|
344 |
-
<tr>
|
345 |
-
<input type="hidden" name="<?php echo $hidden_field_name; ?>" value="Y">
|
346 |
-
<td><?php _e('Country', 'woocommerce-checkout-manager'); ?></td>
|
347 |
-
<td><input name="wccs_settings[check][wccs_opt_8_s]" type="checkbox" class="rm_s" value="1" <?php echo (isset($options['check']['wccs_opt_8_s'])) ? "checked='checked'" : ""; ?> /></td>
|
348 |
-
<td></td>
|
349 |
-
<td><input type="text" name="wccs_settings[replace][label_s7]"
|
350 |
-
value="<?php echo esc_attr( $options['replace']['label_s7'] ); ?>" /></td>
|
351 |
-
<td></td>
|
352 |
-
</tr>
|
353 |
-
</tbody>
|
354 |
-
<tbody>
|
355 |
-
<tr>
|
356 |
-
<input type="hidden" name="<?php echo $hidden_field_name; ?>" value="Y">
|
357 |
-
<td><?php _e('Address 1', 'woocommerce-checkout-manager'); ?></td>
|
358 |
-
<td><input name="wccs_settings[check][wccs_opt_4_s]" type="checkbox" class="rm_s" value="1" <?php echo (isset($options['check']['wccs_opt_4_s'])) ? "checked='checked'" : ""; ?></td>
|
359 |
-
<td></td>
|
360 |
-
<td></td>
|
361 |
-
<td></td>
|
362 |
-
</tr>
|
363 |
-
</tbody>
|
364 |
-
<tbody>
|
365 |
-
<tr>
|
366 |
-
<input type="hidden" name="<?php echo $hidden_field_name; ?>" value="Y">
|
367 |
-
<td><?php _e('Address 2', 'woocommerce-checkout-manager'); ?></td>
|
368 |
-
<td><input name="wccs_settings[check][wccs_opt_5_s]" type="checkbox" class="rm_s" value="1" <?php echo (isset($options['check']['wccs_opt_5_s'])) ? "checked='checked'" : ""; ?> /></td>
|
369 |
-
<td></td>
|
370 |
-
<td></td>
|
371 |
-
<td></td>
|
372 |
-
</tr>
|
373 |
-
</tbody>
|
374 |
-
<tbody>
|
375 |
-
<tr>
|
376 |
-
<input type="hidden" name="<?php echo $hidden_field_name; ?>" value="Y">
|
377 |
-
<td><?php _e('City', 'woocommerce-checkout-manager'); ?></td>
|
378 |
-
<td><input name="wccs_settings[check][wccs_opt_6_s]" type="checkbox" class="rm_s" value="1" <?php echo (isset($options['check']['wccs_opt_6_s'])) ? "checked='checked'" : ""; ?> /></td>
|
379 |
-
<td></td>
|
380 |
-
<td></td>
|
381 |
-
<td></td>
|
382 |
-
</tr>
|
383 |
-
</tbody>
|
384 |
-
<tbody>
|
385 |
-
<tr>
|
386 |
-
<input type="hidden" name="<?php echo $hidden_field_name; ?>" value="Y">
|
387 |
-
<td><?php _e('Postal Code', 'woocommerce-checkout-manager'); ?></td>
|
388 |
-
<td><input name="wccs_settings[check][wccs_opt_7_s]" type="checkbox" class="rm_s" value="1" <?php echo (isset($options['check']['wccs_opt_7_s'])) ? "checked='checked'" : ""; ?> /></td>
|
389 |
-
<td></td>
|
390 |
-
<td></td>
|
391 |
-
<td></td>
|
392 |
-
</tr>
|
393 |
-
</tbody>
|
394 |
-
<tbody>
|
395 |
-
<tr>
|
396 |
-
<input type="hidden" name="<?php echo $hidden_field_name; ?>" value="Y">
|
397 |
-
<td><?php _e('State', 'woocommerce-checkout-manager'); ?></td>
|
398 |
-
<td><input name="wccs_settings[check][wccs_opt_9_s]" type="checkbox" class="rm_s" value="1" <?php echo (isset($options['check']['wccs_opt_9_s'])) ? "checked='checked'" : ""; ?> /></td>
|
399 |
-
<td></td>
|
400 |
-
<td></td>
|
401 |
-
<td></td>
|
402 |
-
</tr>
|
403 |
-
</tbody>
|
404 |
-
<div style="margin:20px 0 15px 10px;color:green;font-size:18px;float:left;">= <?php _e('Shipping Section', 'woocommerce-checkout-manager'); ?> =</div>
|
405 |
-
</table>
|
406 |
-
<div style="padding:5px 10px;font-weight:700;color:green;" class="clear_dwccm">
|
407 |
-
|
408 |
-
|
409 |
-
<div class="updated clear_wccm data">
|
410 |
-
<div class="clear_wccm title">
|
411 |
-
<a href="http://www.trottyzone.com/product/woocommerce-checkout-manager-pro/"><?php _e('TRY THE PRO VERSION', 'woocommerce-checkout-manager'); ?></a><br /><span class="small"><?php _e('includes these field types', 'woocommerce-checkout-manager'); ?></span> →
|
412 |
-
</div>
|
413 |
-
<ul>
|
414 |
-
<li><?php _e('Text Area', 'woocommerce-checkout-manager'); ?></li>
|
415 |
-
<li><?php _e('Password', 'woocommerce-checkout-manager'); ?></li>
|
416 |
-
<li><?php _e('Mult-Select', 'woocommerce-checkout-manager'); ?></li>
|
417 |
-
</ul>
|
418 |
-
<ul>
|
419 |
-
<li><?php _e('Radio Button (Unlimited Options)', 'woocommerce-checkout-manager'); ?></li>
|
420 |
-
<li><?php _e('Select Options (Unlimited Options)', 'woocommerce-checkout-manager'); ?></li>
|
421 |
-
<li><?php _e('Time Picker', 'woocommerce-checkout-manager'); ?></li>
|
422 |
-
</ul>
|
423 |
-
<ul>
|
424 |
-
<li><?php _e('Text/ Html Swapper', 'woocommerce-checkout-manager'); ?></li>
|
425 |
-
<li><?php _e('Color Picker', 'woocommerce-checkout-manager'); ?></li>
|
426 |
-
<li><?php _e('Heading', 'woocommerce-checkout-manager'); ?></li>
|
427 |
-
</ul>
|
428 |
-
<ul>
|
429 |
-
<li><?php _e('Check Box (Put your own options)', 'woocommerce-checkout-manager'); ?></li>
|
430 |
-
<li><strong><a href="http://www.trottyzone.com/product/woocommerce-checkout-manager-pro/"><?php _e('more features. . .', 'woocommerce-checkout-manager'); ?></a></strong></li>
|
431 |
-
</ul>
|
432 |
-
</div>
|
433 |
-
</div>
|
434 |
-
<div style="margin:20px 0 15px 10px;color:green;font-size:18px;float:left;">= <?php _e('Add New Field Section', 'woocommerce-checkout-manager'); ?> =</div>
|
435 |
-
<table class="widefat" border="1" >
|
436 |
-
<thead>
|
437 |
-
<tr>
|
438 |
-
<th><?php _e('Enable Title - Additional information', 'atc-menu'); ?></th>
|
439 |
-
<th>
|
440 |
-
<input style="float:left;" name="wccs_settings[checkness][checkbox12]" type="checkbox" value="true" <?php echo (isset($options['checkness']['checkbox12'])) ? "checked='checked'": ""; ?> /></th>
|
441 |
-
<th><?php _e('Checkout Page', 'atc-menu'); ?></th>
|
442 |
-
<th>
|
443 |
-
<input style="float:left;" name="wccs_settings[checkness][checkbox1]" type="checkbox" value="true" <?php echo (isset($options['checkness']['checkbox1'])) ? "checked='checked'": ""; ?> /></th>
|
444 |
-
<th><?php _e('Checkout Details and Email Receipt', 'atc-menu'); ?></th>
|
445 |
-
</tr>
|
446 |
-
</thead>
|
447 |
-
</table>
|
448 |
-
<style type="text/css">
|
449 |
-
.small {
|
450 |
-
font-size: 10px;
|
451 |
-
}
|
452 |
-
.wooccm_feed {
|
453 |
-
float: right;
|
454 |
-
margin-right: 10px;
|
455 |
-
font-size: 14px;
|
456 |
-
}
|
457 |
-
.wccs-clone {
|
458 |
-
display:none;
|
459 |
-
}
|
460 |
-
.clear_wccm {
|
461 |
-
float: left;
|
462 |
-
}
|
463 |
-
p.submit {
|
464 |
-
float: right;
|
465 |
-
padding: 0 !IMPORTANT;
|
466 |
-
margin: 0 !IMPORTANT;
|
467 |
-
}
|
468 |
-
.clear_wccm.title {
|
469 |
-
margin-top: 30px;
|
470 |
-
margin-right: 12px;
|
471 |
-
margin-left: 12px;
|
472 |
-
width: 14%;
|
473 |
-
}
|
474 |
-
.clear_wccm.data {
|
475 |
-
width: 97%;
|
476 |
-
}
|
477 |
-
.clear_wccm ul {
|
478 |
-
float: left;
|
479 |
-
padding: 0 32px;
|
480 |
-
list-style: square;
|
481 |
-
}
|
482 |
-
.widefat input {
|
483 |
-
float: right;
|
484 |
-
}
|
485 |
-
.wccs_replace {
|
486 |
-
width: 20%;
|
487 |
-
}
|
488 |
-
.wccs-order {
|
489 |
-
cursor:move;
|
490 |
-
}
|
491 |
-
.wccs-table > tbody > tr > td {
|
492 |
-
background: #fff;
|
493 |
-
border-right: 1px solid #ededed;
|
494 |
-
border-bottom: 1px solid #ededed;
|
495 |
-
padding: 8px;
|
496 |
-
position: relative;
|
497 |
-
}
|
498 |
-
.wccs-table > tbody > tr:last-child td { border-bottom: 0 none; }
|
499 |
-
.wccs-table > tbody > tr td:last-child { border-right: 0 none; }
|
500 |
-
.wccs-table > thead > tr > th { border-right: 1px solid #e1e1e1; }
|
501 |
-
.wccs-table > thead > tr > th:last-child { border-right: 0 none; }
|
502 |
-
.wccs-table tr td.wccs-order,
|
503 |
-
.wccs-table tr th.wccs-order {
|
504 |
-
width: 16px;
|
505 |
-
text-align: center;
|
506 |
-
vertical-align: middle;
|
507 |
-
color: #aaa;
|
508 |
-
text-shadow: #fff 0 1px 0;
|
509 |
-
}
|
510 |
-
.wccs-table .wccs-remove {
|
511 |
-
font-size: 16px;
|
512 |
-
font-weight: 700;
|
513 |
-
vertical-align: middle;
|
514 |
-
}
|
515 |
-
.wccs-table input[type="text"] {
|
516 |
-
width: 100%;
|
517 |
-
}
|
518 |
-
.wccs-table-footer {
|
519 |
-
position: relative;
|
520 |
-
overflow: hidden;
|
521 |
-
margin-top: 10px;
|
522 |
-
padding: 8px 0;
|
523 |
-
}
|
524 |
-
</style>
|
525 |
-
<table class="widefat wccs-table" border="1">
|
526 |
-
<thead>
|
527 |
-
<tr>
|
528 |
-
<th style="width:5%;" class="wccs-order" title="<?php esc_attr_e( 'Change order' , 'woocommerce-checkout-manager' ); ?>"></th>
|
529 |
-
<th><?php _e('Label' , 'woocommerce-checkout-manager' ); ?></th>
|
530 |
-
<th><?php _e('Placeholder' , 'woocommerce-checkout-manager' ); ?></th>
|
531 |
-
<th><?php _e('Option A' , 'woocommerce-checkout-manager' ); ?></th>
|
532 |
-
<th><?php _e('Options B' , 'woocommerce-checkout-manager' ); ?></th>
|
533 |
-
<th width="15%"><?php _e('Choose Type' , 'woocommerce-checkout-manager' ); ?></th>
|
534 |
-
<th width="10%"><?php _e('Abbreviation' , 'woocommerce-checkout-manager' ); ?></th>
|
535 |
-
<th width="9%"><?php _e('Required Attribute' , 'woocommerce-checkout-manager' ); ?></th>
|
536 |
-
<th scope="col" title="<?php esc_attr_e( 'Remove button', 'woocommerce-checkout-manager' ); ?>"><!-- remove --></th>
|
537 |
-
</tr>
|
538 |
-
</thead>
|
539 |
-
<tbody>
|
540 |
-
<?php
|
541 |
-
if ( isset ( $options['buttons'] ) ) :
|
542 |
-
// Loop through all the buttons
|
543 |
for ( $i = 0; $i < count( $options['buttons'] ); $i++ ) :
|
544 |
if ( ! isset( $options['buttons'][$i] ) )
|
545 |
-
break;
|
546 |
-
|
547 |
-
|
548 |
-
<td class="wccs-order" title="<?php esc_attr_e( 'Change order', 'woocommerce-checkout-manager' ); ?>"><?php echo $i + 1; ?></td>
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
<td>
|
563 |
-
<select name="wccs_settings[buttons][<?php echo $i; ?>][type]" > <!--Call run() function-->
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
</select>
|
569 |
-
</td>
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
<td
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
<
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
</
|
598 |
-
<
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
</
|
|
|
|
|
|
|
|
|
609 |
</form>
|
610 |
-
|
611 |
-
}
|
|
|
|
|
|
|
|
|
612 |
// Build array of links for rendering in installed plugins list
|
613 |
function wccs_admin_plugin_actions($links) {
|
614 |
$wccs_plugin_links = array(
|
615 |
-
'<a href="
|
616 |
-
'<a href="http://www.trottyzone.com/
|
617 |
);
|
618 |
return array_merge( $wccs_plugin_links, $links );
|
619 |
}
|
|
|
620 |
function wccs_scripts( $hook_suffix ) {
|
621 |
-
if ( $hook_suffix == '
|
622 |
-
|
|
|
623 |
if(!wp_script_is('jquery-ui-sortable', 'queue')){
|
624 |
wp_enqueue_script('jquery-ui-sortable');
|
625 |
-
|
626 |
}
|
627 |
}
|
628 |
-
|
629 |
-
|
630 |
-
function
|
631 |
-
$options = get_option( 'wccs_settings' );
|
632 |
-
if ( 1 == ($options['checkness']['wccs_opt_1'] ) )
|
633 |
-
unset($fields1['billing']['billing_first_name']);
|
634 |
-
return $fields1;
|
635 |
-
}
|
636 |
-
add_filter( 'woocommerce_checkout_fields' , 'wccs_override_checkout_fields1' );
|
637 |
-
function wccs_override_required_fields1( $address_fields1 ) {
|
638 |
$options = get_option( 'wccs_settings' );
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
}
|
643 |
-
|
644 |
-
// replace label and placeholder
|
645 |
-
function custom_replace_checkout_fields( $fields ) {
|
646 |
-
$options = get_option( 'wccs_settings' );
|
647 |
-
if ( ! empty( $options['replace']['placeholder'] ) )
|
648 |
$fields['billing']['billing_first_name']['placeholder'] = wpml_string_wccm($options['replace']['placeholder']);
|
649 |
-
return $fields;
|
650 |
}
|
651 |
-
|
652 |
-
function custom_replace_checkout_fieldsa( $fields ) {
|
653 |
-
$options = get_option( 'wccs_settings' );
|
654 |
-
if ( ! empty( $options['replace']['label'] ) )
|
655 |
$fields['billing']['billing_first_name']['label'] = wpml_string_wccm($options['replace']['label']);
|
656 |
-
return $fields;
|
657 |
}
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
unset($fields2['billing']['billing_last_name']);
|
664 |
-
return $fields2;
|
665 |
}
|
666 |
-
|
667 |
-
|
668 |
-
$options = get_option( 'wccs_settings' );
|
669 |
-
if ( 1 == ($options['checkness']['wccs_rq_2'] ) )
|
670 |
-
$address_fields2['billing_last_name']['required'] = false;
|
671 |
-
return $address_fields2;
|
672 |
}
|
673 |
-
|
674 |
-
|
675 |
-
function custom_replace_checkout_fields1( $fields ) {
|
676 |
-
$options = get_option( 'wccs_settings' );
|
677 |
-
if ( ! empty( $options['replace']['placeholder1'] ) )
|
678 |
-
$fields['billing']['billing_last_name']['placeholder'] = wpml_string_wccm($options['replace']['placeholder1']);
|
679 |
-
return $fields;
|
680 |
}
|
681 |
-
|
682 |
-
|
683 |
-
$options = get_option( 'wccs_settings' );
|
684 |
-
if ( ! empty( $options['replace']['label1'] ) )
|
685 |
-
$fields['billing']['billing_last_name']['label'] = wpml_string_wccm($options['replace']['label1']);
|
686 |
-
return $fields;
|
687 |
}
|
688 |
-
|
689 |
-
|
690 |
-
function wccs_override_checkout_fields3($fields3) {
|
691 |
-
$options = get_option( 'wccs_settings' );
|
692 |
-
if ( 1 == ($options['checkness']['wccs_opt_3'] ) )
|
693 |
-
unset($fields3['billing']['billing_company']);
|
694 |
-
return $fields3;
|
695 |
}
|
696 |
-
|
697 |
-
|
698 |
-
function custom_replace_checkout_fields2( $fields ) {
|
699 |
-
$options = get_option( 'wccs_settings' );
|
700 |
-
if ( ! empty( $options['replace']['placeholder2'] ) )
|
701 |
-
$fields['billing']['billing_company']['placeholder'] = wpml_string_wccm($options['replace']['placeholder2']);
|
702 |
-
return $fields;
|
703 |
}
|
704 |
-
|
705 |
-
|
706 |
-
$options = get_option( 'wccs_settings' );
|
707 |
-
if ( ! empty( $options['replace']['label5'] ) )
|
708 |
-
$fields['billing']['billing_company']['label'] = wpml_string_wccm($options['replace']['label5']);
|
709 |
-
return $fields;
|
710 |
}
|
711 |
-
|
712 |
-
|
713 |
-
function wccs_override_checkout_fields4($fields4) {
|
714 |
-
$options = get_option( 'wccs_settings' );
|
715 |
-
if ( 1 == ($options['checkness']['wccs_opt_4'] ) )
|
716 |
-
unset($fields4['billing']['billing_address_1']);
|
717 |
-
return $fields4;
|
718 |
}
|
719 |
-
|
720 |
-
|
721 |
-
function wccs_override_checkout_fields5($fields5) {
|
722 |
-
$options = get_option( 'wccs_settings' );
|
723 |
-
if ( 1 == ($options['checkness']['wccs_opt_5'] ) )
|
724 |
-
unset($fields5['billing']['billing_address_2']);
|
725 |
-
return $fields5;
|
726 |
-
}
|
727 |
-
add_filter( 'woocommerce_checkout_fields' , 'wccs_override_checkout_fields5' );
|
728 |
-
// ============= City ================
|
729 |
-
function wccs_override_checkout_fields6($fields6) {
|
730 |
-
$options = get_option( 'wccs_settings' );
|
731 |
-
if ( 1 == ($options['checkness']['wccs_opt_6'] ) )
|
732 |
-
unset($fields6['billing']['billing_city']);
|
733 |
-
return $fields6;
|
734 |
}
|
735 |
-
|
736 |
-
|
737 |
-
function wccs_override_checkout_fields7($fields7) {
|
738 |
-
$options = get_option( 'wccs_settings' );
|
739 |
-
if ( 1 == ($options['checkness']['wccs_opt_7'] ) )
|
740 |
-
unset($fields7['billing']['billing_postcode']);
|
741 |
-
return $fields7;
|
742 |
}
|
743 |
-
|
744 |
-
|
745 |
-
function wccs_override_checkout_fields8($fields8) {
|
746 |
-
$options = get_option( 'wccs_settings' );
|
747 |
-
if ( 1 == ($options['checkness']['wccs_opt_8'] ) )
|
748 |
-
unset($fields8['billing']['billing_country']);
|
749 |
-
return $fields8;
|
750 |
}
|
751 |
-
|
752 |
-
|
753 |
-
$options = get_option( 'wccs_settings' );
|
754 |
-
if ( 1 == ($options['checkness']['wccs_rq_8'] ) )
|
755 |
-
$address_fields8['billing_country']['required'] = false;
|
756 |
-
return $address_fields8;
|
757 |
}
|
758 |
-
|
759 |
-
function custom_replace_checkout_fieldsh( $fields ) {
|
760 |
-
$options = get_option( 'wccs_settings' );
|
761 |
-
if ( ! empty( $options['replace']['label2'] ) )
|
762 |
$fields['billing']['billing_country']['label'] = wpml_string_wccm($options['replace']['label2']);
|
763 |
-
return $fields;
|
764 |
-
}
|
765 |
-
add_filter( 'woocommerce_checkout_fields' , 'custom_replace_checkout_fieldsh' );
|
766 |
-
// ================= State ===================
|
767 |
-
function wccs_override_checkout_fields9($fields9) {
|
768 |
-
$options = get_option( 'wccs_settings' );
|
769 |
-
if ( 1 == ($options['checkness']['wccs_opt_9'] ) )
|
770 |
-
unset($fields9['billing']['billing_state']);
|
771 |
-
return $fields9;
|
772 |
-
}
|
773 |
-
add_filter( 'woocommerce_checkout_fields' , 'wccs_override_checkout_fields9' );
|
774 |
-
// =============== Phone ======================
|
775 |
-
function wccs_override_checkout_fields10($fields10) {
|
776 |
-
$options = get_option( 'wccs_settings' );
|
777 |
-
if ( 1 == ($options['checkness']['wccs_opt_10'] ) )
|
778 |
-
unset($fields10['billing']['billing_phone']);
|
779 |
-
return $fields10;
|
780 |
-
}
|
781 |
-
add_filter( 'woocommerce_checkout_fields' , 'wccs_override_checkout_fields10' );
|
782 |
-
function wccs_override_required_fields10( $address_fields10 ) {
|
783 |
-
$options = get_option( 'wccs_settings' );
|
784 |
-
if ( 1 == ($options['checkness']['wccs_rq_10'] ) )
|
785 |
-
$address_fields10['billing_phone']['required'] = false;
|
786 |
-
return $address_fields10;
|
787 |
}
|
788 |
-
|
789 |
-
// replace label and placeholder
|
790 |
-
function custom_replace_checkout_fields9( $fields ) {
|
791 |
-
$options = get_option( 'wccs_settings' );
|
792 |
-
if ( ! empty( $options['replace']['placeholder3'] ) )
|
793 |
$fields['billing']['billing_phone']['placeholder'] = wpml_string_wccm($options['replace']['placeholder3']);
|
794 |
-
return $fields;
|
795 |
}
|
796 |
-
|
797 |
-
function custom_replace_checkout_fieldsj( $fields ) {
|
798 |
-
$options = get_option( 'wccs_settings' );
|
799 |
-
if ( ! empty( $options['replace']['label3'] ) )
|
800 |
$fields['billing']['billing_phone']['label'] = wpml_string_wccm($options['replace']['label3']);
|
801 |
-
return $fields;
|
802 |
}
|
803 |
-
|
804 |
-
|
805 |
-
function wccs_override_checkout_fields11($fields11) {
|
806 |
-
$options = get_option( 'wccs_settings' );
|
807 |
-
if ( 1 == ($options['checkness']['wccs_opt_11'] ) )
|
808 |
-
unset($fields11['billing']['billing_email']);
|
809 |
-
return $fields11;
|
810 |
}
|
811 |
-
|
812 |
-
function wccs_override_required_fields11( $address_fields11 ) {
|
813 |
-
$options = get_option( 'wccs_settings' );
|
814 |
-
if ( 1 == ($options['checkness']['wccs_rq_11'] ) )
|
815 |
-
$address_fields11['billing_email']['required'] = false;
|
816 |
-
return $address_fields11;
|
817 |
-
}
|
818 |
-
add_filter( 'woocommerce_billing_fields', 'wccs_override_required_fields11', 10, 1 );
|
819 |
-
// replace label and placeholder
|
820 |
-
function custom_replace_checkout_fields10( $fields ) {
|
821 |
-
$options = get_option( 'wccs_settings' );
|
822 |
-
if ( ! empty( $options['replace']['placeholder4'] ) )
|
823 |
$fields['billing']['billing_email']['placeholder'] = wpml_string_wccm($options['replace']['placeholder4']);
|
824 |
-
return $fields;
|
825 |
}
|
826 |
-
|
827 |
-
function custom_replace_checkout_fieldsk( $fields ) {
|
828 |
-
$options = get_option( 'wccs_settings' );
|
829 |
-
if ( ! empty( $options['replace']['label4'] ) )
|
830 |
$fields['billing']['billing_email']['label'] = wpml_string_wccm($options['replace']['label4']);
|
831 |
-
return $fields;
|
832 |
}
|
833 |
-
|
834 |
-
|
835 |
-
function wccs_override_checkout_fields12($fields12) {
|
836 |
-
$options = get_option( 'wccs_settings' );
|
837 |
-
if ( 1 == ($options['checkness']['wccs_opt_12'] ) )
|
838 |
-
unset($fields12['order']['order_comments']);
|
839 |
-
return $fields12;
|
840 |
}
|
841 |
-
|
842 |
-
// replace label and placeholder
|
843 |
-
function custom_replace_checkout_fields11( $fields ) {
|
844 |
-
$options = get_option( 'wccs_settings' );
|
845 |
-
if ( ! empty( $options['replace']['placeholder11'] ) )
|
846 |
$fields['order']['order_comments']['placeholder'] = wpml_string_wccm($options['replace']['placeholder11']);
|
847 |
-
return $fields;
|
848 |
}
|
849 |
-
|
850 |
-
function custom_replace_checkout_fieldsl( $fields ) {
|
851 |
-
$options = get_option( 'wccs_settings' );
|
852 |
-
if ( ! empty( $options['replace']['label11'] ) )
|
853 |
$fields['order']['order_comments']['label'] = wpml_string_wccm($options['replace']['label11']);
|
854 |
-
return $fields;
|
855 |
}
|
856 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
857 |
function wccs_add_title() {
|
858 |
$options = get_option( 'wccs_settings' );
|
859 |
-
if (true == ($options['checkness']['checkbox12']) )
|
860 |
-
echo '<div class="add_info_wccs"><br><h3>' . __( 'Additional information', 'woocommerce-checkout-manager' ) . '</h3></div>';
|
861 |
}
|
862 |
-
|
|
|
|
|
863 |
// =============== Add the field to the checkout =====================
|
864 |
function wccs_custom_checkout_field( $checkout ) {
|
865 |
$options = get_option( 'wccs_settings' );
|
866 |
-
if ( count( $options['buttons'] ) > 0 ) :
|
867 |
-
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
-
|
872 |
-
|
873 |
-
|
874 |
-
|
875 |
-
|
876 |
-
|
877 |
-
|
878 |
-
|
879 |
-
|
880 |
-
|
881 |
-
|
882 |
-
|
883 |
-
|
884 |
-
|
885 |
-
|
886 |
-
|
887 |
-
|
888 |
-
|
889 |
-
|
890 |
-
|
891 |
-
|
892 |
-
|
893 |
-
|
894 |
-
|
895 |
-
|
896 |
-
|
897 |
-
|
898 |
-
|
899 |
-
|
900 |
-
|
901 |
-
|
902 |
-
|
903 |
-
|
904 |
-
|
905 |
-
|
906 |
-
|
907 |
-
|
908 |
-
|
909 |
-
|
910 |
-
|
911 |
-
|
912 |
-
|
913 |
-
|
914 |
-
|
915 |
-
|
916 |
-
|
917 |
-
|
918 |
-
'required' => $btn['checkbox'],
|
919 |
-
'placeholder' => wpml_string_wccm(''.$btn['placeholder'].''),
|
920 |
-
), $checkout->get_value( ''.$btn['cow'].'' ));
|
921 |
-
}
|
922 |
-
?>
|
923 |
-
<?php
|
924 |
-
$i++;
|
925 |
-
endforeach;
|
926 |
-
?>
|
927 |
-
<?php
|
928 |
endif;
|
929 |
}
|
930 |
-
|
|
|
931 |
// ============================== Update the order meta with field value ==============================
|
932 |
function wccs_custom_checkout_field_update_order_meta( $order_id ) {
|
933 |
$options = get_option( 'wccs_settings' );
|
934 |
-
if ( count( $options['buttons'] ) > 0 ) :
|
935 |
-
|
936 |
-
|
937 |
-
|
938 |
-
|
939 |
-
|
940 |
-
|
941 |
-
update_post_meta( $order_id, ''.$btn['label'].'' , esc_attr( $_POST[ ''.$btn['cow'].'' ] ));
|
942 |
-
$i++;
|
943 |
-
endforeach;
|
944 |
-
endif;
|
945 |
}
|
946 |
-
|
947 |
// =============== Add to email (working) =====================
|
948 |
add_filter('woocommerce_email_order_meta_keys', 'wccs_custom_checkout_field_order_meta_keys');
|
949 |
function wccs_custom_checkout_field_order_meta_keys( $keys ) {
|
950 |
$options = get_option( 'wccs_settings' );
|
951 |
-
if ( count( $options['buttons'] ) > 0 ) :
|
952 |
-
|
953 |
-
|
954 |
-
|
955 |
-
|
956 |
-
|
957 |
-
|
958 |
-
$i++;
|
959 |
-
endforeach;
|
960 |
-
return $keys;
|
961 |
-
endif;
|
962 |
}
|
|
|
|
|
963 |
// ================ Style the Email =======================
|
964 |
-
add_action('woocommerce_email_after_order_table', 'wccs_custom_style_checkout_email');
|
965 |
function wccs_custom_style_checkout_email() {
|
966 |
$options = get_option( 'wccs_settings' );
|
967 |
-
if (true == ($options['checkness']['checkbox1']) )
|
968 |
-
echo '<h2>' . __( 'Additional information', 'woocommerce-checkout-manager' ) . '</h2>';
|
969 |
}
|
|
|
|
|
970 |
// ============== Process the checkout (if needed activate) ==================
|
971 |
function wccs_custom_checkout_field_process() {
|
|
|
972 |
$options = get_option( 'wccs_settings' );
|
973 |
-
if ( count( $options['buttons'] ) > 0 ) :
|
974 |
-
|
975 |
-
|
976 |
-
|
977 |
-
|
978 |
-
|
979 |
-
if ( (!$_POST[ ''.$btn['cow'].'' ] ) && (true == ($btn['checkbox']) ) )
|
980 |
-
$woocommerce->add_error( '<strong>'.$btn['label'].'</strong> '. __('is a required field', 'woocommerce-checkout-manager' ) . ' ');
|
981 |
-
$i++;
|
982 |
-
endforeach;
|
983 |
-
endif;
|
984 |
-
}
|
985 |
-
add_action('woocommerce_checkout_process', 'wccs_custom_checkout_field_process');
|
986 |
-
function wccs_options_validatew() {
|
987 |
-
$options = get_option( 'wccs_settings' );
|
988 |
-
if ( empty( $options['replace']['label'] ) )
|
989 |
-
unset( $options['replace']['label'] );
|
990 |
}
|
|
|
991 |
function wccs_options_validate( $input ) {
|
992 |
$options = get_option( 'wccs_settings' );
|
993 |
-
|
994 |
foreach( $input['buttons'] as $i => $btn ) :
|
995 |
|
996 |
-
if( function_exists( 'icl_register_string' ) ) {
|
997 |
-
|
998 |
-
|
999 |
-
|
1000 |
-
|
1001 |
-
|
1002 |
-
|
1003 |
-
|
1004 |
-
|
1005 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1006 |
endforeach;
|
1007 |
|
|
|
1008 |
foreach( $input['replace'] as $type => $value ) :
|
1009 |
if( function_exists( 'icl_register_string' ) ) {
|
1010 |
if(!empty($value) && $value!=''){
|
1011 |
icl_register_string('WooCommerce Checkout Manager', ''.$value.'', ''.$value.'');
|
1012 |
}
|
1013 |
}
|
1014 |
-
if ( empty( $btn['label'] ) )
|
1015 |
-
unset( $input['buttons'][$i], $btn );
|
1016 |
endforeach;
|
1017 |
|
|
|
1018 |
|
1019 |
$input['buttons'] = array_values( $input['buttons'] );
|
1020 |
return $input;
|
1021 |
}
|
|
|
|
|
|
|
1022 |
function wccs_custom_checkout_details( $order_id ) {
|
1023 |
$options = get_option( 'wccs_settings' );
|
1024 |
-
|
1025 |
-
|
1026 |
-
|
1027 |
-
|
1028 |
-
|
1029 |
-
|
1030 |
-
|
1031 |
-
|
1032 |
-
|
1033 |
-
|
1034 |
-
$i++;
|
1035 |
-
endforeach;
|
1036 |
-
endif;
|
1037 |
-
}
|
1038 |
-
add_action('woocommerce_order_details_after_order_table', 'wccs_custom_checkout_details');
|
1039 |
-
// ================== First Name ===================
|
1040 |
-
function wccs_shipping_checkout_fields1( $fields1 ) {
|
1041 |
-
$options = get_option( 'wccs_settings' );
|
1042 |
-
if ( 1 == ($options['check']['wccs_opt_1_s'] ) )
|
1043 |
-
unset($fields1['shipping']['shipping_first_name']);
|
1044 |
-
return $fields1;
|
1045 |
-
}
|
1046 |
-
add_filter( 'woocommerce_checkout_fields' , 'wccs_shipping_checkout_fields1' );
|
1047 |
-
function wccs_shipping_required_fields1( $address_fields1 ) {
|
1048 |
-
$options = get_option( 'wccs_settings' );
|
1049 |
-
if ( 1 == ($options['check']['wccs_rq_1_s'] ) )
|
1050 |
-
$address_fields1['shipping_first_name']['required'] = false;
|
1051 |
-
return $address_fields1;
|
1052 |
-
}
|
1053 |
-
add_filter( 'woocommerce_shipping_fields', 'wccs_shipping_required_fields1', 10, 1 );
|
1054 |
-
// replace label and placeholder
|
1055 |
-
function custom_replace_checkout_fieldss( $fields ) {
|
1056 |
-
$options = get_option( 'wccs_settings' );
|
1057 |
-
if ( ! empty( $options['replace']['placeholder_s'] ) )
|
1058 |
-
$fields['shipping']['shipping_first_name']['placeholder'] = wpml_string_wccm($options['replace']['placeholder_s']);
|
1059 |
-
return $fields;
|
1060 |
-
}
|
1061 |
-
add_filter( 'woocommerce_checkout_fields' , 'custom_replace_checkout_fieldss' );
|
1062 |
-
function custom_replace_checkout_fieldssa( $fields ) {
|
1063 |
-
$options = get_option( 'wccs_settings' );
|
1064 |
-
if ( ! empty( $options['replace']['label_s'] ) )
|
1065 |
-
$fields['shipping']['shipping_first_name']['label'] = wpml_string_wccm($options['replace']['label_s']);
|
1066 |
-
return $fields;
|
1067 |
-
}
|
1068 |
-
add_filter( 'woocommerce_checkout_fields' , 'custom_replace_checkout_fieldssa' );
|
1069 |
-
// ========== Last Name ==============
|
1070 |
-
function wccs_shipping_checkout_fields2( $fields2 ) {
|
1071 |
-
$options = get_option( 'wccs_settings' );
|
1072 |
-
if ( 1 == ($options['check']['wccs_opt_2_s'] ) )
|
1073 |
-
unset($fields2['shipping']['shipping_last_name']);
|
1074 |
-
return $fields2;
|
1075 |
-
}
|
1076 |
-
add_filter( 'woocommerce_checkout_fields' , 'wccs_shipping_checkout_fields2' );
|
1077 |
-
function wccs_shipping_required_fields2( $address_fields2 ) {
|
1078 |
-
$options = get_option( 'wccs_settings' );
|
1079 |
-
if ( 1 == ($options['check']['wccs_rq_2_s'] ) )
|
1080 |
-
$address_fields2['shipping_last_name']['required'] = false;
|
1081 |
-
return $address_fields2;
|
1082 |
-
}
|
1083 |
-
add_filter( 'woocommerce_shipping_fields', 'wccs_shipping_required_fields2', 10, 1 );
|
1084 |
-
// replace label and placeholder
|
1085 |
-
function custom_replace_checkout_fieldss1( $fields ) {
|
1086 |
-
$options = get_option( 'wccs_settings' );
|
1087 |
-
if ( ! empty( $options['replace']['placeholder_s1'] ) )
|
1088 |
-
$fields['shipping']['shipping_last_name']['placeholder'] = wpml_string_wccm($options['replace']['placeholder_s1']);
|
1089 |
-
return $fields;
|
1090 |
-
}
|
1091 |
-
add_filter( 'woocommerce_checkout_fields' , 'custom_replace_checkout_fieldss1' );
|
1092 |
-
function custom_replace_checkout_fieldssb( $fields ) {
|
1093 |
-
$options = get_option( 'wccs_settings' );
|
1094 |
-
if ( ! empty( $options['replace']['label_s1'] ) )
|
1095 |
-
$fields['shipping']['shipping_last_name']['label'] = wpml_string_wccm($options['replace']['label_s1']);
|
1096 |
-
return $fields;
|
1097 |
-
}
|
1098 |
-
add_filter( 'woocommerce_checkout_fields' , 'custom_replace_checkout_fieldssb' );
|
1099 |
-
// ============ Company ==============
|
1100 |
-
function wccs_shipping_checkout_fields3( $fields3 ) {
|
1101 |
-
$options = get_option( 'wccs_settings' );
|
1102 |
-
if ( 1 == ($options['check']['wccs_opt_3_s'] ) )
|
1103 |
-
unset($fields3['shipping']['shipping_company']);
|
1104 |
-
return $fields3;
|
1105 |
-
}
|
1106 |
-
add_filter( 'woocommerce_checkout_fields' , 'wccs_shipping_checkout_fields3' );
|
1107 |
-
// replace label and placeholder
|
1108 |
-
function custom_replace_checkout_fieldss2( $fields ) {
|
1109 |
-
$options = get_option( 'wccs_settings' );
|
1110 |
-
if ( ! empty( $options['replace']['placeholder_s2'] ) )
|
1111 |
-
$fields['shipping']['shipping_company']['placeholder'] = wpml_string_wccm($options['replace']['placeholder_s2']);
|
1112 |
-
return $fields;
|
1113 |
-
}
|
1114 |
-
add_filter( 'woocommerce_checkout_fields' , 'custom_replace_checkout_fieldss2' );
|
1115 |
-
function custom_replace_checkout_fieldssc( $fields ) {
|
1116 |
-
$options = get_option( 'wccs_settings' );
|
1117 |
-
if ( ! empty( $options['replace']['label_s2'] ) )
|
1118 |
-
$fields['shipping']['shipping_company']['label'] = wpml_string_wccm($options['replace']['label_s2']);
|
1119 |
-
return $fields;
|
1120 |
-
}
|
1121 |
-
add_filter( 'woocommerce_checkout_fields' , 'custom_replace_checkout_fieldssc' );
|
1122 |
-
// Hook in
|
1123 |
-
add_filter( 'woocommerce_checkout_fields' , 'b1_custom_override_checkout_fields' );
|
1124 |
-
// Our hooked in function - $fields is passed via the filter!
|
1125 |
-
function b1_custom_override_checkout_fields( $fields ) {
|
1126 |
-
$options = get_option( 'wccs_settings' );
|
1127 |
-
if ( 1 == ($options['check']['wccs_opt_4_s'] ) )
|
1128 |
-
unset($fields['shipping']['shipping_address_1']);
|
1129 |
-
return $fields;
|
1130 |
-
}
|
1131 |
-
// Hook in
|
1132 |
-
add_filter( 'woocommerce_checkout_fields' , 'b2_custom_override_checkout_fields' );
|
1133 |
-
// Our hooked in function - $fields is passed via the filter!
|
1134 |
-
function b2_custom_override_checkout_fields( $fields ) {
|
1135 |
-
$options = get_option( 'wccs_settings' );
|
1136 |
-
if ( 1 == ($options['check']['wccs_opt_5_s'] ) )
|
1137 |
-
unset($fields['shipping']['shipping_address_2']);
|
1138 |
-
return $fields;
|
1139 |
-
}
|
1140 |
-
// Hook in
|
1141 |
-
add_filter( 'woocommerce_checkout_fields' , 'c_custom_override_checkout_fields' );
|
1142 |
-
// Our hooked in function - $fields is passed via the filter!
|
1143 |
-
function c_custom_override_checkout_fields( $fields ) {
|
1144 |
-
$options = get_option( 'wccs_settings' );
|
1145 |
-
if ( 1 == ($options['check']['wccs_opt_6_s'] ) )
|
1146 |
-
unset($fields['shipping']['shipping_city']);
|
1147 |
-
return $fields;
|
1148 |
-
}
|
1149 |
-
// Hook in
|
1150 |
-
add_filter( 'woocommerce_checkout_fields' , 'sp_custom_override_checkout_fields' );
|
1151 |
-
// Our hooked in function - $fields is passed via the filter!
|
1152 |
-
function sp_custom_override_checkout_fields( $fields ) {
|
1153 |
-
$options = get_option( 'wccs_settings' );
|
1154 |
-
if ( 1 == ($options['check']['wccs_opt_7_s'] ) )
|
1155 |
-
unset($fields['shipping']['shipping_postcode']);
|
1156 |
-
return $fields;
|
1157 |
-
}
|
1158 |
-
// =================== Shipping Country ======================
|
1159 |
-
// Hook in
|
1160 |
-
add_filter( 'woocommerce_checkout_fields' , 'sc_custom_override_checkout_fields' );
|
1161 |
-
// Our hooked in function - $fields is passed via the filter!
|
1162 |
-
function sc_custom_override_checkout_fields( $fields ) {
|
1163 |
-
$options = get_option( 'wccs_settings' );
|
1164 |
-
if ( 1 == ($options['check']['wccs_opt_8_s'] ) )
|
1165 |
-
unset($fields['shipping']['shipping_country']);
|
1166 |
-
return $fields;
|
1167 |
-
}
|
1168 |
-
// replace label and placeholder
|
1169 |
-
function custom_replace_checkout_fieldssd( $fields ) {
|
1170 |
-
$options = get_option( 'wccs_settings' );
|
1171 |
-
if ( ! empty( $options['replace']['label_s7'] ) )
|
1172 |
-
$fields['shipping']['shipping_country']['label'] = wpml_string_wccm($options['replace']['label_s7']);
|
1173 |
-
return $fields;
|
1174 |
-
}
|
1175 |
-
add_filter( 'woocommerce_checkout_fields' , 'custom_replace_checkout_fieldssd' );
|
1176 |
-
// Hook in
|
1177 |
-
add_filter( 'woocommerce_checkout_fields' , 'ss_custom_override_checkout_fields' );
|
1178 |
-
// Our hooked in function - $fields is passed via the filter!
|
1179 |
-
function ss_custom_override_checkout_fields( $fields ) {
|
1180 |
-
$options = get_option( 'wccs_settings' );
|
1181 |
-
if ( 1 == ($options['check']['wccs_opt_9_s'] ) )
|
1182 |
-
unset($fields['shipping']['shipping_state']);
|
1183 |
-
return $fields;
|
1184 |
}
|
|
|
|
|
1185 |
function display_front_wccs() {
|
1186 |
echo '<style type="text/css">
|
1187 |
-
.wccs-field-class {
|
1188 |
-
float:left;
|
1189 |
-
width: 47%;
|
1190 |
-
}
|
1191 |
-
.wccs-field-class:nth-child(2n+2) {
|
1192 |
-
padding-right: 3.4% !important;
|
1193 |
-
}
|
1194 |
-
.add_info_wccs {
|
1195 |
-
clear: both;
|
1196 |
-
}
|
1197 |
-
</style>';
|
1198 |
}
|
1199 |
-
add_action('wp_head','display_front_wccs');
|
1200 |
-
|
1201 |
-
add_filter( 'wp_feed_cache_transient_lifetime', create_function('$a', 'return 1800;') );
|
1202 |
-
|
1203 |
|
|
|
1204 |
function wccm_woocommerce_delivery_notes_compat( $fields, $order ) {
|
1205 |
-
|
1206 |
-
|
1207 |
-
|
1208 |
-
|
1209 |
-
if ( count( $options['buttons'] ) > 0 ) :
|
1210 |
-
$i = 0;
|
1211 |
-
// Loop through each button
|
1212 |
-
foreach ( $options['buttons'] as $btn ) :
|
1213 |
-
|
1214 |
-
|
1215 |
-
if( get_post_meta( $order->id, ''.$btn['label'].'', true ) ) {
|
1216 |
-
$new_fields[''.$btn['cow'].''] = array(
|
1217 |
-
'label' => ''.wpml_string_wccm($btn['label']).'',
|
1218 |
-
'value' => get_post_meta( $order->id, ''.$btn['label'].'', true )
|
1219 |
-
);
|
1220 |
-
}
|
1221 |
|
1222 |
-
$
|
1223 |
-
|
1224 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1225 |
|
1226 |
-
|
1227 |
}
|
1228 |
-
add_filter( 'wcdn_order_info_fields', 'wccm_woocommerce_delivery_notes_compat', 10, 2 );
|
1229 |
|
|
|
1230 |
function wpml_string_wccm($input) {
|
1231 |
-
|
1232 |
-
|
1233 |
-
|
1234 |
-
|
1235 |
-
|
1236 |
-
}
|
1237 |
-
|
1238 |
}
|
3 |
Plugin Name: WooCommerce Checkout Manager
|
4 |
Plugin URI: http://www.trottyzone.com/product/woocommerce-checkout-manager-pro
|
5 |
Description: Manages WooCommerce Checkout fields
|
6 |
+
Version: 3.6.6
|
7 |
Author: Ephrain Marchan
|
8 |
Author URI: http://www.trottyzone.com
|
9 |
License: GPLv2 or later
|
21 |
along with this program; if not, write to the Free Software
|
22 |
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
23 |
*/
|
24 |
+
|
25 |
+
if ( ! defined( 'ABSPATH' ) ) die();
|
26 |
+
|
27 |
load_plugin_textdomain('woocommerce-checkout-manager', false, dirname(plugin_basename(__FILE__)) . '/languages/');
|
28 |
+
|
29 |
+
|
30 |
+
register_activation_hook( __FILE__, 'wccs_install' );
|
31 |
+
add_filter( 'wp_feed_cache_transient_lifetime', create_function('$a', 'return 1800;') );
|
32 |
+
add_filter( 'wcdn_order_info_fields', 'wccm_woocommerce_delivery_notes_compat', 10, 2 );
|
33 |
+
add_action( 'admin_enqueue_scripts', 'wccs_scripts' );
|
34 |
+
add_action('woocommerce_after_checkout_billing_form', 'wccs_add_title');
|
35 |
+
add_action('woocommerce_after_checkout_billing_form', 'wccs_custom_checkout_field');
|
36 |
+
add_action('woocommerce_checkout_update_order_meta', 'wccs_custom_checkout_field_update_order_meta');
|
37 |
+
add_action('woocommerce_email_after_order_table', 'wccs_custom_style_checkout_email');
|
38 |
+
add_action('woocommerce_checkout_process', 'wccs_custom_checkout_field_process');
|
39 |
+
add_action('woocommerce_order_details_after_order_table', 'wccs_custom_checkout_details');
|
40 |
+
add_action('wp_head','display_front_wccs');
|
41 |
+
|
42 |
+
|
43 |
function wccs_install() {
|
44 |
+
|
45 |
+
$defaults = array( 'buttons' => array(
|
46 |
+
array(
|
47 |
+
'label' => __( 'Example Label', 'woocommerce-checkout-manager' ),
|
48 |
+
'placeholder' => __( 'Example placeholder', 'woocommerce-checkout-manager' ),
|
49 |
+
'cow' => __('myfld1', 'woocommerce-checkout-manager'),
|
50 |
+
'option_a' => __('option 1', 'woocommerce-checkout-manager'),
|
51 |
+
'option_b' => __('option 2', 'woocommerce-checkout-manager')
|
52 |
+
)
|
53 |
+
),
|
54 |
+
'checkness' => array(
|
55 |
+
'checkbox1' => true,
|
56 |
+
'checkbox12' => true
|
57 |
+
)
|
58 |
+
);
|
59 |
+
|
60 |
add_option( 'wccs_settings', apply_filters( 'wccs_defaults', $defaults ) );
|
61 |
}
|
62 |
+
|
63 |
+
|
64 |
+
|
65 |
+
if ( is_admin() ){
|
66 |
+
add_action( 'admin_menu', 'wccs_admin_menu' );
|
67 |
+
add_filter( 'plugin_action_links_'.plugin_basename(__FILE__), 'wccs_admin_plugin_actions', -10);
|
68 |
+
add_action( 'admin_init', 'wccs_register_setting' );
|
69 |
+
} else {
|
70 |
+
wp_enqueue_script('jquery-ui-datepicker');
|
71 |
+
wp_enqueue_style( 'jquery-ui-style', (is_ssl()) ? 'https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/smoothness/jquery-ui.css' : 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/smoothness/jquery-ui.css' );
|
72 |
+
add_action('wp_enqueue_script', 'wccs_non_admin_scripts');
|
73 |
+
}
|
74 |
+
|
75 |
+
function wccs_non_admin_scripts() {
|
76 |
+
wp_enqueue_script('jquery-ui-datepicker');
|
77 |
+
wp_enqueue_style( 'jquery-ui-style', (is_ssl()) ? 'https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/smoothness/jquery-ui.css' : 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/smoothness/jquery-ui.css' );
|
78 |
+
}
|
79 |
+
|
80 |
+
|
81 |
function wccs_admin_menu() {
|
82 |
+
add_submenu_page( 'woocommerce', __('Woocommerce Checkout Manager', 'woocommerce-checkout-manager'), __('WooCCM', 'woocommerce-checkout-manager'), 'manage_options', __FILE__ , 'wccs__options_page');
|
|
|
83 |
}
|
84 |
+
|
85 |
+
|
86 |
function wccs_register_setting() {
|
87 |
+
register_setting( 'wccs_options', 'wccs_settings', 'wccs_options_validate' );
|
88 |
}
|
89 |
+
|
90 |
+
|
91 |
function wccs__options_page() {
|
92 |
+
if ( !current_user_can('manage_options') ) {
|
93 |
+
wp_die( __('You do not have sufficient permissions to access this page.') );
|
|
|
|
|
94 |
}
|
95 |
+
|
96 |
+
|
97 |
+
$hidden_field_name = 'mccs_submit_hidden';
|
98 |
$options = get_option( 'wccs_settings' );
|
99 |
+
|
100 |
+
|
101 |
+
if( isset($_POST[ $hidden_field_name ]) && $_POST[ $hidden_field_name ] == 'Y' ) {
|
102 |
+
update_option( 'wccs_settings', $options );
|
103 |
+
|
104 |
+
?> <div class="updated"><p><strong><?php _e('settings saved.'); ?></strong></p></div>
|
105 |
+
<?php
|
106 |
}
|
107 |
+
|
108 |
echo '<div class="wrap">';
|
|
|
109 |
echo '<div id="icon-themes" class="icon32"><br></div>';
|
110 |
+
echo '<h2>'. __( 'WooCommerce Checkout Manager', 'woocommerce-checkout-manager' ) .'';
|
111 |
+
|
|
|
112 |
?>
|
113 |
+
|
114 |
+
<!-- RSS FEED -->
|
115 |
<div class="wooccm_feed">
|
116 |
+
<?php include_once( ABSPATH . WPINC . '/feed.php' );
|
117 |
+
$rss = fetch_feed( 'http://www.trottyzone.com/category/news-feed/' );
|
118 |
|
119 |
+
if ( ! is_wp_error( $rss ) ) :
|
|
|
120 |
|
121 |
+
// Figure out how many total items there are, but limit it to 5.
|
122 |
+
$maxitems = $rss->get_item_quantity( 1 );
|
123 |
+
|
124 |
+
// Build an array of all the items, starting with element 0 (first element).
|
125 |
+
$rss_items = $rss->get_items( 0, $maxitems );
|
126 |
|
127 |
+
endif;
|
128 |
+
|
129 |
+
if ( $maxitems == 0 ) :
|
130 |
+
else :
|
131 |
+
|
132 |
+
// Loop through each feed item and display each item as a hyperlink.
|
133 |
+
foreach ( $rss_items as $item ) : ?>
|
134 |
+
|
135 |
+
<a href="<?php echo esc_url( $item->get_permalink() ); ?>"
|
136 |
+
title="<?php printf( __( 'Posted %s', 'woocommerce-checkout-manager' ), $item->get_date('j F Y | g:i a') ); ?>">
|
137 |
+
<?php echo esc_html( $item->get_title() ); ?>
|
138 |
+
</a>
|
139 |
+
|
140 |
+
<?php endforeach;
|
141 |
+
endif; ?>
|
142 |
|
143 |
+
</div></h2>
|
144 |
+
<!-- FEED -->
|
145 |
+
|
146 |
+
|
147 |
+
<form name="form" method="post" action="options.php" id="frm1">
|
148 |
+
<?php settings_fields( 'wccs_options' );
|
149 |
+
$options = get_option( 'wccs_settings' ); ?>
|
150 |
+
|
151 |
+
<table class="widefat" border="1" style="margin-bottom:10px;">
|
152 |
+
<thead>
|
153 |
+
<tr>
|
154 |
+
<th><?php _e('Field Name', 'woocommerce-checkout-manager'); ?></th>
|
155 |
+
<th><?php _e('Remove Field Entirely', 'woocommerce-checkout-manager'); ?></th>
|
156 |
+
<th><?php _e('Remove Required Attribute', 'woocommerce-checkout-manager'); ?></th>
|
157 |
+
<th class="wccs_replace"><?php _e('Replace Label Name', 'woocommerce-checkout-manager'); ?></th>
|
158 |
+
<th class="wccs_replace"><?php _e('Replace Placeholder Name', 'woocommerce-checkout-manager'); ?></th>
|
159 |
+
</tr>
|
160 |
+
</thead>
|
161 |
+
<tbody>
|
162 |
+
<tr>
|
163 |
+
<input type="hidden" name="<?php echo $hidden_field_name; ?>" value="Y">
|
164 |
+
<td><strong><?php _e('Select All Check boxes in this Column', 'woocommerce-checkout-manager'); ?></strong></td>
|
165 |
+
<td><input name="wccs_settings[checkness][select_all_rm]" type="checkbox" id="select_all_rm" value="1" <?php echo (isset($options['checkness']['select_all_rm'])) ? "checked='checked'" : ""; ?> /></td>
|
166 |
+
<td><input name="wccs_settings[checkness][select_all_rq]" type="checkbox" id="select_all_rq" value="1" <?php echo (isset($options['checkness']['select_all_rq'])) ? "checked='checked'" : ""; ?> /></td>
|
167 |
+
<td></td>
|
168 |
+
<td></td>
|
169 |
+
</tr>
|
170 |
+
</tbody>
|
171 |
+
<tbody>
|
172 |
+
<tr>
|
173 |
+
<input type="hidden" name="<?php echo $hidden_field_name; ?>" value="Y">
|
174 |
+
<td><?php _e('First Name', 'woocommerce-checkout-manager'); ?></td>
|
175 |
+
<td><input name="wccs_settings[checkness][wccs_opt_1]" type="checkbox" class="rm" value="1" <?php echo (isset($options['checkness']['wccs_opt_1'])) ? "checked='checked'" : ""; ?> /></td>
|
176 |
+
|
177 |
+
<td><input name="wccs_settings[checkness][wccs_rq_1]" type="checkbox" class="rq" value="1" <?php echo (isset($options['checkness']['wccs_rq_1'])) ? "checked='checked'" : ""; ?> /></td>
|
178 |
+
|
179 |
+
|
180 |
+
<td><input type="text" name="wccs_settings[replace][label]"
|
181 |
+
value="<?php echo esc_attr( $options['replace']['label'] ); ?>" /></td>
|
182 |
+
<td><input type="text" name="wccs_settings[replace][placeholder]"
|
183 |
+
value="<?php echo esc_attr( $options['replace']['placeholder'] ); ?>" /></td>
|
184 |
+
</tr>
|
185 |
+
</tbody>
|
186 |
+
<tbody>
|
187 |
+
<tr>
|
188 |
+
<input type="hidden" name="<?php echo $hidden_field_name; ?>" value="Y">
|
189 |
+
<td><?php _e('Last Name', 'woocommerce-checkout-manager'); ?></td>
|
190 |
+
<td><input name="wccs_settings[checkness][wccs_opt_2]" type="checkbox" class="rm" value="1" <?php echo (isset($options['checkness']['wccs_opt_2'])) ? "checked='checked'" : ""; ?> /></td>
|
191 |
+
<td><input name="wccs_settings[checkness][wccs_rq_2]" type="checkbox" class="rq" value="1" <?php echo (isset($options['checkness']['wccs_rq_2'])) ? "checked='checked'" : ""; ?> /></td>
|
192 |
+
<td><input type="text" name="wccs_settings[replace][label1]"
|
193 |
+
value="<?php echo esc_attr( $options['replace']['label1'] ); ?>" /></td>
|
194 |
+
<td><input type="text" name="wccs_settings[replace][placeholder1]"
|
195 |
+
value="<?php echo esc_attr( $options['replace']['placeholder1'] ); ?>" /></td>
|
196 |
+
</tr>
|
197 |
+
</tbody>
|
198 |
+
<tbody>
|
199 |
+
<tr>
|
200 |
+
<input type="hidden" name="<?php echo $hidden_field_name; ?>" value="Y">
|
201 |
+
<td><?php _e('Country', 'woocommerce-checkout-manager'); ?></td>
|
202 |
+
<td><input name="wccs_settings[checkness][wccs_opt_8]" type="checkbox" class="rm" value="1" <?php echo (isset($options['checkness']['wccs_opt_8'])) ? "checked='checked'" : ""; ?> /></td>
|
203 |
+
<td><input name="wccs_settings[checkness][wccs_rq_8]" type="checkbox" class="rq" value="1" <?php echo (isset($options['checkness']['wccs_rq_8'])) ? "checked='checked'" : ""; ?> /></td>
|
204 |
+
<td><input type="text" name="wccs_settings[replace][label2]"
|
205 |
+
value="<?php echo esc_attr( $options['replace']['label2'] ); ?>" /></td>
|
206 |
+
<td></td>
|
207 |
+
</tr>
|
208 |
+
</tbody>
|
209 |
+
<tbody>
|
210 |
+
<tr>
|
211 |
+
<input type="hidden" name="<?php echo $hidden_field_name; ?>" value="Y">
|
212 |
+
<td><?php _e('Phone', 'woocommerce-checkout-manager'); ?></td>
|
213 |
+
<td><input name="wccs_settings[checkness][wccs_opt_10]" type="checkbox" class="rm" value="1" <?php echo (isset($options['checkness']['wccs_opt_10'])) ? "checked='checked'" : ""; ?> /></td>
|
214 |
+
<td><input name="wccs_settings[checkness][wccs_rq_10]" type="checkbox" class="rq" value="1" <?php echo (isset($options['checkness']['wccs_rq_10'])) ? "checked='checked'" : ""; ?> /></td>
|
215 |
+
<td><input type="text" name="wccs_settings[replace][label3]"
|
216 |
+
value="<?php echo esc_attr( $options['replace']['label3'] ); ?>" /></td>
|
217 |
+
<td><input type="text" name="wccs_settings[replace][placeholder3]"
|
218 |
+
value="<?php echo esc_attr( $options['replace']['placeholder3'] ); ?>" /></td>
|
219 |
+
</tr>
|
220 |
+
</tbody>
|
221 |
+
<tbody>
|
222 |
+
<tr>
|
223 |
+
<input type="hidden" name="<?php echo $hidden_field_name; ?>" value="Y">
|
224 |
+
<td><?php _e('Email', 'woocommerce-checkout-manager'); ?></td>
|
225 |
+
<td><input name="wccs_settings[checkness][wccs_opt_11]" type="checkbox" class="rm" value="1" <?php echo (isset($options['checkness']['wccs_opt_11'])) ? "checked='checked'" : ""; ?> /></td>
|
226 |
+
<td><input name="wccs_settings[checkness][wccs_rq_11]" type="checkbox" class="rq" value="1" <?php echo (isset($options['checkness']['wccs_rq_11'])) ? "checked='checked'" : ""; ?> /></td>
|
227 |
+
<td><input type="text" name="wccs_settings[replace][label4]"
|
228 |
+
value="<?php echo esc_attr( $options['replace']['label4'] ); ?>" /></td>
|
229 |
+
<td><input type="text" name="wccs_settings[replace][placeholder4]"
|
230 |
+
value="<?php echo esc_attr( $options['replace']['placeholder4'] ); ?>" /></td>
|
231 |
+
</tr>
|
232 |
+
</tbody>
|
233 |
+
<tbody>
|
234 |
+
<tr>
|
235 |
+
<input type="hidden" name="<?php echo $hidden_field_name; ?>" value="Y">
|
236 |
+
<td><?php _e('Company', 'woocommerce-checkout-manager'); ?></td>
|
237 |
+
<td><input name="wccs_settings[checkness][wccs_opt_3]" type="checkbox" class="rm" value="1" <?php echo (isset($options['checkness']['wccs_opt_3'])) ? "checked='checked'" : ""; ?> /></td>
|
238 |
+
<td></td>
|
239 |
+
<td><input type="text" name="wccs_settings[replace][label5]"
|
240 |
+
value="<?php echo esc_attr( $options['replace']['label5'] ); ?>" /></td>
|
241 |
+
<td><input type="text" name="wccs_settings[replace][placeholder5]"
|
242 |
+
value="<?php echo esc_attr( $options['replace']['placeholder5'] ); ?>" /></td>
|
243 |
+
</tr>
|
244 |
+
</tbody>
|
245 |
+
<tbody>
|
246 |
+
<tr>
|
247 |
+
<input type="hidden" name="<?php echo $hidden_field_name; ?>" value="Y">
|
248 |
+
<td><?php _e('Order Notes', 'woocommerce-checkout-manager'); ?></td>
|
249 |
+
<td><input name="wccs_settings[checkness][wccs_opt_12]" type="checkbox" class="rm" value="1" <?php echo (isset($options['checkness']['wccs_opt_12'])) ? "checked='checked'" : ""; ?> /></td>
|
250 |
+
<td></td>
|
251 |
+
<td><input type="text" name="wccs_settings[replace][label11]"
|
252 |
+
value="<?php echo esc_attr( $options['replace']['label11'] ); ?>" /></td>
|
253 |
+
<td><input type="text" name="wccs_settings[replace][placeholder11]"
|
254 |
+
value="<?php echo esc_attr( $options['replace']['placeholder11'] ); ?>" /></td>
|
255 |
+
</tr>
|
256 |
+
</tbody>
|
257 |
+
<tbody>
|
258 |
+
<tr>
|
259 |
+
<input type="hidden" name="<?php echo $hidden_field_name; ?>" value="Y">
|
260 |
+
<td><?php _e('Address 1', 'woocommerce-checkout-manager'); ?></td>
|
261 |
+
<td><input name="wccs_settings[checkness][wccs_opt_4]" type="checkbox" class="rm" value="1" <?php echo (isset($options['checkness']['wccs_opt_4'])) ? "checked='checked'" : ""; ?></td>
|
262 |
+
<td></td>
|
263 |
+
<td></td>
|
264 |
+
<td></td>
|
265 |
+
</tr>
|
266 |
+
</tbody>
|
267 |
+
<tbody>
|
268 |
+
<tr>
|
269 |
+
<input type="hidden" name="<?php echo $hidden_field_name; ?>" value="Y">
|
270 |
+
<td><?php _e('Address 2', 'woocommerce-checkout-manager'); ?></td>
|
271 |
+
<td><input name="wccs_settings[checkness][wccs_opt_5]" type="checkbox" class="rm" value="1" <?php echo (isset($options['checkness']['wccs_opt_5'])) ? "checked='checked'" : ""; ?> /></td>
|
272 |
+
<td></td>
|
273 |
+
<td></td>
|
274 |
+
<td></td>
|
275 |
+
</tr>
|
276 |
+
</tbody>
|
277 |
+
<tbody>
|
278 |
+
<tr>
|
279 |
+
<input type="hidden" name="<?php echo $hidden_field_name; ?>" value="Y">
|
280 |
+
<td><?php _e('City', 'woocommerce-checkout-manager'); ?></td>
|
281 |
+
<td><input name="wccs_settings[checkness][wccs_opt_6]" type="checkbox" class="rm" value="1" <?php echo (isset($options['checkness']['wccs_opt_6'])) ? "checked='checked'" : ""; ?> /></td>
|
282 |
+
<td></td>
|
283 |
+
<td></td>
|
284 |
+
<td></td>
|
285 |
+
</tr>
|
286 |
+
</tbody>
|
287 |
+
<tbody>
|
288 |
+
<tr>
|
289 |
+
<input type="hidden" name="<?php echo $hidden_field_name; ?>" value="Y">
|
290 |
+
<td><?php _e('Postal Code', 'woocommerce-checkout-manager'); ?></td>
|
291 |
+
<td><input name="wccs_settings[checkness][wccs_opt_7]" type="checkbox" class="rm" value="1" <?php echo (isset($options['checkness']['wccs_opt_7'])) ? "checked='checked'" : ""; ?> /></td>
|
292 |
+
<td></td>
|
293 |
+
<td></td>
|
294 |
+
<td></td>
|
295 |
+
</tr>
|
296 |
+
</tbody>
|
297 |
+
<tbody>
|
298 |
+
<tr>
|
299 |
+
<input type="hidden" name="<?php echo $hidden_field_name; ?>" value="Y">
|
300 |
+
<td><?php _e('State', 'woocommerce-checkout-manager'); ?></td>
|
301 |
+
<td><input name="wccs_settings[checkness][wccs_opt_9]" type="checkbox" class="rm" value="1" <?php echo (isset($options['checkness']['wccs_opt_9'])) ? "checked='checked'" : ""; ?> /></td>
|
302 |
+
<td></td>
|
303 |
+
<td></td>
|
304 |
+
<td></td>
|
305 |
+
</tr>
|
306 |
+
</tbody>
|
307 |
+
<?php submit_button( __( 'Save Changes', 'woocommerce-checkout-manager' ) ); ?>
|
308 |
+
<div class="wooccm_title"><?php _e('Billing Section', 'woocommerce-checkout-manager'); ?></div>
|
309 |
+
</table>
|
310 |
+
<table class="widefat" border="1" >
|
311 |
+
<thead>
|
312 |
+
<tr>
|
313 |
+
<th><?php _e('Field Name', 'woocommerce-checkout-manager'); ?></th>
|
314 |
+
<th><?php _e('Remove Field Entirely', 'woocommerce-checkout-manager'); ?></th>
|
315 |
+
<th><?php _e('Remove Required Attribute', 'woocommerce-checkout-manager'); ?></th>
|
316 |
+
<th class="wccs_replace"><?php _e('Replace Label Name', 'woocommerce-checkout-manager'); ?></th>
|
317 |
+
<th class="wccs_replace"><?php _e('Replace Placeholder Name', 'woocommerce-checkout-manager'); ?></th>
|
318 |
+
</tr>
|
319 |
+
</thead>
|
320 |
+
<tbody>
|
321 |
+
<tr>
|
322 |
+
<input type="hidden" name="<?php echo $hidden_field_name; ?>" value="Y">
|
323 |
+
<td><strong><?php _e('Select All Check boxes in this Column', 'woocommerce-checkout-manager'); ?></strong></td>
|
324 |
+
<td><input name="wccs_settings[check][select_all_rm_s]" type="checkbox" id="select_all_rm_s" value="1" <?php echo (isset($options['check']['select_all_rm_s'])) ? "checked='checked'" : ""; ?> /></td>
|
325 |
+
<td><input name="wccs_settings[check][select_all_rq_s]" type="checkbox" id="select_all_rq_s" value="1" <?php echo (isset($options['check']['select_all_rq_s'])) ? "checked='checked'" : ""; ?> /></td>
|
326 |
+
<td></td>
|
327 |
+
<td></td>
|
328 |
+
</tr>
|
329 |
+
</tbody>
|
330 |
+
<tbody>
|
331 |
+
<tr>
|
332 |
+
<input type="hidden" name="<?php echo $hidden_field_name; ?>" value="Y">
|
333 |
+
<td><?php _e('First Name', 'woocommerce-checkout-manager'); ?></td>
|
334 |
+
<td><input name="wccs_settings[check][wccs_opt_1_s]" type="checkbox" class="rm_s" value="1"
|
335 |
+
<?php echo (isset($options['check']['wccs_opt_1_s'])) ? "checked='checked'" : ""; ?> /></td>
|
336 |
+
<td><input name="wccs_settings[check][wccs_rq_1_s]" type="checkbox" class="rq_s" value="1" <?php echo (isset($options['check']['wccs_rq_1_s'])) ? "checked='checked'" : ""; ?> /></td>
|
337 |
+
<td><input type="text" name="wccs_settings[replace][label_s]"
|
338 |
+
value="<?php echo esc_attr( $options['replace']['label_s'] ); ?>" /></td>
|
339 |
+
<td><input type="text" name="wccs_settings[replace][placeholder_s]"
|
340 |
+
value="<?php echo esc_attr( $options['replace']['placeholder_s'] ); ?>" /></td>
|
341 |
+
</tr>
|
342 |
+
</tbody>
|
343 |
+
<tbody>
|
344 |
+
<tr>
|
345 |
+
<input type="hidden" name="<?php echo $hidden_field_name; ?>" value="Y">
|
346 |
+
<td><?php _e('Last Name', 'woocommerce-checkout-manager'); ?></td>
|
347 |
+
<td><input name="wccs_settings[check][wccs_opt_2_s]" type="checkbox" class="rm_s" value="1" <?php echo (isset($options['check']['wccs_opt_2_s'])) ? "checked='checked'" : ""; ?> /></td>
|
348 |
+
<td><input name="wccs_settings[check][wccs_rq_2_s]" type="checkbox" class="rq_s" value="1" <?php echo (isset($options['check']['wccs_rq_2_s'])) ? "checked='checked'" : ""; ?> /></td>
|
349 |
+
<td><input type="text" name="wccs_settings[replace][label_s1]"
|
350 |
+
value="<?php echo esc_attr( $options['replace']['label_s1'] ); ?>" /></td>
|
351 |
+
<td><input type="text" name="wccs_settings[replace][placeholder_s1]"
|
352 |
+
value="<?php echo esc_attr( $options['replace']['placeholder_s1'] ); ?>" /></td>
|
353 |
+
</tr>
|
354 |
+
</tbody>
|
355 |
+
<tbody>
|
356 |
+
<tr>
|
357 |
+
<input type="hidden" name="<?php echo $hidden_field_name; ?>" value="Y">
|
358 |
+
<td><?php _e('Company', 'woocommerce-checkout-manager'); ?></td>
|
359 |
+
<td><input name="wccs_settings[check][wccs_opt_3_s]" type="checkbox" class="rm_s" value="1" <?php echo (isset($options['check']['wccs_opt_3_s'])) ? "checked='checked'" : ""; ?> /></td>
|
360 |
+
<td></td>
|
361 |
+
<td><input type="text" name="wccs_settings[replace][label_s2]"
|
362 |
+
value="<?php echo esc_attr( $options['replace']['label_s2'] ); ?>" /></td>
|
363 |
+
<td><input type="text" name="wccs_settings[replace][placeholder_s2]"
|
364 |
+
value="<?php echo esc_attr( $options['replace']['placeholder_s2'] ); ?>" /></td>
|
365 |
+
</tr>
|
366 |
+
</tbody>
|
367 |
+
<tbody>
|
368 |
+
<tr>
|
369 |
+
<input type="hidden" name="<?php echo $hidden_field_name; ?>" value="Y">
|
370 |
+
<td><?php _e('Country', 'woocommerce-checkout-manager'); ?></td>
|
371 |
+
<td><input name="wccs_settings[check][wccs_opt_8_s]" type="checkbox" class="rm_s" value="1" <?php echo (isset($options['check']['wccs_opt_8_s'])) ? "checked='checked'" : ""; ?> /></td>
|
372 |
+
<td></td>
|
373 |
+
<td><input type="text" name="wccs_settings[replace][label_s7]"
|
374 |
+
value="<?php echo esc_attr( $options['replace']['label_s7'] ); ?>" /></td>
|
375 |
+
<td></td>
|
376 |
+
</tr>
|
377 |
+
</tbody>
|
378 |
+
<tbody>
|
379 |
+
<tr>
|
380 |
+
<input type="hidden" name="<?php echo $hidden_field_name; ?>" value="Y">
|
381 |
+
<td><?php _e('Address 1', 'woocommerce-checkout-manager'); ?></td>
|
382 |
+
<td><input name="wccs_settings[check][wccs_opt_4_s]" type="checkbox" class="rm_s" value="1" <?php echo (isset($options['check']['wccs_opt_4_s'])) ? "checked='checked'" : ""; ?></td>
|
383 |
+
<td></td>
|
384 |
+
<td></td>
|
385 |
+
<td></td>
|
386 |
+
</tr>
|
387 |
+
</tbody>
|
388 |
+
<tbody>
|
389 |
+
<tr>
|
390 |
+
<input type="hidden" name="<?php echo $hidden_field_name; ?>" value="Y">
|
391 |
+
<td><?php _e('Address 2', 'woocommerce-checkout-manager'); ?></td>
|
392 |
+
<td><input name="wccs_settings[check][wccs_opt_5_s]" type="checkbox" class="rm_s" value="1" <?php echo (isset($options['check']['wccs_opt_5_s'])) ? "checked='checked'" : ""; ?> /></td>
|
393 |
+
<td></td>
|
394 |
+
<td></td>
|
395 |
+
<td></td>
|
396 |
+
</tr>
|
397 |
+
</tbody>
|
398 |
+
<tbody>
|
399 |
+
<tr>
|
400 |
+
<input type="hidden" name="<?php echo $hidden_field_name; ?>" value="Y">
|
401 |
+
<td><?php _e('City', 'woocommerce-checkout-manager'); ?></td>
|
402 |
+
<td><input name="wccs_settings[check][wccs_opt_6_s]" type="checkbox" class="rm_s" value="1" <?php echo (isset($options['check']['wccs_opt_6_s'])) ? "checked='checked'" : ""; ?> /></td>
|
403 |
+
<td></td>
|
404 |
+
<td></td>
|
405 |
+
<td></td>
|
406 |
+
</tr>
|
407 |
+
</tbody>
|
408 |
+
<tbody>
|
409 |
+
<tr>
|
410 |
+
<input type="hidden" name="<?php echo $hidden_field_name; ?>" value="Y">
|
411 |
+
<td><?php _e('Postal Code', 'woocommerce-checkout-manager'); ?></td>
|
412 |
+
<td><input name="wccs_settings[check][wccs_opt_7_s]" type="checkbox" class="rm_s" value="1" <?php echo (isset($options['check']['wccs_opt_7_s'])) ? "checked='checked'" : ""; ?> /></td>
|
413 |
+
<td></td>
|
414 |
+
<td></td>
|
415 |
+
<td></td>
|
416 |
+
</tr>
|
417 |
+
</tbody>
|
418 |
+
<tbody>
|
419 |
+
<tr>
|
420 |
+
<input type="hidden" name="<?php echo $hidden_field_name; ?>" value="Y">
|
421 |
+
<td><?php _e('State', 'woocommerce-checkout-manager'); ?></td>
|
422 |
+
<td><input name="wccs_settings[check][wccs_opt_9_s]" type="checkbox" class="rm_s" value="1" <?php echo (isset($options['check']['wccs_opt_9_s'])) ? "checked='checked'" : ""; ?> /></td>
|
423 |
+
<td></td>
|
424 |
+
<td></td>
|
425 |
+
<td></td>
|
426 |
+
</tr>
|
427 |
+
</tbody>
|
428 |
+
<div class="wooccm_title"><?php _e('Shipping Section', 'woocommerce-checkout-manager'); ?></div>
|
429 |
+
</table>
|
430 |
+
|
431 |
+
<div style="padding:5px 10px;font-weight:700;color:green;" class="clear_dwccm">
|
432 |
|
433 |
+
|
434 |
+
<div class="updated clear_wccm data">
|
435 |
+
<div class="clear_wccm title">
|
436 |
+
<a href="http://www.trottyzone.com/product/woocommerce-checkout-manager-pro/"><?php _e('TRY THE PRO VERSION', 'woocommerce-checkout-manager'); ?></a><br /><span class="small"><?php _e('includes these field types', 'woocommerce-checkout-manager'); ?></span> →
|
437 |
+
</div>
|
438 |
+
<ul>
|
439 |
+
<li><?php _e('Text Area', 'woocommerce-checkout-manager'); ?></li>
|
440 |
+
<li><?php _e('Password', 'woocommerce-checkout-manager'); ?></li>
|
441 |
+
<li><?php _e('Mult-Select', 'woocommerce-checkout-manager'); ?></li>
|
442 |
+
</ul>
|
443 |
+
<ul>
|
444 |
+
<li><?php _e('Radio Button (Unlimited Options)', 'woocommerce-checkout-manager'); ?></li>
|
445 |
+
<li><?php _e('Select Options (Unlimited Options)', 'woocommerce-checkout-manager'); ?></li>
|
446 |
+
<li><?php _e('Time Picker', 'woocommerce-checkout-manager'); ?></li>
|
447 |
+
</ul>
|
448 |
+
<ul>
|
449 |
+
<li><?php _e('Text/ Html Swapper', 'woocommerce-checkout-manager'); ?></li>
|
450 |
+
<li><?php _e('Color Picker', 'woocommerce-checkout-manager'); ?></li>
|
451 |
+
<li><?php _e('Heading', 'woocommerce-checkout-manager'); ?></li>
|
452 |
+
</ul>
|
453 |
+
<ul>
|
454 |
+
<li><?php _e('Check Box (Put your own options)', 'woocommerce-checkout-manager'); ?></li>
|
455 |
+
<li><strong><a href="http://www.trottyzone.com/product/woocommerce-checkout-manager-pro/"><?php _e('more features. . .', 'woocommerce-checkout-manager'); ?></a></strong></li>
|
456 |
+
</ul>
|
457 |
+
</div>
|
458 |
+
</div>
|
459 |
+
|
460 |
+
<div class="wooccm_title" ><?php _e('Add New Field Section', 'woocommerce-checkout-manager'); ?></div>
|
461 |
+
<table class="widefat" border="1" >
|
462 |
+
<thead>
|
463 |
+
<tr>
|
464 |
+
<th><?php _e('Enable Title - Additional information', 'atc-menu'); ?></th>
|
465 |
+
<th><input style="float:left;" name="wccs_settings[checkness][checkbox12]" type="checkbox" value="true" <?php echo (isset($options['checkness']['checkbox12'])) ? "checked='checked'": ""; ?> /></th>
|
466 |
+
<th><?php _e('Checkout Page', 'atc-menu'); ?></th>
|
467 |
+
<th><input style="float:left;" name="wccs_settings[checkness][checkbox1]" type="checkbox" value="true" <?php echo (isset($options['checkness']['checkbox1'])) ? "checked='checked'": ""; ?> /></th>
|
468 |
+
<th><?php _e('Checkout Details and Email Receipt', 'atc-menu'); ?></th>
|
469 |
+
</tr>
|
470 |
+
</thead>
|
471 |
+
</table>
|
472 |
+
|
473 |
+
<table class="widefat wccs-table" border="1">
|
474 |
+
<thead>
|
475 |
+
<tr>
|
476 |
+
<th style="width:3%;" class="wccs-order" title="<?php esc_attr_e( 'Change order' , 'woocommerce-checkout-manager' ); ?>">#</th>
|
477 |
+
<th><?php _e('Label' , 'woocommerce-checkout-manager' ); ?></th>
|
478 |
+
<th><?php _e('Placeholder' , 'woocommerce-checkout-manager' ); ?></th>
|
479 |
+
<th><?php _e('Option A' , 'woocommerce-checkout-manager' ); ?></th>
|
480 |
+
<th><?php _e('Options B' , 'woocommerce-checkout-manager' ); ?></th>
|
481 |
+
<th width="5%"><?php _e('Choose Type' , 'woocommerce-checkout-manager' ); ?></th>
|
482 |
+
<th width="5%"><?php _e('Abbreviation' , 'woocommerce-checkout-manager' ); ?></th>
|
483 |
+
<th width="5%"><?php _e('Required' , 'woocommerce-checkout-manager' ); ?></th>
|
484 |
+
<th style="text-align:center;" scope="col" title="<?php esc_attr_e( 'Remove button', 'woocommerce-checkout-manager' ); ?>">X</th>
|
485 |
+
</tr>
|
486 |
+
</thead>
|
487 |
+
<tbody>
|
488 |
+
|
489 |
+
<?php if ( isset ( $options['buttons'] ) ) :
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|