execute_tool() публичный Метод

Actually executes a a tool.
public execute_tool ( string $tool ) : array
$tool string
Результат array
 /**
  * Handles output of tools.
  */
 public static function status_tools()
 {
     global $wpdb;
     $tools = self::get_tools();
     if (!empty($_GET['action']) && !empty($_REQUEST['_wpnonce']) && wp_verify_nonce($_REQUEST['_wpnonce'], 'debug_action')) {
         $tools_controller = new WC_REST_System_Status_Tools_Controller();
         $action = wc_clean($_GET['action']);
         if (array_key_exists($action, $tools)) {
             $response = $tools_controller->execute_tool($action);
         } else {
             $response = array('success' => false, 'message' => __('Tool does not exist.', 'woocommerce'));
         }
         if ($response['success']) {
             echo '<div class="updated inline"><p>' . esc_html($response['message']) . '</p></div>';
         } else {
             echo '<div class="error inline"><p>' . esc_html($response['message']) . '</p></div>';
         }
     }
     // Display message if settings settings have been saved
     if (isset($_REQUEST['settings-updated'])) {
         echo '<div class="updated inline"><p>' . __('Your changes have been saved.', 'woocommerce') . '</p></div>';
     }
     include_once dirname(__FILE__) . '/views/html-admin-page-status-tools.php';
 }