WC_REST_Products_V2_Controller::get_attribute_taxonomy_label
Deprecated since 3.0.0. It is no longer supported and may be removed in future releases. It is recommended to replace this function with the same one.
Get attribute taxonomy label.
Method of the class: WC_REST_Products_V2_Controller{}
No Hooks.
Returns
String.
Usage
// protected - for code of main (parent) or child class $result = $this->get_attribute_taxonomy_label( $name );
- $name(string) (required)
- Taxonomy name.
Changelog
| Deprecated since | 3.0.0 |
WC_REST_Products_V2_Controller::get_attribute_taxonomy_label() WC REST Products V2 Controller::get attribute taxonomy label code WC 10.3.6
protected function get_attribute_taxonomy_label( $name ) {
$tax = get_taxonomy( $name );
$labels = get_taxonomy_labels( $tax );
return $labels->singular_name;
}