WooCommerce Checkout Manager - Version 4.1.7

Version Description

  • Fixed: Undefined notice in e-mail template (thanks Vitor)
Download this release

Release Info

Developer visser
Plugin Icon 128x128 WooCommerce Checkout Manager
Version 4.1.7
Comparing to
See all releases

Code changes from version 4.1.4 to 4.1.7

includes/email.php CHANGED
@@ -188,11 +188,13 @@ function wooccm_add_payment_method_to_new_order( $order, $sent_to_admin, $plain_
188
  if ( $options['checkness']['time_stamp'] == true ) {
189
  echo $options['checkness']['time_stamp_title'].' ' . $date . "\n";
190
  }
191
- if( $order->get_payment_method_title() && isset( $options['checkness']['payment_method_t'] ) && $options['checkness']['payment_method_t'] == true ) {
192
- echo $options['checkness']['payment_method_d'].': ' . $order->get_payment_method_title() . "\n";
 
193
  }
194
- if( $order->get_shipping_method() && isset( $options['checkness']['shipping_method_t'] ) && $options['checkness']['shipping_method_t'] == true ) {
195
- echo $options['checkness']['shipping_method_d'].': ' . $order->get_shipping_method() . "\n";
 
196
  }
197
 
198
  echo "\n";
@@ -348,17 +350,21 @@ function wooccm_add_payment_method_to_new_order( $order, $sent_to_admin, $plain_
348
  <strong>'.$options['checkness']['time_stamp_title'].':</strong> ' . $date . '
349
  </p>';
350
  }
351
- if( $order->get_payment_method_title() && isset( $options['checkness']['payment_method_t'] ) && $options['checkness']['payment_method_t'] == true ) {
 
352
  echo '
353
  <p>
354
  <strong>'.$options['checkness']['payment_method_d'].':</strong> ' . $order->get_payment_method_title() . '
355
  </p>';
 
356
  }
357
- if( $order->get_shipping_method() && $options['checkness']['shipping_method_t'] == true ) {
 
358
  echo '
359
  <p>
360
  <strong>'.$options['checkness']['shipping_method_d'].':</strong> ' . $order->get_shipping_method() . '
361
  </p>';
 
362
  }
363
 
364
  }
188
  if ( $options['checkness']['time_stamp'] == true ) {
189
  echo $options['checkness']['time_stamp_title'].' ' . $date . "\n";
190
  }
191
+ if( method_exists( $order, 'get_payment_method_title' ) ) {
192
+ if( $order->get_payment_method_title() && isset( $options['checkness']['payment_method_t'] ) && $options['checkness']['payment_method_t'] == true )
193
+ echo $options['checkness']['payment_method_d'].': ' . $order->get_payment_method_title() . "\n";
194
  }
195
+ if( method_exists( $order, 'get_shipping_method' ) ) {
196
+ if( $order->get_shipping_method() && isset( $options['checkness']['shipping_method_t'] ) && $options['checkness']['shipping_method_t'] == true )
197
+ echo $options['checkness']['shipping_method_d'].': ' . $order->get_shipping_method() . "\n";
198
  }
199
 
200
  echo "\n";
350
  <strong>'.$options['checkness']['time_stamp_title'].':</strong> ' . $date . '
351
  </p>';
352
  }
353
+ if( method_exists( $order, 'get_payment_method_title' ) ) {
354
+ if( $order->get_payment_method_title() && isset( $options['checkness']['payment_method_t'] ) && $options['checkness']['payment_method_t'] == true ) {
355
  echo '
356
  <p>
357
  <strong>'.$options['checkness']['payment_method_d'].':</strong> ' . $order->get_payment_method_title() . '
358
  </p>';
359
+ }
360
  }
361
+ if( method_exists( $order, 'get_shipping_method' ) ) {
362
+ if( $order->get_shipping_method() && isset( $options['checkness']['shipping_method_t'] ) && $options['checkness']['shipping_method_t'] == true ) {
363
  echo '
364
  <p>
365
  <strong>'.$options['checkness']['shipping_method_d'].':</strong> ' . $order->get_shipping_method() . '
366
  </p>';
367
+ }
368
  }
369
 
370
  }
includes/template.php CHANGED
@@ -335,10 +335,15 @@ function wooccm_custom_checkout_details( $order ) {
335
  $btn['type'] !== 'multiselect' &&
336
  $btn['type'] !== 'multicheckbox'
337
  ) {
 
 
 
 
 
338
  echo '
339
  <tr>
340
  <th>'.wooccm_wpml_string($btn['label']).':</th>
341
- <td data-title="' .wooccm_wpml_string($btn['label']). '">'.nl2br( get_post_meta( $order_id, $btn['cow'], true ) ).'</td>
342
  </tr>';
343
  } elseif(
344
  !empty( $btn['label'] ) &&
335
  $btn['type'] !== 'multiselect' &&
336
  $btn['type'] !== 'multicheckbox'
337
  ) {
338
+ $value = get_post_meta( $order_id, $btn['cow'], true );
339
+ if( $value == '1' )
340
+ $value = __( 'Yes', 'woocommerce-checkout-manager' );
341
+ else if( $value == '0' )
342
+ $value = __( 'No', 'woocommerce-checkout-manager' );
343
  echo '
344
  <tr>
345
  <th>'.wooccm_wpml_string($btn['label']).':</th>
346
+ <td data-title="' .wooccm_wpml_string($btn['label']). '">'.nl2br( $value ).'</td>
347
  </tr>';
348
  } elseif(
349
  !empty( $btn['label'] ) &&
readme.txt CHANGED
@@ -4,8 +4,8 @@ Contributors: visser, visser.labs, Emark
4
  Donate link: https://www.visser.com.au/donations/
5
  Tags: woocommerce, ecommerce, e-commerce, store, cart, checkout, manager, editor, field, shipping, billing, order
6
  Requires at least: 3.0
7
- Tested up to: 4.8
8
- Stable tag: 4.1.4
9
  License: GPLv2 or later
10
 
11
  Manages WooCommerce Checkout, the advanced way.
@@ -135,6 +135,15 @@ Example:
135
 
136
  == Changelog ==
137
 
 
 
 
 
 
 
 
 
 
138
  = 4.1.4 =
139
  * Changed: Removed wooccm_admin_updater_notice()
140
  * Changed: Using WC localisation for '%s is a required field.'
4
  Donate link: https://www.visser.com.au/donations/
5
  Tags: woocommerce, ecommerce, e-commerce, store, cart, checkout, manager, editor, field, shipping, billing, order
6
  Requires at least: 3.0
7
+ Tested up to: 4.9.2
8
+ Stable tag: 4.1.7
9
  License: GPLv2 or later
10
 
11
  Manages WooCommerce Checkout, the advanced way.
135
 
136
  == Changelog ==
137
 
138
+ = 4.1.7 =
139
+ * Fixed: Undefined notice in e-mail template (thanks Vitor)
140
+
141
+ = 4.1.6 =
142
+ * Fixed: Replace 1 with Yes, 0 with No for checkbox default values (thanks @james-roberts)
143
+
144
+ = 4.1.5 =
145
+ * Fixed: Check for get_shipping_method and get_payment_method_title methods (thanks jobsludo)
146
+
147
  = 4.1.4 =
148
  * Changed: Removed wooccm_admin_updater_notice()
149
  * Changed: Using WC localisation for '%s is a required field.'
script_wccs.js DELETED
@@ -1,93 +0,0 @@
1
- jQuery(document).ready(function() {
2
- jQuery(function() {
3
- jQuery('#select_all_rm').click(function() {
4
- var c = this.checked;
5
- jQuery('.rm').prop('checked',c);
6
- });
7
- });
8
- });
9
- jQuery(document).ready(function() {
10
- jQuery(function() {
11
- jQuery('#select_all_rm_s').click(function() {
12
- var c = this.checked;
13
- jQuery('.rm_s').prop('checked',c);
14
- });
15
- });
16
- });
17
- jQuery(document).ready(function() {
18
- jQuery(function() {
19
- jQuery('#select_all_rq').click(function() {
20
- var c = this.checked;
21
- jQuery('.rq').prop('checked',c);
22
- });
23
- });
24
- });
25
- jQuery(document).ready(function() {
26
- jQuery(function() {
27
- jQuery('#select_all_rq_s').click(function() {
28
- var c = this.checked;
29
- jQuery('.rq_s').prop('checked',c);
30
- });
31
- });
32
- });
33
- // Javascript for adding new field
34
- jQuery(document).ready( function() {
35
- /**
36
- * Credits to the Advanced Custom Fields plugin for this code
37
- */
38
- // Update Order Numbers
39
- function update_order_numbers(div) {
40
- div.children('tbody').children('tr.wccs-row').each(function(i) {
41
- jQuery(this).children('td.wccs-order').html(i+1);
42
- });
43
- }
44
- // Make Sortable
45
- function make_sortable(div){
46
- var fixHelper = function(e, ui) {
47
- ui.children().each(function() {
48
- jQuery(this).width(jQuery(this).width());
49
- });
50
- return ui;
51
- };
52
- div.children('tbody').unbind('sortable').sortable({
53
- update: function(event, ui){
54
- update_order_numbers(div);
55
- },
56
- handle: 'td.wccs-order',
57
- helper: fixHelper
58
- });
59
- }
60
- var div = jQuery('.wccs-table'),
61
- row_count = div.children('tbody').children('tr.wccs-row').length;
62
- // Make the table sortable
63
- make_sortable(div);
64
- // Add button
65
- jQuery('#wccs-add-button').live('click', function(){
66
- var div = jQuery('.wccs-table'),
67
- row_count = div.children('tbody').children('tr.wccs-row').length,
68
- new_field = div.children('tbody').children('tr.wccs-clone').clone(false); // Create and add the new field
69
- new_field.attr( 'class', 'wccs-row' );
70
- // Update names
71
- new_field.find('[name]').each(function(){
72
- var count = parseInt(row_count);
73
- var name = jQuery(this).attr('name').replace('[999]','[' + count + ']');
74
- jQuery(this).attr('name', name);
75
- });
76
- // Add row
77
- div.children('tbody').append(new_field);
78
- update_order_numbers(div);
79
- // There is now 1 more row
80
- row_count ++;
81
- return false;
82
- });
83
- // Remove button
84
- jQuery('.wccs-table .wccs-remove-button').live('click', function(){
85
- var div = jQuery('.wccs-table'),
86
- tr = jQuery(this).closest('tr');
87
- tr.animate({'left' : '50px', 'opacity' : 0}, 250, function(){
88
- tr.remove();
89
- update_order_numbers(div);
90
- });
91
- return false;
92
- });
93
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
woocommerce-checkout-manager.php CHANGED
@@ -3,13 +3,17 @@
3
  Plugin Name: WooCommerce Checkout Manager
4
  Plugin URI: https://wordpress.org/plugins/woocommerce-checkout-manager/
5
  Description: Manages WooCommerce Checkout, the advanced way.
6
- Contributors: visser, Emark
7
  Author: Visser Labs
8
  Author URI: http://www.visser.com.au
9
- Version: 4.1.4
 
 
10
  Text Domain: woocommerce-checkout-manager
11
  Domain Path: /languages/
12
- License: GPLv2 or later
 
 
13
  */
14
 
15
  /*
3
  Plugin Name: WooCommerce Checkout Manager
4
  Plugin URI: https://wordpress.org/plugins/woocommerce-checkout-manager/
5
  Description: Manages WooCommerce Checkout, the advanced way.
6
+ Version: 4.1.7
7
  Author: Visser Labs
8
  Author URI: http://www.visser.com.au
9
+ Contributors: visser, Emark
10
+ License: GPLv2 or later
11
+
12
  Text Domain: woocommerce-checkout-manager
13
  Domain Path: /languages/
14
+
15
+ WC requires at least: 2.3
16
+ WC tested up to: 3.3.1
17
  */
18
 
19
  /*