rest_api_init, $wp_rest_server
rest_api_init, $wp_rest_server
Appears in: woocommerce.11.0.0
Hook Type: action
Displaying hooks found in version: woocommerce.11.0.0do_action('rest_api_init, $wp_rest_server') is found 1 times:
- /includes/cli/class-wc-cli-runner.php line 59
*/ public static function after_wp_load() { global $wp_rest_server; $wp_rest_server = new WP_REST_Server(); do_action( 'rest_api_init', $wp_rest_server ); $request = new WP_REST_Request( 'GET', '/' ); $request->set_param( 'context', 'help' ); $response = $wp_rest_server->dispatch( $request ); $response_data = $response->get_data(); if ( empty( $response_data ) ) {