WC_REST_System_Status_Tools_V2_Controller::get_items()
Get a list of system status tools.
Method of the class: WC_REST_System_Status_Tools_V2_Controller{}
No Hooks.
Return
WP_Error|WP_REST_Response
.
Usage
$WC_REST_System_Status_Tools_V2_Controller = new WC_REST_System_Status_Tools_V2_Controller(); $WC_REST_System_Status_Tools_V2_Controller->get_items( $request );
- $request(WP_REST_Request) (required)
- Full details about the request.
WC_REST_System_Status_Tools_V2_Controller::get_items() WC REST System Status Tools V2 Controller::get items code WC 9.3.1
public function get_items( $request ) { $tools = array(); foreach ( $this->get_tools() as $id => $tool ) { $tools[] = $this->prepare_response_for_collection( $this->prepare_item_for_response( array( 'id' => $id, 'name' => $tool['name'], 'action' => $tool['button'], 'description' => $tool['desc'], ), $request ) ); } $response = rest_ensure_response( $tools ); return $response; }