WC_Widget_Layered_Nav::get_current_term_slug()protectedWC 1.0

Return the currently viewed term slug.

Метод класса: WC_Widget_Layered_Nav{}

Хуков нет.

Возвращает

int.

Использование

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->get_current_term_slug();

Код WC_Widget_Layered_Nav::get_current_term_slug() WC 8.7.0

protected function get_current_term_slug() {
	return absint( is_tax() ? get_queried_object()->slug : 0 );
}