Unchecked checkbox should be an empty string

Closes #16184
This commit is contained in:
Mike Jolley 2017-07-19 14:58:46 +01:00
parent 263a9123a7
commit 578da2d126
1 changed files with 1 additions and 1 deletions

View File

@ -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 ] ) ) : '';