Check if posted data is_array before doing wc_clean in checkout
This commit is contained in:
parent
4c18ab831a
commit
6302c0fb8a
|
@ -487,7 +487,7 @@ class WC_Checkout {
|
|||
$this->posted[ $key ] = isset( $_POST[ $key ] ) ? wp_strip_all_tags( wp_check_invalid_utf8( stripslashes( $_POST[ $key ] ) ) ) : '';
|
||||
break;
|
||||
default :
|
||||
$this->posted[ $key ] = isset( $_POST[ $key ] ) ? wc_clean( $_POST[ $key ] ) : '';
|
||||
$this->posted[ $key ] = isset( $_POST[ $key ] ) ? ( is_array( $_POST[ $key ] ) ? array_map( 'wc_clean', $_POST[ $key ] ) : wc_clean( $_POST[ $key ] ) ) : '';
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue