public function update_item($request)
{
$tools = $this->get_tools();
if (empty($tools[$request['id']])) {
return new WP_Error('woocommerce_rest_system_status_tool_invalid_id', __('Invalid tool ID.', 'woocommerce'), array('status' => 404));
}
$tool = $tools[$request['id']];
$tool = array('id' => $request['id'], 'name' => $tool['name'], 'action' => $tool['button'], 'description' => $tool['desc']);
$execute_return = $this->execute_tool($request['id']);
$tool = array_merge($tool, $execute_return);
$request->set_param('context', 'edit');
$response = $this->prepare_item_for_response($tool, $request);
return rest_ensure_response($response);
}