WC_Query::get_current_endpoint()publicWC 1.0

Get query current active query var.

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

Хуков нет.

Возвращает

Строку.

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

$WC_Query = new WC_Query();
$WC_Query->get_current_endpoint();

Код WC_Query::get_current_endpoint() WC 8.7.0

public function get_current_endpoint() {
	global $wp;

	foreach ( $this->get_query_vars() as $key => $value ) {
		if ( isset( $wp->query_vars[ $key ] ) ) {
			return $key;
		}
	}
	return '';
}