wc_get_string_before_colon()
Get part of a string before :.
Used for example in shipping methods ids where they take the format method_id:instance_id
Хуков нет.
Возвращает
Строку
.
Использование
wc_get_string_before_colon( $string );
- $string(строка) (обязательный)
- String to extract.
Список изменений
С версии 3.2.0 | Введена. |
Код wc_get_string_before_colon() wc get string before colon WC 8.7.0
function wc_get_string_before_colon( $string ) { return trim( current( explode( ':', (string) $string ) ) ); }