WC_Query::get_current_endpoint()publicWC 1.0

Get query current active query var.

Method of the class: WC_Query{}

No Hooks.

Return

String.

Usage

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

WC_Query::get_current_endpoint() code WC 8.6.1

public function get_current_endpoint() {
	global $wp;

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