WC_Query::add_endpoints()publicWC 1.0

Add endpoints for query vars.

Method of the class: WC_Query{}

No Hooks.

Return

null. Nothing (null).

Usage

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

WC_Query::add_endpoints() code WC 8.9.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 );
		}
	}
}