function_exists check

This commit is contained in:
Boro Sitnikovski 2017-05-24 20:22:58 +02:00
parent c7c4cfbae5
commit e68977d021
1 changed files with 1 additions and 1 deletions

View File

@ -656,7 +656,7 @@ class WC_Checkout {
if ( ! empty( $valid_states ) && is_array( $valid_states ) && sizeof( $valid_states ) > 0 ) {
$valid_state_values = array_flip( array_map( 'strtoupper', $valid_states ) );
$data[ $key ] = mb_strtoupper( $data[ $key ] );
$data[ $key ] = function_exists( 'mb_strtoupper' ) ? mb_strtoupper( $data[ $key ] ) : strtoupper( $data[ $key ] );
if ( isset( $valid_state_values[ $data[ $key ] ] ) ) {
// With this part we consider state value to be valid as well, convert it to the state key for the valid_states check below.