WC_REST_Product_Attributes_V1_Controller::get_taxonomy() protected WC 1.0
Get attribute name.
{} It's a method of the class: WC_REST_Product_Attributes_V1_Controller{}
No Hooks.
Return
String.
Usage
// protected - for code of main (parent) or child class $result = $this->get_taxonomy( $request );
- $request(WP_REST_Request) (required)
- Full details about the request.
Code of WC_REST_Product_Attributes_V1_Controller::get_taxonomy() WC REST Product Attributes V1 Controller::get taxonomy WC 5.0.0
protected function get_taxonomy( $request ) {
if ( '' !== $this->attribute ) {
return $this->attribute;
}
if ( $request['id'] ) {
$name = wc_attribute_taxonomy_name_by_id( (int) $request['id'] );
$this->attribute = $name;
}
return $this->attribute;
}