WooCommerce Checkout Manager - Version 6.3.2

Version Description

Download this release

Release Info

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

Code changes from version 6.3.1 to 6.3.2

includes/class-wooccm-helpers.php ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class WOOCCM_Field_Helpers {
4
+
5
+ public static function get_form_action() {
6
+
7
+ if ( isset( $_REQUEST['action'] ) && 'edit_address' === $_REQUEST['action'] ) {
8
+ return 'account';
9
+ }
10
+
11
+ if ( isset( $_REQUEST['woocommerce-process-checkout-nonce'] ) ) {
12
+ return 'save';
13
+ }
14
+
15
+ if ( isset( $_REQUEST['post_data'] ) && isset( $_REQUEST['wc-ajax'] ) && $_REQUEST['wc-ajax'] == 'update_order_review' ) {
16
+ return 'update';
17
+ }
18
+ }
19
+
20
+ }
includes/class-wooccm.php CHANGED
@@ -28,6 +28,7 @@ final class WOOCCM {
28
  }
29
 
30
  public function includes() {
 
31
  include_once WOOCCM_PLUGIN_DIR . 'includes/class-wooccm-backend.php';
32
  include_once WOOCCM_PLUGIN_DIR . 'includes/class-wooccm-upload.php';
33
  include_once WOOCCM_PLUGIN_DIR . 'includes/controller/class-wooccm-checkout.php';
@@ -99,7 +100,7 @@ final class WOOCCM {
99
  );
100
 
101
  wp_register_script( 'farbtastic', admin_url( 'js/farbtastic.js' ), array( 'jquery' ), $wp_version );
102
-
103
  }
104
 
105
  public function clear_session() {
28
  }
29
 
30
  public function includes() {
31
+ include_once WOOCCM_PLUGIN_DIR . 'includes/class-wooccm-helpers.php';
32
  include_once WOOCCM_PLUGIN_DIR . 'includes/class-wooccm-backend.php';
33
  include_once WOOCCM_PLUGIN_DIR . 'includes/class-wooccm-upload.php';
34
  include_once WOOCCM_PLUGIN_DIR . 'includes/controller/class-wooccm-checkout.php';
100
  );
101
 
102
  wp_register_script( 'farbtastic', admin_url( 'js/farbtastic.js' ), array( 'jquery' ), $wp_version );
103
+
104
  }
105
 
106
  public function clear_session() {
includes/controller/class-wooccm-field-billing.php CHANGED
@@ -1,106 +1,96 @@
1
  <?php
2
 
3
- class WOOCCM_Field_Controller_Billing extends WOOCCM_Field_Controller
4
- {
5
-
6
- protected static $_instance;
7
- public $billing;
8
-
9
- public function __construct()
10
- {
11
-
12
- include_once(WOOCCM_PLUGIN_DIR . 'includes/model/class-wooccm-field-billing.php');
13
-
14
- add_action('wooccm_sections_header', array($this, 'add_header'));
15
- add_action('woocommerce_sections_' . WOOCCM_PREFIX, array($this, 'add_section'), 99);
16
- add_filter('woocommerce_admin_billing_fields', array($this, 'add_admin_billing_fields'), 999);
17
- //add_filter('woocommerce_admin_shipping_fields', array($this, 'add_admin_shipping_fields'));
18
- // add_action('woocommerce_admin_order_data_after_billing_address', array($this, 'add_order_data'));
19
- }
20
-
21
- public static function instance()
22
- {
23
- if (is_null(self::$_instance)) {
24
- self::$_instance = new self();
25
- }
26
- return self::$_instance;
27
- }
28
-
29
- // Admin
30
- // ---------------------------------------------------------------------------
31
-
32
- public function add_section()
33
- {
34
-
35
- global $current_section, $wp_roles, $wp_locale;
36
-
37
- if ('billing' == $current_section) {
38
-
39
- $fields = WOOCCM()->billing->get_fields();
40
- $defaults = WOOCCM()->billing->get_defaults();
41
- $types = WOOCCM()->billing->get_types();
42
- $conditionals = WOOCCM()->billing->get_conditional_types();
43
- $option = WOOCCM()->billing->get_option_types();
44
- $multiple = WOOCCM()->billing->get_multiple_types();
45
- $template = WOOCCM()->billing->get_template_types();
46
- $disabled = WOOCCM()->billing->get_disabled_types();
47
- $product_categories = $this->get_product_categories();
48
-
49
- include_once(WOOCCM_PLUGIN_DIR . 'includes/view/backend/pages/billing.php');
50
- }
51
- }
52
-
53
- public function add_header()
54
- {
55
- global $current_section;
56
- ?>
57
- <li><a href="<?php echo esc_url( admin_url( 'admin.php?page=wc-settings&tab=wooccm&section=billing' ) ); ?>" class="<?php echo ($current_section == 'billing' ? 'current' : ''); ?>"><?php esc_html_e('Billing', 'woocommerce-checkout-manager'); ?></a> | </li>
58
- <?php
59
- }
60
-
61
- // Admin Order
62
- // ---------------------------------------------------------------------------
63
-
64
- function add_admin_billing_fields($billing_fields)
65
- {
66
-
67
- if (!$fields = WOOCCM()->billing->get_fields()) {
68
- return $billing_fields;
69
- }
70
-
71
- //$defaults = WOOCCM()->billing->get_defaults();
72
- $template = WOOCCM()->billing->get_template_types();
73
-
74
- foreach ($fields as $field_id => $field) {
75
-
76
- if (!isset($field['name'])) {
77
- continue;
78
- }
79
-
80
- if (isset($billing_fields[$field['name']])) {
81
- continue;
82
- }
83
-
84
- if (in_array($field['name'], $template)) {
85
- continue;
86
- }
87
-
88
- if (!isset($field['type']) || $field['type'] != 'textarea') {
89
- $field['type'] = 'text';
90
- }
91
-
92
- $billing_fields[$field['name']] = $field;
93
- $billing_fields[$field['name']]['id'] = sprintf('_%s', (string) $field['key']);
94
- $billing_fields[$field['name']]['label'] = $field['label'];
95
- $billing_fields[$field['name']]['name'] = $field['key'];
96
- $billing_fields[$field['name']]['value'] = null;
97
- $billing_fields[$field['name']]['class'] = join(' ', $field['class']);
98
- //$billing_fields[$field['name']]['wrapper_class'] = 'wooccm-premium';
99
- }
100
-
101
-
102
- return $billing_fields;
103
- }
104
  }
105
 
106
  WOOCCM_Field_Controller_Billing::instance();
1
  <?php
2
 
3
+ class WOOCCM_Field_Controller_Billing extends WOOCCM_Field_Controller {
4
+
5
+
6
+ protected static $_instance;
7
+ public $billing;
8
+
9
+ public function __construct() {
10
+ include_once WOOCCM_PLUGIN_DIR . 'includes/model/class-wooccm-field-billing.php';
11
+
12
+ add_action( 'wooccm_sections_header', array( $this, 'add_header' ) );
13
+ add_action( 'woocommerce_sections_' . WOOCCM_PREFIX, array( $this, 'add_section' ), 99 );
14
+ add_filter( 'woocommerce_admin_billing_fields', array( $this, 'add_admin_billing_fields' ), 999 );
15
+ // add_filter('woocommerce_admin_shipping_fields', array($this, 'add_admin_shipping_fields'));
16
+ // add_action('woocommerce_admin_order_data_after_billing_address', array($this, 'add_order_data'));
17
+ }
18
+
19
+ public static function instance() {
20
+ if ( is_null( self::$_instance ) ) {
21
+ self::$_instance = new self();
22
+ }
23
+ return self::$_instance;
24
+ }
25
+
26
+ // Admin
27
+ // ---------------------------------------------------------------------------
28
+
29
+ public function add_section() {
30
+ global $current_section, $wp_roles, $wp_locale;
31
+
32
+ if ( 'billing' == $current_section ) {
33
+
34
+ $fields = WOOCCM()->billing->get_fields();
35
+ $defaults = WOOCCM()->billing->get_defaults();
36
+ $types = WOOCCM()->billing->get_types();
37
+ $conditionals = WOOCCM()->billing->get_conditional_types();
38
+ $option = WOOCCM()->billing->get_option_types();
39
+ $multiple = WOOCCM()->billing->get_multiple_types();
40
+ $template = WOOCCM()->billing->get_template_types();
41
+ $disabled = WOOCCM()->billing->get_disabled_types();
42
+ $product_categories = $this->get_product_categories();
43
+
44
+ include_once WOOCCM_PLUGIN_DIR . 'includes/view/backend/pages/billing.php';
45
+ }
46
+ }
47
+
48
+ public function add_header() {
49
+ global $current_section;
50
+ ?>
51
+ <li><a href="<?php echo esc_url( admin_url( 'admin.php?page=wc-settings&tab=wooccm&section=billing' ) ); ?>" class="<?php echo ( $current_section == 'billing' ? 'current' : '' ); ?>"><?php esc_html_e( 'Billing', 'woocommerce-checkout-manager' ); ?></a> | </li>
52
+ <?php
53
+ }
54
+
55
+ // Admin Order
56
+ // ---------------------------------------------------------------------------
57
+
58
+ function add_admin_billing_fields( $billing_fields ) {
59
+ if ( ! $fields = WOOCCM()->billing->get_fields() ) {
60
+ return $billing_fields;
61
+ }
62
+
63
+ $template = WOOCCM()->billing->get_template_types();
64
+
65
+ foreach ( $fields as $field_id => $field ) {
66
+
67
+ if ( ! isset( $field['name'] ) ) {
68
+ continue;
69
+ }
70
+
71
+ if ( isset( $billing_fields[ $field['name'] ] ) ) {
72
+ continue;
73
+ }
74
+
75
+ if ( in_array( $field['name'], $template ) ) {
76
+ continue;
77
+ }
78
+
79
+ if ( ! isset( $field['type'] ) || $field['type'] != 'textarea' ) {
80
+ $field['type'] = 'text';
81
+ }
82
+
83
+ $billing_fields[ $field['name'] ] = $field;
84
+ $billing_fields[ $field['name'] ]['id'] = sprintf( '_%s', (string) $field['key'] );
85
+ $billing_fields[ $field['name'] ]['label'] = $field['label'];
86
+ $billing_fields[ $field['name'] ]['name'] = $field['key'];
87
+ $billing_fields[ $field['name'] ]['value'] = null;
88
+ $billing_fields[ $field['name'] ]['class'] = join( ' ', $field['class'] );
89
+ // $billing_fields[$field['name']]['wrapper_class'] = 'wooccm-premium';
90
+ }
91
+
92
+ return $billing_fields;
93
+ }
 
 
 
 
 
 
 
 
 
 
94
  }
95
 
96
  WOOCCM_Field_Controller_Billing::instance();
includes/controller/class-wooccm-field-shipping.php CHANGED
@@ -1,99 +1,91 @@
1
  <?php
2
 
3
- class WOOCCM_Field_Controller_Shipping extends WOOCCM_Field_Controller
4
- {
5
-
6
- protected static $_instance;
7
- public $shipping;
8
-
9
- public function __construct()
10
- {
11
- include_once(WOOCCM_PLUGIN_DIR . 'includes/model/class-wooccm-field-shipping.php');
12
-
13
- add_action('wooccm_sections_header', array($this, 'add_header'));
14
- add_action('woocommerce_sections_' . WOOCCM_PREFIX, array($this, 'add_section'), 99);
15
- add_filter('woocommerce_admin_shipping_fields', array($this, 'add_admin_shipping_fields'), 999);
16
- }
17
-
18
- public static function instance()
19
- {
20
- if (is_null(self::$_instance)) {
21
- self::$_instance = new self();
22
- }
23
- return self::$_instance;
24
- }
25
-
26
- // Admin
27
- // ---------------------------------------------------------------------------
28
-
29
- public function add_header()
30
- {
31
- global $current_section;
32
- ?>
33
- <li><a href="<?php echo esc_url( admin_url( 'admin.php?page=wc-settings&tab=wooccm&section=shipping' ) ); ?>" class="<?php echo ($current_section == 'shipping' ? 'current' : ''); ?>"><?php esc_html_e('Shipping', 'woocommerce-checkout-manager'); ?></a> | </li>
34
- <?php
35
- }
36
-
37
- public function add_section()
38
- {
39
-
40
- global $current_section, $wp_roles, $wp_locale;
41
-
42
- if ('shipping' == $current_section) {
43
-
44
- $fields = WOOCCM()->shipping->get_fields();
45
- $defaults = WOOCCM()->shipping->get_defaults();
46
- $types = WOOCCM()->shipping->get_types();
47
- $conditionals = WOOCCM()->shipping->get_conditional_types();
48
- $option = WOOCCM()->billing->get_option_types();
49
- $multiple = WOOCCM()->billing->get_multiple_types();
50
- $template = WOOCCM()->billing->get_template_types();
51
- $disabled = WOOCCM()->billing->get_disabled_types();
52
- $product_categories = $this->get_product_categories();
53
-
54
- include_once(WOOCCM_PLUGIN_DIR . 'includes/view/backend/pages/shipping.php');
55
- }
56
- }
57
-
58
- function add_admin_shipping_fields($shipping_fields)
59
- {
60
-
61
- if (!$fields = WOOCCM()->shipping->get_fields()) {
62
- return $shipping_fields;
63
- }
64
-
65
- $template = WOOCCM()->shipping->get_template_types();
66
-
67
- foreach ($fields as $field_id => $field) {
68
-
69
- if (!isset($field['name'])) {
70
- continue;
71
- }
72
-
73
- if (isset($shipping_fields[$field['name']])) {
74
- continue;
75
- }
76
-
77
- if (in_array($field['name'], $template)) {
78
- continue;
79
- }
80
-
81
- if (!isset($field['type']) || $field['type'] != 'textarea') {
82
- $field['type'] = 'text';
83
- }
84
-
85
- $shipping_fields[$field['name']] = $field;
86
- $shipping_fields[$field['name']]['id'] = sprintf('_%s', (string) $field['key']);
87
- $shipping_fields[$field['name']]['label'] = $field['label'];
88
- $shipping_fields[$field['name']]['name'] = $field['key'];
89
- $shipping_fields[$field['name']]['value'] = null;
90
- $shipping_fields[$field['name']]['class'] = join(' ', $field['class']);
91
- //$shipping_fields[$field['name']]['wrapper_class'] = 'wooccm-premium';
92
- }
93
-
94
-
95
- return $shipping_fields;
96
- }
97
  }
98
 
99
  WOOCCM_Field_Controller_Shipping::instance();
1
  <?php
2
 
3
+ class WOOCCM_Field_Controller_Shipping extends WOOCCM_Field_Controller {
4
+
5
+
6
+ protected static $_instance;
7
+ public $shipping;
8
+
9
+ public function __construct() {
10
+ include_once WOOCCM_PLUGIN_DIR . 'includes/model/class-wooccm-field-shipping.php';
11
+
12
+ add_action( 'wooccm_sections_header', array( $this, 'add_header' ) );
13
+ add_action( 'woocommerce_sections_' . WOOCCM_PREFIX, array( $this, 'add_section' ), 99 );
14
+ add_filter( 'woocommerce_admin_shipping_fields', array( $this, 'add_admin_shipping_fields' ), 999 );
15
+ }
16
+
17
+ public static function instance() {
18
+ if ( is_null( self::$_instance ) ) {
19
+ self::$_instance = new self();
20
+ }
21
+ return self::$_instance;
22
+ }
23
+
24
+ // Admin
25
+ // ---------------------------------------------------------------------------
26
+
27
+ public function add_header() {
28
+ global $current_section;
29
+ ?>
30
+ <li><a href="<?php echo esc_url( admin_url( 'admin.php?page=wc-settings&tab=wooccm&section=shipping' ) ); ?>" class="<?php echo ( $current_section == 'shipping' ? 'current' : '' ); ?>"><?php esc_html_e( 'Shipping', 'woocommerce-checkout-manager' ); ?></a> | </li>
31
+ <?php
32
+ }
33
+
34
+ public function add_section() {
35
+ global $current_section, $wp_roles, $wp_locale;
36
+
37
+ if ( 'shipping' == $current_section ) {
38
+
39
+ $fields = WOOCCM()->shipping->get_fields();
40
+ $defaults = WOOCCM()->shipping->get_defaults();
41
+ $types = WOOCCM()->shipping->get_types();
42
+ $conditionals = WOOCCM()->shipping->get_conditional_types();
43
+ $option = WOOCCM()->billing->get_option_types();
44
+ $multiple = WOOCCM()->billing->get_multiple_types();
45
+ $template = WOOCCM()->billing->get_template_types();
46
+ $disabled = WOOCCM()->billing->get_disabled_types();
47
+ $product_categories = $this->get_product_categories();
48
+
49
+ include_once WOOCCM_PLUGIN_DIR . 'includes/view/backend/pages/shipping.php';
50
+ }
51
+ }
52
+
53
+ function add_admin_shipping_fields( $shipping_fields ) {
54
+ if ( ! $fields = WOOCCM()->shipping->get_fields() ) {
55
+ return $shipping_fields;
56
+ }
57
+
58
+ $template = WOOCCM()->shipping->get_template_types();
59
+
60
+ foreach ( $fields as $field_id => $field ) {
61
+
62
+ if ( ! isset( $field['name'] ) ) {
63
+ continue;
64
+ }
65
+
66
+ if ( isset( $shipping_fields[ $field['name'] ] ) ) {
67
+ continue;
68
+ }
69
+
70
+ if ( in_array( $field['name'], $template ) ) {
71
+ continue;
72
+ }
73
+
74
+ if ( ! isset( $field['type'] ) || $field['type'] != 'textarea' ) {
75
+ $field['type'] = 'text';
76
+ }
77
+
78
+ $shipping_fields[ $field['name'] ] = $field;
79
+ $shipping_fields[ $field['name'] ]['id'] = sprintf( '_%s', (string) $field['key'] );
80
+ $shipping_fields[ $field['name'] ]['label'] = $field['label'];
81
+ $shipping_fields[ $field['name'] ]['name'] = $field['key'];
82
+ $shipping_fields[ $field['name'] ]['value'] = null;
83
+ $shipping_fields[ $field['name'] ]['class'] = join( ' ', $field['class'] );
84
+ // $shipping_fields[$field['name']]['wrapper_class'] = 'wooccm-premium';
85
+ }
86
+
87
+ return $shipping_fields;
88
+ }
 
 
 
 
 
 
 
 
89
  }
90
 
91
  WOOCCM_Field_Controller_Shipping::instance();
includes/model/class-wooccm-field-billing.php CHANGED
@@ -1,36 +1,33 @@
1
  <?php
2
 
3
- if (!class_exists('WOOCCM_Field_Billing')) {
4
 
5
- include_once(WOOCCM_PLUGIN_DIR . 'includes/model/class-wooccm-field.php');
6
 
7
- class WOOCCM_Field_Billing extends WOOCCM_Field
8
- {
9
 
10
- protected static $_instance;
11
- //protected $fields = array();
12
- protected $prefix = 'billing';
13
- protected $table = 'wooccm_billing';
14
- protected $defaults = array(
15
- 'country',
16
- 'first_name',
17
- 'last_name',
18
- 'company',
19
- 'address_1',
20
- 'address_2',
21
- 'city',
22
- 'state',
23
- 'postcode',
24
- 'email',
25
- 'phone'
26
- );
27
 
28
- public static function instance()
29
- {
30
- if (is_null(self::$_instance)) {
31
- self::$_instance = new self();
32
- }
33
- return self::$_instance;
34
- }
35
- }
36
  }
1
  <?php
2
 
3
+ if ( ! class_exists( 'WOOCCM_Field_Billing' ) ) {
4
 
5
+ include_once WOOCCM_PLUGIN_DIR . 'includes/model/class-wooccm-field.php';
6
 
7
+ class WOOCCM_Field_Billing extends WOOCCM_Field {
 
8
 
9
+ protected static $_instance;
10
+ protected $prefix = 'billing';
11
+ protected $table = 'wooccm_billing';
12
+ protected $defaults = array(
13
+ 'country',
14
+ 'first_name',
15
+ 'last_name',
16
+ 'company',
17
+ 'address_1',
18
+ 'address_2',
19
+ 'city',
20
+ 'state',
21
+ 'postcode',
22
+ 'email',
23
+ 'phone',
24
+ );
 
25
 
26
+ public static function instance() {
27
+ if ( is_null( self::$_instance ) ) {
28
+ self::$_instance = new self();
29
+ }
30
+ return self::$_instance;
31
+ }
32
+ }
 
33
  }
includes/model/class-wooccm-field-shipping.php CHANGED
@@ -1,33 +1,31 @@
1
  <?php
2
 
3
- if (!class_exists('WOOCCM_Field_Shipping')) {
4
 
5
- include_once(WOOCCM_PLUGIN_DIR . 'includes/model/class-wooccm-field.php');
6
 
7
- class WOOCCM_Field_Shipping extends WOOCCM_Field
8
- {
9
 
10
- protected static $_instance;
11
- protected $prefix = 'shipping';
12
- protected $table = 'wooccm_shipping';
13
- protected $defaults = array(
14
- 'country',
15
- 'first_name',
16
- 'last_name',
17
- 'company',
18
- 'address_1',
19
- 'address_2',
20
- 'city',
21
- 'state',
22
- 'postcode',
23
- );
24
 
25
- public static function instance()
26
- {
27
- if (is_null(self::$_instance)) {
28
- self::$_instance = new self();
29
- }
30
- return self::$_instance;
31
- }
32
- }
33
  }
1
  <?php
2
 
3
+ if ( ! class_exists( 'WOOCCM_Field_Shipping' ) ) {
4
 
5
+ include_once WOOCCM_PLUGIN_DIR . 'includes/model/class-wooccm-field.php';
6
 
7
+ class WOOCCM_Field_Shipping extends WOOCCM_Field {
 
8
 
9
+ protected static $_instance;
10
+ protected $prefix = 'shipping';
11
+ protected $table = 'wooccm_shipping';
12
+ protected $defaults = array(
13
+ 'country',
14
+ 'first_name',
15
+ 'last_name',
16
+ 'company',
17
+ 'address_1',
18
+ 'address_2',
19
+ 'city',
20
+ 'state',
21
+ 'postcode',
22
+ );
23
 
24
+ public static function instance() {
25
+ if ( is_null( self::$_instance ) ) {
26
+ self::$_instance = new self();
27
+ }
28
+ return self::$_instance;
29
+ }
30
+ }
 
31
  }
includes/model/class-wooccm-field.php CHANGED
@@ -231,20 +231,24 @@ class WOOCCM_Field extends WOOCCM_Model {
231
  }
232
 
233
  public function get_defaults() {
234
- return array();
235
- // return $this->get_default_fields();
236
  }
237
 
238
  public function get_default_fields() {
239
  $fields = array();
240
 
241
- if ( $this->prefix !== 'additional' ) {
 
 
 
 
 
242
 
243
  $prefix = sprintf( '%s_', $this->prefix );
244
 
245
- // $filters = WOOCCM_Fields_Register::instance();
246
- // fix nesting level
247
- // remove_filter('woocommerce_' . $prefix . 'fields', array($filters, 'add_' . $prefix . 'fields'));
248
  remove_all_filters( 'woocommerce_' . $prefix . 'fields' );
249
 
250
  $i = 0;
231
  }
232
 
233
  public function get_defaults() {
234
+ return $this->get_default_fields();
 
235
  }
236
 
237
  public function get_default_fields() {
238
  $fields = array();
239
 
240
+ /**
241
+ * Exclude from form actions to fix issue in myaccount edit billing and shipping form save
242
+ */
243
+ $form_action = WOOCCM_Field_Helpers::get_form_action();
244
+
245
+ if ( ! $form_action && $this->prefix !== 'additional' ) {
246
 
247
  $prefix = sprintf( '%s_', $this->prefix );
248
 
249
+ /**
250
+ * Fix nesting level
251
+ */
252
  remove_all_filters( 'woocommerce_' . $prefix . 'fields' );
253
 
254
  $i = 0;
includes/view/frontend/class-wooccm-fields-conditional.php CHANGED
@@ -48,9 +48,9 @@ class WOOCCM_Fields_Conditional {
48
  continue;
49
  }
50
 
51
- $action = $this->get_form_action();
52
 
53
- switch ( $action ) {
54
  case 'account':
55
  case 'save':
56
  $is_valid_conditional_field = $this->is_valid_conditional_field( $_POST, $field );
@@ -99,21 +99,6 @@ class WOOCCM_Fields_Conditional {
99
  return false;
100
  }
101
 
102
- public function get_form_action() {
103
-
104
- if ( isset( $_REQUEST['action'] ) && 'edit_address' === $_REQUEST['action'] ) {
105
- return 'account';
106
- }
107
-
108
- if ( isset( $_REQUEST['woocommerce-process-checkout-nonce'] ) ) {
109
- return 'save';
110
- }
111
-
112
- if ( isset( $_REQUEST['post_data'] ) && isset( $_REQUEST['wc-ajax'] ) && $_REQUEST['wc-ajax'] == 'update_order_review' ) {
113
- return 'update';
114
- }
115
- }
116
-
117
  public function add_field_attributes( $field ) {
118
  if ( ! empty( $field['conditional'] ) && ! empty( $field['conditional_parent_key'] ) && isset( $field['conditional_parent_value'] ) && ( $field['conditional_parent_key'] != $field['name'] ) ) {
119
  $field['class'][] = 'wooccm-conditional-child';
48
  continue;
49
  }
50
 
51
+ $form_action = WOOCCM_Field_Helpers::get_form_action();
52
 
53
+ switch ( $form_action ) {
54
  case 'account':
55
  case 'save':
56
  $is_valid_conditional_field = $this->is_valid_conditional_field( $_POST, $field );
99
  return false;
100
  }
101
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
102
  public function add_field_attributes( $field ) {
103
  if ( ! empty( $field['conditional'] ) && ! empty( $field['conditional_parent_key'] ) && isset( $field['conditional_parent_value'] ) && ( $field['conditional_parent_key'] != $field['name'] ) ) {
104
  $field['class'][] = 'wooccm-conditional-child';
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: checkout field editor, woocommerce checkout field editor, checkout manager
5
  Requires at least: 4.9
6
  Tested up to: 6.0.1
7
  Requires PHP: 5.6
8
- Stable tag: 6.3.1
9
  WC requires at least: 3.1.0
10
  WC tested up to: 6.9
11
  License: GPLv3
@@ -149,6 +149,10 @@ Your Order data can be reviewed in each order within the default WooCommerce Ord
149
 
150
  == Changelog ==
151
 
 
 
 
 
152
  = 6.3.1
153
  * Fix. WooCommerce Account fields
154
  * Fix. WooCommerce Checkout conditional field prices
5
  Requires at least: 4.9
6
  Tested up to: 6.0.1
7
  Requires PHP: 5.6
8
+ Stable tag: 6.3.2
9
  WC requires at least: 3.1.0
10
  WC tested up to: 6.9
11
  License: GPLv3
149
 
150
  == Changelog ==
151
 
152
+ = 6.3.2
153
+ * Fix. WooCommerce Account fields
154
+ * Fix. WooCommerce default billing & shipping fields
155
+
156
  = 6.3.1
157
  * Fix. WooCommerce Account fields
158
  * Fix. WooCommerce Checkout conditional field prices
woocommerce-checkout-manager.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: Checkout Fields Manager for WooCommerce
5
  * Plugin URI: https://quadlayers.com/portfolio/woocommerce-checkout-manager/
6
  * Description: Manage and customize WooCommerce Checkout fields (Add, Edit, Delete or re-order fields).
7
- * Version: 6.3.1
8
  * Author: QuadLayers
9
  * Author URI: https://quadlayers.com
10
  * License: GPLv3
@@ -17,7 +17,7 @@ if ( ! defined( 'ABSPATH' ) ) {
17
  }
18
 
19
  define( 'WOOCCM_PLUGIN_NAME', 'Checkout Fields Manager for WooCommerce' );
20
- define( 'WOOCCM_PLUGIN_VERSION', '6.3.1' );
21
  define( 'WOOCCM_PLUGIN_FILE', __FILE__ );
22
  define( 'WOOCCM_PLUGIN_DIR', __DIR__ . DIRECTORY_SEPARATOR );
23
  define( 'WOOCCM_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
4
  * Plugin Name: Checkout Fields Manager for WooCommerce
5
  * Plugin URI: https://quadlayers.com/portfolio/woocommerce-checkout-manager/
6
  * Description: Manage and customize WooCommerce Checkout fields (Add, Edit, Delete or re-order fields).
7
+ * Version: 6.3.2
8
  * Author: QuadLayers
9
  * Author URI: https://quadlayers.com
10
  * License: GPLv3
17
  }
18
 
19
  define( 'WOOCCM_PLUGIN_NAME', 'Checkout Fields Manager for WooCommerce' );
20
+ define( 'WOOCCM_PLUGIN_VERSION', '6.3.2' );
21
  define( 'WOOCCM_PLUGIN_FILE', __FILE__ );
22
  define( 'WOOCCM_PLUGIN_DIR', __DIR__ . DIRECTORY_SEPARATOR );
23
  define( 'WOOCCM_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );