WordPress at Your Fingertips
function is not described

WC_Query::add_endpoints() public WC 1.0

Add endpoints for query vars.

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

No Hooks.

Return

null. Nothing.

Usage

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

Code of WC_Query::add_endpoints() WC 5.6.0

public function add_endpoints() {
	$mask = $this->get_endpoints_mask();

	foreach ( $this->get_query_vars() as $key => $var ) {
		if ( ! empty( $var ) ) {
			add_rewrite_endpoint( $var, $mask );
		}
	}
}