convert string to lowercase before checking value in wc_string_to_bool

This commit is contained in:
Gerhard 2019-08-06 14:10:31 +02:00
parent bccb7c3283
commit 44421facfe
1 changed files with 1 additions and 1 deletions

View File

@ -18,7 +18,7 @@ defined( 'ABSPATH' ) || exit;
* @return bool
*/
function wc_string_to_bool( $string ) {
return is_bool( $string ) ? $string : ( 'yes' === $string || 1 === $string || 'true' === $string || '1' === $string );
return is_bool( $string ) ? $string : ( 'yes' === strtolower( $string ) || 1 === $string || 'true' === strtolower( $string ) || '1' === $string );
}
/**