Version Description
- Changed: Removed wooccm_admin_updater_notice()
- Changed: Using WC localisation for '%s is a required field.'
Download this release
Release Info
Developer | visser |
Plugin | WooCommerce Checkout Manager |
Version | 4.1.4 |
Comparing to | |
See all releases |
Code changes from version 4.1.3.1 to 4.1.4
- includes/admin.php +2 -1
- includes/checkout.php +2 -2
- includes/classes/main.php +4 -4
- includes/templates/functions/required/add_required.php +4 -4
- includes/templates/functions/required/billing_required.php +6 -6
- includes/templates/functions/required/shipping_required.php +6 -6
- readme.txt +5 -1
- script_wccs.js +93 -0
- woocommerce-checkout-manager.php +1 -1
includes/admin.php
CHANGED
@@ -1003,8 +1003,9 @@ function wooccm_admin_notices() {
|
|
1003 |
if( current_user_can( 'manage_options' ) == false )
|
1004 |
return;
|
1005 |
|
|
|
1006 |
// Data update from legacy (<3.0)
|
1007 |
-
wooccm_admin_updater_notice();
|
1008 |
|
1009 |
// Check whether we are on the WooCommerce Checkout Manager screen
|
1010 |
$screen = get_current_screen();
|
1003 |
if( current_user_can( 'manage_options' ) == false )
|
1004 |
return;
|
1005 |
|
1006 |
+
// @mod - Removed as it tends to blow people Options up...
|
1007 |
// Data update from legacy (<3.0)
|
1008 |
+
// wooccm_admin_updater_notice();
|
1009 |
|
1010 |
// Check whether we are on the WooCommerce Checkout Manager screen
|
1011 |
$screen = get_current_screen();
|
includes/checkout.php
CHANGED
@@ -419,7 +419,7 @@ function wooccm_custom_checkout_field_process() {
|
|
419 |
$btn['type'] !== 'heading'
|
420 |
) {
|
421 |
if( empty( $_POST[$btn['cow']] ) ) {
|
422 |
-
$message = sprintf( __( '%s is a required field.', 'woocommerce
|
423 |
wc_add_notice( $message, 'error' );
|
424 |
}
|
425 |
}
|
@@ -436,7 +436,7 @@ function wooccm_custom_checkout_field_process() {
|
|
436 |
$btn['type'] !== 'heading'
|
437 |
) {
|
438 |
if( ( sanitize_text_field( $_POST[$btn['cow']] ) == $btn['check_2'] ) && ( !empty ($btn['checkbox'] ) ) ) {
|
439 |
-
$message = sprintf( __( '%s is a required field.', 'woocommerce
|
440 |
wc_add_notice( $message, 'error' );
|
441 |
}
|
442 |
}
|
419 |
$btn['type'] !== 'heading'
|
420 |
) {
|
421 |
if( empty( $_POST[$btn['cow']] ) ) {
|
422 |
+
$message = sprintf( __( '%s is a required field.', 'woocommerce' ), '<strong>' . wooccm_wpml_string( $btn['label'] ) . '</strong>' );
|
423 |
wc_add_notice( $message, 'error' );
|
424 |
}
|
425 |
}
|
436 |
$btn['type'] !== 'heading'
|
437 |
) {
|
438 |
if( ( sanitize_text_field( $_POST[$btn['cow']] ) == $btn['check_2'] ) && ( !empty ($btn['checkbox'] ) ) ) {
|
439 |
+
$message = sprintf( __( '%s is a required field.', 'woocommerce' ), '<strong>' . wooccm_wpml_string( $btn['label'] ) . '</strong>' );
|
440 |
wc_add_notice( $message, 'error' );
|
441 |
}
|
442 |
}
|
includes/classes/main.php
CHANGED
@@ -913,7 +913,7 @@ function wooccm_remove_notices_conditional( $posted ) {
|
|
913 |
if( empty( $_POST[$btn2['cow']] ) ) {
|
914 |
foreach( $notice['error'] as $position => $value ) {
|
915 |
|
916 |
-
if( strip_tags( $value ) == sprintf( __( '%s is a required field.', 'woocommerce
|
917 |
unset( $notice['error'][$position] );
|
918 |
}
|
919 |
|
@@ -926,7 +926,7 @@ function wooccm_remove_notices_conditional( $posted ) {
|
|
926 |
} else {
|
927 |
foreach( $notice['error'] as $position => $value ) {
|
928 |
|
929 |
-
if( strip_tags( $value ) == sprintf( __( '%s is a required field.', 'woocommerce
|
930 |
unset( $notice['error'][$position] );
|
931 |
}
|
932 |
|
@@ -958,7 +958,7 @@ function wooccm_remove_notices_conditional( $posted ) {
|
|
958 |
if( empty( $_POST[$btn2['cow']] ) ) {
|
959 |
foreach( $notice['error'] as $position => $value ) {
|
960 |
|
961 |
-
if( strip_tags($value) == sprintf( __( '%s is a required field.', 'woocommerce
|
962 |
unset( $notice['error'][$position] );
|
963 |
}
|
964 |
|
@@ -973,7 +973,7 @@ function wooccm_remove_notices_conditional( $posted ) {
|
|
973 |
|
974 |
foreach( $notice['error'] as $position => $value ) {
|
975 |
|
976 |
-
if( strip_tags($value) == sprintf( __( '%s is a required field.', 'woocommerce
|
977 |
unset( $notice['error'][$position] );
|
978 |
}
|
979 |
|
913 |
if( empty( $_POST[$btn2['cow']] ) ) {
|
914 |
foreach( $notice['error'] as $position => $value ) {
|
915 |
|
916 |
+
if( strip_tags( $value ) == sprintf( __( '%s is a required field.', 'woocommerce' ), wooccm_wpml_string( $btn2['label'] ) ) ) {
|
917 |
unset( $notice['error'][$position] );
|
918 |
}
|
919 |
|
926 |
} else {
|
927 |
foreach( $notice['error'] as $position => $value ) {
|
928 |
|
929 |
+
if( strip_tags( $value ) == sprintf( __( '%s is a required field.', 'woocommerce' ), wooccm_wpml_string( $btn2['label'] ) ) ) {
|
930 |
unset( $notice['error'][$position] );
|
931 |
}
|
932 |
|
958 |
if( empty( $_POST[$btn2['cow']] ) ) {
|
959 |
foreach( $notice['error'] as $position => $value ) {
|
960 |
|
961 |
+
if( strip_tags($value) == sprintf( __( '%s is a required field.', 'woocommerce' ), wooccm_wpml_string( $btn2['label'] ) ) ) {
|
962 |
unset( $notice['error'][$position] );
|
963 |
}
|
964 |
|
973 |
|
974 |
foreach( $notice['error'] as $position => $value ) {
|
975 |
|
976 |
+
if( strip_tags($value) == sprintf( __( '%s is a required field.', 'woocommerce' ), wooccm_wpml_string( $btn2['label'] ) ) ) {
|
977 |
unset( $notice['error'][$position] );
|
978 |
}
|
979 |
|
includes/templates/functions/required/add_required.php
CHANGED
@@ -33,7 +33,7 @@ function wooccm_custom_checkout_process() {
|
|
33 |
if( in_array($values['product_id'], $show_field_array) && ( count($woocommerce->cart->cart_contents) < 2) ) {
|
34 |
if( !empty( $btn['checkbox'] ) && !empty( $btn['label'] ) && ( $btn['type'] !== 'changename' ) ) {
|
35 |
if( empty( $_POST[$btn['cow']] ) ) {
|
36 |
-
$message = sprintf( __( '%s is a required field.', 'woocommerce
|
37 |
wc_add_notice( $message, 'error' );
|
38 |
}
|
39 |
}
|
@@ -56,7 +56,7 @@ function wooccm_custom_checkout_process() {
|
|
56 |
if( in_array( $term->slug, $show_field_array_cat ) && ( count( $woocommerce->cart->cart_contents ) < 2 ) ) {
|
57 |
if( !empty ($btn['checkbox']) && !empty( $btn['label'] ) && ( $btn['type'] !== 'changename' ) ) {
|
58 |
if( empty( $_POST[$btn['cow']] ) ) {
|
59 |
-
$message = sprintf( __( '%s is a required field.', 'woocommerce
|
60 |
wc_add_notice( $message, 'error' );
|
61 |
}
|
62 |
}
|
@@ -80,7 +80,7 @@ function wooccm_custom_checkout_process() {
|
|
80 |
if( array_intersect( $productsarraycm, $show_field_array ) ) {
|
81 |
if( !empty( $btn['checkbox'] ) && !empty( $btn['label'] ) && ( $btn['type'] !== 'changename' ) ) {
|
82 |
if( empty( $_POST[$btn['cow']] ) ) {
|
83 |
-
$message = sprintf( __( '%s is a required field.', 'woocommerce
|
84 |
wc_add_notice( $message, 'error' );
|
85 |
}
|
86 |
}
|
@@ -98,7 +98,7 @@ function wooccm_custom_checkout_process() {
|
|
98 |
if( array_intersect( $categoryarraycm, $show_field_array_cat ) ) {
|
99 |
if( !empty( $btn['checkbox'] ) && !empty( $btn['label'] ) && ( $btn['type'] !== 'changename' ) ) {
|
100 |
if( empty( $_POST[$btn['cow']] ) ) {
|
101 |
-
$message = sprintf( __( '%s is a required field.', 'woocommerce
|
102 |
wc_add_notice( $message, 'error' );
|
103 |
}
|
104 |
}
|
33 |
if( in_array($values['product_id'], $show_field_array) && ( count($woocommerce->cart->cart_contents) < 2) ) {
|
34 |
if( !empty( $btn['checkbox'] ) && !empty( $btn['label'] ) && ( $btn['type'] !== 'changename' ) ) {
|
35 |
if( empty( $_POST[$btn['cow']] ) ) {
|
36 |
+
$message = sprintf( __( '%s is a required field.', 'woocommerce' ), '<strong>' . wooccm_wpml_string( $btn['label'] ) . '</strong>' );
|
37 |
wc_add_notice( $message, 'error' );
|
38 |
}
|
39 |
}
|
56 |
if( in_array( $term->slug, $show_field_array_cat ) && ( count( $woocommerce->cart->cart_contents ) < 2 ) ) {
|
57 |
if( !empty ($btn['checkbox']) && !empty( $btn['label'] ) && ( $btn['type'] !== 'changename' ) ) {
|
58 |
if( empty( $_POST[$btn['cow']] ) ) {
|
59 |
+
$message = sprintf( __( '%s is a required field.', 'woocommerce' ), '<strong>' . wooccm_wpml_string( $btn['label'] ) . '</strong>' );
|
60 |
wc_add_notice( $message, 'error' );
|
61 |
}
|
62 |
}
|
80 |
if( array_intersect( $productsarraycm, $show_field_array ) ) {
|
81 |
if( !empty( $btn['checkbox'] ) && !empty( $btn['label'] ) && ( $btn['type'] !== 'changename' ) ) {
|
82 |
if( empty( $_POST[$btn['cow']] ) ) {
|
83 |
+
$message = sprintf( __( '%s is a required field.', 'woocommerce' ), '<strong>' . wooccm_wpml_string( $btn['label'] ) . '</strong>' );
|
84 |
wc_add_notice( $message, 'error' );
|
85 |
}
|
86 |
}
|
98 |
if( array_intersect( $categoryarraycm, $show_field_array_cat ) ) {
|
99 |
if( !empty( $btn['checkbox'] ) && !empty( $btn['label'] ) && ( $btn['type'] !== 'changename' ) ) {
|
100 |
if( empty( $_POST[$btn['cow']] ) ) {
|
101 |
+
$message = sprintf( __( '%s is a required field.', 'woocommerce' ), '<strong>' . wooccm_wpml_string( $btn['label'] ) . '</strong>' );
|
102 |
wc_add_notice( $message, 'error' );
|
103 |
}
|
104 |
}
|
includes/templates/functions/required/billing_required.php
CHANGED
@@ -29,7 +29,7 @@ function wooccm_billing_custom_checkout_process() {
|
|
29 |
$btn['type'] !== 'heading'
|
30 |
) {
|
31 |
if( empty( $_POST[sprintf( 'billing_%s', $btn['cow'] )] ) ) {
|
32 |
-
$message = sprintf( __( '%s is a required field.', 'woocommerce
|
33 |
wc_add_notice( $message, 'error' );
|
34 |
}
|
35 |
}
|
@@ -46,7 +46,7 @@ function wooccm_billing_custom_checkout_process() {
|
|
46 |
$btn['type'] !== 'heading'
|
47 |
) {
|
48 |
if( ( sanitize_text_field( $_POST[sprintf( 'billing_%s', $btn['cow'] )] ) == $btn['check_2'] ) && ( !empty( $btn['checkbox'] ) ) ) {
|
49 |
-
$message = sprintf( __( '%s is a required field.', 'woocommerce
|
50 |
wc_add_notice( $message, 'error');
|
51 |
}
|
52 |
}
|
@@ -70,7 +70,7 @@ function wooccm_billing_custom_checkout_process() {
|
|
70 |
if( in_array( $values['product_id'], $show_field_array ) && ( count( $woocommerce->cart->cart_contents ) < 2 ) ) {
|
71 |
if( !empty( $btn['checkbox'] ) && !empty( $btn['label'] ) && ( $btn['type'] !== 'changename' ) ) {
|
72 |
if( empty( $_POST[sprintf( 'billing_%s', $btn['cow'] )] ) ) {
|
73 |
-
$message = sprintf( __( '%s is a required field.', 'woocommerce
|
74 |
wc_add_notice( $message, 'error' );
|
75 |
}
|
76 |
}
|
@@ -93,7 +93,7 @@ function wooccm_billing_custom_checkout_process() {
|
|
93 |
if( in_array( $term->slug, $show_field_array_cat ) && ( count( $woocommerce->cart->cart_contents ) < 2 ) ) {
|
94 |
if( !empty( $btn['checkbox'] ) && !empty( $btn['label'] ) && ( $btn['type'] !== 'changename' ) ) {
|
95 |
if( empty( $_POST[sprintf( 'billing_%s', $btn['cow'] )] ) ) {
|
96 |
-
$message = sprintf( __( '%s is a required field.', 'woocommerce
|
97 |
wc_add_notice( $message, 'error' );
|
98 |
}
|
99 |
}
|
@@ -117,7 +117,7 @@ function wooccm_billing_custom_checkout_process() {
|
|
117 |
if( array_intersect( $productsarraycm, $show_field_array ) ) {
|
118 |
if( !empty( $btn['checkbox'] ) && !empty( $btn['label'] ) && ( $btn['type'] !== 'changename' ) ) {
|
119 |
if( empty( $_POST[sprintf( 'billing_%s', $btn['cow'] )] ) ) {
|
120 |
-
$message = sprintf( __( '%s is a required field.', 'woocommerce
|
121 |
wc_add_notice( $message, 'error' );
|
122 |
}
|
123 |
}
|
@@ -135,7 +135,7 @@ function wooccm_billing_custom_checkout_process() {
|
|
135 |
if( array_intersect( $categoryarraycm, $show_field_array_cat ) ) {
|
136 |
if( !empty( $btn['checkbox'] ) && !empty( $btn['label'] ) && ( $btn['type'] !== 'changename' ) ) {
|
137 |
if( empty( $_POST[sprintf( 'billing_%s', $btn['cow'] )] ) ) {
|
138 |
-
$message = sprintf( __( '%s is a required field.', 'woocommerce
|
139 |
wc_add_notice( $message, 'error' );
|
140 |
}
|
141 |
}
|
29 |
$btn['type'] !== 'heading'
|
30 |
) {
|
31 |
if( empty( $_POST[sprintf( 'billing_%s', $btn['cow'] )] ) ) {
|
32 |
+
$message = sprintf( __( '%s is a required field.', 'woocommerce' ), '<strong>' . wooccm_wpml_string( $btn['label'] ) . '</strong>' );
|
33 |
wc_add_notice( $message, 'error' );
|
34 |
}
|
35 |
}
|
46 |
$btn['type'] !== 'heading'
|
47 |
) {
|
48 |
if( ( sanitize_text_field( $_POST[sprintf( 'billing_%s', $btn['cow'] )] ) == $btn['check_2'] ) && ( !empty( $btn['checkbox'] ) ) ) {
|
49 |
+
$message = sprintf( __( '%s is a required field.', 'woocommerce' ), '<strong>' . wooccm_wpml_string( $btn['label'] ) . '</strong>' );
|
50 |
wc_add_notice( $message, 'error');
|
51 |
}
|
52 |
}
|
70 |
if( in_array( $values['product_id'], $show_field_array ) && ( count( $woocommerce->cart->cart_contents ) < 2 ) ) {
|
71 |
if( !empty( $btn['checkbox'] ) && !empty( $btn['label'] ) && ( $btn['type'] !== 'changename' ) ) {
|
72 |
if( empty( $_POST[sprintf( 'billing_%s', $btn['cow'] )] ) ) {
|
73 |
+
$message = sprintf( __( '%s is a required field.', 'woocommerce' ), '<strong>' . wooccm_wpml_string( $btn['label'] ) . '</strong>' );
|
74 |
wc_add_notice( $message, 'error' );
|
75 |
}
|
76 |
}
|
93 |
if( in_array( $term->slug, $show_field_array_cat ) && ( count( $woocommerce->cart->cart_contents ) < 2 ) ) {
|
94 |
if( !empty( $btn['checkbox'] ) && !empty( $btn['label'] ) && ( $btn['type'] !== 'changename' ) ) {
|
95 |
if( empty( $_POST[sprintf( 'billing_%s', $btn['cow'] )] ) ) {
|
96 |
+
$message = sprintf( __( '%s is a required field.', 'woocommerce' ), '<strong>' . wooccm_wpml_string( $btn['label'] ) . '</strong>' );
|
97 |
wc_add_notice( $message, 'error' );
|
98 |
}
|
99 |
}
|
117 |
if( array_intersect( $productsarraycm, $show_field_array ) ) {
|
118 |
if( !empty( $btn['checkbox'] ) && !empty( $btn['label'] ) && ( $btn['type'] !== 'changename' ) ) {
|
119 |
if( empty( $_POST[sprintf( 'billing_%s', $btn['cow'] )] ) ) {
|
120 |
+
$message = sprintf( __( '%s is a required field.', 'woocommerce' ), '<strong>' . wooccm_wpml_string( $btn['label'] ) . '</strong>' );
|
121 |
wc_add_notice( $message, 'error' );
|
122 |
}
|
123 |
}
|
135 |
if( array_intersect( $categoryarraycm, $show_field_array_cat ) ) {
|
136 |
if( !empty( $btn['checkbox'] ) && !empty( $btn['label'] ) && ( $btn['type'] !== 'changename' ) ) {
|
137 |
if( empty( $_POST[sprintf( 'billing_%s', $btn['cow'] )] ) ) {
|
138 |
+
$message = sprintf( __( '%s is a required field.', 'woocommerce' ), '<strong>' . wooccm_wpml_string( $btn['label'] ) . '</strong>' );
|
139 |
wc_add_notice( $message, 'error' );
|
140 |
}
|
141 |
}
|
includes/templates/functions/required/shipping_required.php
CHANGED
@@ -33,7 +33,7 @@ function wooccm_shipping_custom_checkout_process() {
|
|
33 |
$btn['type'] !== 'heading'
|
34 |
) {
|
35 |
if( empty( $_POST[sprintf( 'shipping_%s', $btn['cow'] )] ) ) {
|
36 |
-
$message = sprintf( __( '%s is a required field.', 'woocommerce
|
37 |
wc_add_notice( $message, 'error' );
|
38 |
}
|
39 |
}
|
@@ -50,7 +50,7 @@ function wooccm_shipping_custom_checkout_process() {
|
|
50 |
$btn['type'] !== 'heading'
|
51 |
) {
|
52 |
if( ( sanitize_text_field( $_POST[sprintf( 'shipping_%s', $btn['cow'] )] ) == $btn['check_2'] ) && ( !empty( $btn['checkbox'] ) ) ) {
|
53 |
-
$message = sprintf( __( '%s is a required field.', 'woocommerce
|
54 |
wc_add_notice( $message, 'error');
|
55 |
}
|
56 |
}
|
@@ -75,7 +75,7 @@ function wooccm_shipping_custom_checkout_process() {
|
|
75 |
if( in_array( $values['product_id'], $show_field_array ) && ( count( $woocommerce->cart->cart_contents ) < 2) ) {
|
76 |
if( !empty( $btn['checkbox'] ) && !empty( $btn['label'] ) && ( $btn['type'] !== 'changename' ) ) {
|
77 |
if( empty( $_POST[sprintf( 'shipping_%s', $btn['cow'] )] ) ) {
|
78 |
-
$message = sprintf( __( '%s is a required field.', 'woocommerce
|
79 |
wc_add_notice( $message, 'error' );
|
80 |
}
|
81 |
}
|
@@ -98,7 +98,7 @@ function wooccm_shipping_custom_checkout_process() {
|
|
98 |
if( in_array( $term->slug, $show_field_array_cat ) && ( count( $woocommerce->cart->cart_contents ) < 2 ) ) {
|
99 |
if( !empty( $btn['checkbox'] ) && !empty( $btn['label'] ) && ( $btn['type'] !== 'changename' ) ) {
|
100 |
if( empty( $_POST[sprintf( 'shipping_%s', $btn['cow'] )] ) ) {
|
101 |
-
$message = sprintf( __( '%s is a required field.', 'woocommerce
|
102 |
wc_add_notice( $message, 'error' );
|
103 |
}
|
104 |
}
|
@@ -122,7 +122,7 @@ function wooccm_shipping_custom_checkout_process() {
|
|
122 |
if(array_intersect( $productsarraycm, $show_field_array ) ){
|
123 |
if( !empty( $btn['checkbox'] ) && !empty( $btn['label'] ) && ( $btn['type'] !== 'changename' ) ) {
|
124 |
if( empty( $_POST[sprintf( 'shipping_%s', $btn['cow'] )] ) ) {
|
125 |
-
$message = sprintf( __( '%s is a required field.', 'woocommerce
|
126 |
wc_add_notice( $message, 'error' );
|
127 |
}
|
128 |
}
|
@@ -140,7 +140,7 @@ function wooccm_shipping_custom_checkout_process() {
|
|
140 |
if( array_intersect( $categoryarraycm, $show_field_array_cat ) ) {
|
141 |
if( !empty( $btn['checkbox'] ) && !empty( $btn['label'] ) && ( $btn['type'] !== 'changename' ) ) {
|
142 |
if( empty( $_POST[sprintf( 'shipping_%s', $btn['cow'] )] ) ) {
|
143 |
-
$message = sprintf( __( '%s is a required field.', 'woocommerce
|
144 |
wc_add_notice( $message, 'error' );
|
145 |
}
|
146 |
}
|
33 |
$btn['type'] !== 'heading'
|
34 |
) {
|
35 |
if( empty( $_POST[sprintf( 'shipping_%s', $btn['cow'] )] ) ) {
|
36 |
+
$message = sprintf( __( '%s is a required field.', 'woocommerce' ), '<strong>' . wooccm_wpml_string( $btn['label'] ) . '</strong>' );
|
37 |
wc_add_notice( $message, 'error' );
|
38 |
}
|
39 |
}
|
50 |
$btn['type'] !== 'heading'
|
51 |
) {
|
52 |
if( ( sanitize_text_field( $_POST[sprintf( 'shipping_%s', $btn['cow'] )] ) == $btn['check_2'] ) && ( !empty( $btn['checkbox'] ) ) ) {
|
53 |
+
$message = sprintf( __( '%s is a required field.', 'woocommerce' ), '<strong>' . wooccm_wpml_string( $btn['label'] ) . '</strong>' );
|
54 |
wc_add_notice( $message, 'error');
|
55 |
}
|
56 |
}
|
75 |
if( in_array( $values['product_id'], $show_field_array ) && ( count( $woocommerce->cart->cart_contents ) < 2) ) {
|
76 |
if( !empty( $btn['checkbox'] ) && !empty( $btn['label'] ) && ( $btn['type'] !== 'changename' ) ) {
|
77 |
if( empty( $_POST[sprintf( 'shipping_%s', $btn['cow'] )] ) ) {
|
78 |
+
$message = sprintf( __( '%s is a required field.', 'woocommerce' ), '<strong>' . wooccm_wpml_string( $btn['label'] ) . '</strong>' );
|
79 |
wc_add_notice( $message, 'error' );
|
80 |
}
|
81 |
}
|
98 |
if( in_array( $term->slug, $show_field_array_cat ) && ( count( $woocommerce->cart->cart_contents ) < 2 ) ) {
|
99 |
if( !empty( $btn['checkbox'] ) && !empty( $btn['label'] ) && ( $btn['type'] !== 'changename' ) ) {
|
100 |
if( empty( $_POST[sprintf( 'shipping_%s', $btn['cow'] )] ) ) {
|
101 |
+
$message = sprintf( __( '%s is a required field.', 'woocommerce' ), '<strong>' . wooccm_wpml_string( $btn['label'] ) . '</strong>' );
|
102 |
wc_add_notice( $message, 'error' );
|
103 |
}
|
104 |
}
|
122 |
if(array_intersect( $productsarraycm, $show_field_array ) ){
|
123 |
if( !empty( $btn['checkbox'] ) && !empty( $btn['label'] ) && ( $btn['type'] !== 'changename' ) ) {
|
124 |
if( empty( $_POST[sprintf( 'shipping_%s', $btn['cow'] )] ) ) {
|
125 |
+
$message = sprintf( __( '%s is a required field.', 'woocommerce' ), '<strong>' . wooccm_wpml_string( $btn['label'] ) . '</strong>' );
|
126 |
wc_add_notice( $message, 'error' );
|
127 |
}
|
128 |
}
|
140 |
if( array_intersect( $categoryarraycm, $show_field_array_cat ) ) {
|
141 |
if( !empty( $btn['checkbox'] ) && !empty( $btn['label'] ) && ( $btn['type'] !== 'changename' ) ) {
|
142 |
if( empty( $_POST[sprintf( 'shipping_%s', $btn['cow'] )] ) ) {
|
143 |
+
$message = sprintf( __( '%s is a required field.', 'woocommerce' ), '<strong>' . wooccm_wpml_string( $btn['label'] ) . '</strong>' );
|
144 |
wc_add_notice( $message, 'error' );
|
145 |
}
|
146 |
}
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ 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.
|
9 |
License: GPLv2 or later
|
10 |
|
11 |
Manages WooCommerce Checkout, the advanced way.
|
@@ -135,6 +135,10 @@ Example:
|
|
135 |
|
136 |
== Changelog ==
|
137 |
|
|
|
|
|
|
|
|
|
138 |
= 4.1.3.1 =
|
139 |
* Fixed: Incorrectly calling Order ID in admin.php (thanks Anik)
|
140 |
|
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 |
|
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.'
|
141 |
+
|
142 |
= 4.1.3.1 =
|
143 |
* Fixed: Incorrectly calling Order ID in admin.php (thanks Anik)
|
144 |
|
script_wccs.js
ADDED
@@ -0,0 +1,93 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
@@ -6,7 +6,7 @@ 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.
|
10 |
Text Domain: woocommerce-checkout-manager
|
11 |
Domain Path: /languages/
|
12 |
License: GPLv2 or later
|
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
|