WC_API::init()publicWC 1.0

Init the API by setting up action and filter hooks.

Метод класса: WC_API{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

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

Код WC_API::init() WC 8.7.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' ) );
}