Merge pull request #18651 from woocommerce/fix/18645-cast-multiselect-values

Cast multiselect keys as strings
This commit is contained in:
Claudiu Lodromanean 2018-01-30 06:16:47 -08:00 committed by GitHub
commit 94caad1af3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -378,9 +378,9 @@ if ( ! class_exists( 'WC_Admin_Settings', false ) ) :
<?php
if ( is_array( $option_value ) ) {
selected( in_array( $key, $option_value, true ), true );
selected( in_array( (string) $key, $option_value, true ), true );
} else {
selected( $option_value, $key );
selected( $option_value, (string) $key );
}
?>