wc_attribute_taxonomy_name_by_id( int $attribute_id )
Get a product attribute name by ID.
Description Description
Parameters Parameters
- $attribute_id
-
(Required) Attribute ID.
Return Return
(string) Return an empty string if attribute doesn't exist.
Source Source
File: includes/wc-attribute-functions.php
function wc_attribute_taxonomy_name_by_id( $attribute_id ) { $taxonomy_ids = wc_get_attribute_taxonomy_ids(); $attribute_name = (string) array_search( $attribute_id, $taxonomy_ids, true ); return wc_attribute_taxonomy_name( $attribute_name ); }
Changelog Changelog
Version | Description |
---|---|
2.4.0 | Introduced. |