WC_Query::add_endpoints
Add endpoints for query vars.
Method of the class: WC_Query{}
No Hooks.
Returns
null. Nothing (null).
Usage
$WC_Query = new WC_Query(); $WC_Query->add_endpoints();
WC_Query::add_endpoints() WC Query::add endpoints code WC 10.8.1
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 );
}
}
}