WordPress at Your Fingertips
function is not described

WC_Query::get_current_endpoint() public WC 1.0

Get query current active query var.

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

No Hooks.

Return

String.

Usage

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

Code of WC_Query::get_current_endpoint() WC 5.7.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 '';
}