WC_API::init()
Init the API by setting up action and filter hooks.
Description Description
Source Source
File: includes/class-wc-api.php
public function init() { parent::init(); add_action( 'init', array( $this, 'add_endpoint' ), 0 ); add_filter( 'query_vars', array( $this, 'add_query_vars' ), 0 ); add_action( 'parse_request', array( $this, 'handle_api_requests' ), 0 ); add_action( 'rest_api_init', array( $this, 'register_wp_admin_settings' ) ); }