/** * Adds endpoints. */ public function addEndpoints() { foreach ($this->endpoints as $endpoint) { $this->wp->addRewriteEndpoint($endpoint, EP_ROOT | EP_PAGES | EP_PERMALINK); } //$this->wp->flushRewriteRules(); }
/** * Adds rewrite endpoint for processing Jigoshop APIs */ public function addEndpoint() { $this->wp->addRewriteEndpoint(self::API_ENDPOINT, EP_ALL); }