Merge pull request #18651 from woocommerce/fix/18645-cast-multiselect-values
Cast multiselect keys as strings
This commit is contained in:
commit
94caad1af3
|
@ -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 );
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue