WordPress at Your Fingertips
function is not described

WC_API::init() public WC 1.0

Init the API by setting up action and filter hooks.

{} It's a method of the class: WC_API{}

No Hooks.

Return

null. Nothing.

Usage

$WC_API = new WC_API();
$WC_API->init();

Code of WC_API::init() WC 5.9.0

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' ) );
}