Automattic\WooCommerce\RestApi
Server::init()
Hook into WordPress ready to init the REST API as needed.
Method of the class: Server{}
No Hooks.
Return
null
. Nothing (null).
Usage
$Server = new Server(); $Server->init();
Server::init() Server::init code WC 9.5.1
public function init() { // phpcs:ignore WooCommerce.Functions.InternalInjectionMethod -- Not an injection method. add_action( 'rest_api_init', array( $this, 'register_rest_routes' ), 10 ); \WC_REST_System_Status_V2_Controller::register_cache_clean(); }