introduced the wc_strtolower() function, closes #6575
This commit is contained in:
parent
40bd9bc974
commit
42820ea88d
|
@ -589,3 +589,15 @@ function wc_format_phone_number( $tel ) {
|
||||||
$tel = str_replace( '.', '-', $tel );
|
$tel = str_replace( '.', '-', $tel );
|
||||||
return $tel;
|
return $tel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Make a string lowercase.
|
||||||
|
* Try to use mb_strtolower() when available.
|
||||||
|
*
|
||||||
|
* @since 2.3
|
||||||
|
* @param string $string
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
function wc_strtolower( $string ) {
|
||||||
|
return function_exists( 'mb_strtolower' ) ? mb_strtolower( $string ) : strtolower( $string );
|
||||||
|
}
|
||||||
|
|
|
@ -56,7 +56,7 @@ function wc_get_order_status_name( $status ) {
|
||||||
$status = 'wc-' === substr( $status, 0, 3 ) ? substr( $status, 3 ) : $status;
|
$status = 'wc-' === substr( $status, 0, 3 ) ? substr( $status, 3 ) : $status;
|
||||||
$status = isset( $statuses[ 'wc-' . $status ] ) ? $statuses[ 'wc-' . $status ] : $status;
|
$status = isset( $statuses[ 'wc-' . $status ] ) ? $statuses[ 'wc-' . $status ] : $status;
|
||||||
|
|
||||||
return function_exists( 'mb_strtolower' ) ? mb_strtolower( $status ) : strtolower( $status );
|
return wc_strtolower( $status );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue