Merge pull request #16188 from woocommerce/fix/16184
Unchecked checkbox should be an empty string
This commit is contained in:
commit
0a5cbae506
|
@ -562,7 +562,7 @@ class WC_Checkout {
|
|||
|
||||
switch ( $type ) {
|
||||
case 'checkbox' :
|
||||
$value = (int) isset( $_POST[ $key ] );
|
||||
$value = isset( $_POST[ $key ] ) ? 1 : '';
|
||||
break;
|
||||
case 'multiselect' :
|
||||
$value = isset( $_POST[ $key ] ) ? implode( ', ', wc_clean( $_POST[ $key ] ) ) : '';
|
||||
|
|
Loading…
Reference in New Issue