WordPress at Your Fingertips
function is not described

WC_Widget_Layered_Nav::get_instance_taxonomy() protected WC 1.0

Get this widgets taxonomy.

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

No Hooks.

Return

String.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_instance_taxonomy( $instance );
$instance(array) (required)
Array of instance options.

Code of WC_Widget_Layered_Nav::get_instance_taxonomy() WC 5.8.0

protected function get_instance_taxonomy( $instance ) {
	if ( isset( $instance['attribute'] ) ) {
		return wc_attribute_taxonomy_name( $instance['attribute'] );
	}

	$attribute_taxonomies = wc_get_attribute_taxonomies();

	if ( ! empty( $attribute_taxonomies ) ) {
		foreach ( $attribute_taxonomies as $tax ) {
			if ( taxonomy_exists( wc_attribute_taxonomy_name( $tax->attribute_name ) ) ) {
				return wc_attribute_taxonomy_name( $tax->attribute_name );
			}
		}
	}

	return '';
}