WC_Brands::get_brand_name_first_character()
Get the first letter of the brand name, returning lowercase and without accents.
Method of the class: WC_Brands{}
No Hooks.
Return
String
.
Usage
// private - for code of main (parent) class only $result = $this->get_brand_name_first_character( $name );
- $name(string) (required)
- -
Changelog
Since 9.4.0 | Introduced. |
WC_Brands::get_brand_name_first_character() WC Brands::get brand name first character code WC 9.5.1
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 ); }