add endpoints on install
This commit is contained in:
parent
94335db2a6
commit
17ca08c020
|
@ -73,7 +73,7 @@ class WC_API {
|
|||
* @since 2.0
|
||||
* @return void
|
||||
*/
|
||||
public function add_endpoint() {
|
||||
public static function add_endpoint() {
|
||||
|
||||
// REST API
|
||||
add_rewrite_rule( '^wc-api/v([1-2]{1})/?$', 'index.php?wc-api-version=$matches[1]&wc-api-route=/', 'top' );
|
||||
|
|
|
@ -97,6 +97,8 @@ class WC_Install {
|
|||
// Also register endpoints - this needs to be done prior to rewrite rule flush
|
||||
WC()->query->init_query_vars();
|
||||
WC()->query->add_endpoints();
|
||||
WC_API::add_endpoint();
|
||||
WC_AJAX::add_endpoint();
|
||||
|
||||
self::create_terms();
|
||||
self::create_cron_jobs();
|
||||
|
|
Loading…
Reference in New Issue