WC_Product_Importer::get_existing_attribute_taxonomy_id
Get the ID of an existing global attribute taxonomy, without creating it when it is missing.
Метод класса: WC_Product_Importer{}
Хуков нет.
Возвращает
int. Attribute taxonomy ID, or 0 when no such global attribute exists.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->get_existing_attribute_taxonomy_id( $raw_name );
- $raw_name(строка) (обязательный)
- Attribute name or label.
Список изменений
| С версии 11.1.0 | Введена. |
Код WC_Product_Importer::get_existing_attribute_taxonomy_id() WC Product Importer::get existing attribute taxonomy id WC 11.2.1
protected function get_existing_attribute_taxonomy_id( $raw_name ) {
return (int) wc_attribute_taxonomy_id_by_name( $this->get_attribute_taxonomy_name_from_raw_name( $raw_name ) );
}