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.


Top ↑

Return Return

(string) Return an empty string if attribute doesn't exist.


Top ↑

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 );
}

Top ↑

Changelog Changelog

Changelog
Version Description
2.4.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.