WC_Brands::get_brand_name_first_character
Get the first letter of the brand name, returning lowercase and without accents.
Метод класса: WC_Brands{}
Хуков нет.
Возвращает
Строку.
Использование
// private - только в коде основоного (родительского) класса $result = $this->get_brand_name_first_character( $name );
- $name(строка) (обязательный)
- .
Список изменений
| С версии 9.4.0 | Введена. |
Код WC_Brands::get_brand_name_first_character() WC Brands::get brand name first character WC 10.4.2
private function get_brand_name_first_character( $name ) {
// Convert to lowercase and remove accents.
$clean_name = strtolower( sanitize_title( $name ) );
// Return the first letter of the name.
return substr( $clean_name, 0, 1 );
}