WordPress at Your Fingertips
function is not described

WC_REST_Terms_Controller::get_taxonomy() protected WC 1.0

Get taxonomy.

{} It's a method of the class: WC_REST_Terms_Controller{}

No Hooks.

Return

Int|WP_Error.

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_Terms_Controller::get_taxonomy() WC 5.6.0

protected function get_taxonomy( $request ) {
	$attribute_id = $request['attribute_id'];

	if ( empty( $attribute_id ) ) {
		return $this->taxonomy;
	}

	if ( isset( $this->taxonomies_by_id[ $attribute_id ] ) ) {
		return $this->taxonomies_by_id[ $attribute_id ];
	}

	$taxonomy = WC()->call_function( 'wc_attribute_taxonomy_name_by_id', (int) $request['attribute_id'] );
	if ( ! empty( $taxonomy ) ) {
		$this->taxonomy                          = $taxonomy;
		$this->taxonomies_by_id[ $attribute_id ] = $taxonomy;
	}

	return $taxonomy;
}