WC_Widget_Layered_Nav::get_current_taxonomy()protectedWC 1.0

Return the currently viewed taxonomy name.

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_current_taxonomy();

WC_Widget_Layered_Nav::get_current_taxonomy() code WC 8.6.1

protected function get_current_taxonomy() {
	return is_tax() ? get_queried_object()->taxonomy : '';
}