/**
  * Returns system status JSON array
  */
 public function system_status()
 {
     $status = new WC_POS_Status();
     WC_POS_Server::response($status->output());
 }
 /**
  * POS Frontend will give 404 if pretty permalinks not active
  * - requires autoloader, ie: WC_POS()
  */
 private function permalink_check()
 {
     $fail = WC_POS_Status::permalinks_disabled();
     if ($fail) {
         $message = $fail['message'] . '. ';
         $message .= sprintf('<a href="%s">%s</a>', $fail['buttons'][0]['href'], $fail['buttons'][0]['prompt']) . ' &raquo;';
         WC_POS_Admin_Notices::add($message);
     }
 }
Example #3
0
<?php

$status = new WC_POS_Status();
foreach ($status->output() as $test) {
    $args = wp_parse_args($test, array('pass' => false, 'title' => '', 'message' => '', 'buttons' => array()));
    extract($args);
    ?>
  <li class="list-row">
    <div class="result">
      <i class="icon-<?php 
    echo $pass ? 'success' : 'error';
    ?>
 icon-lg text-<?php 
    echo $pass ? 'success' : 'error';
    ?>
"></i>
    </div>
    <div class="title"><?php 
    echo $title;
    ?>
</div>
    <div class="message">
      <?php 
    echo $message;
    ?>
      <?php 
    foreach ($buttons as $button) {
        $href = isset($button['href']) ? $button['href'] : '#';
        $action = isset($button['action']) ? 'data-action="' . esc_attr($button['action']) . '"' : '';
        $prompt = isset($button['prompt']) ? $button['prompt'] : '';
        ?>
 /**
  * Returns system status JSON array
  */
 public function system_status()
 {
     $status = new WC_POS_Status();
     $this->serve_response($status->output());
 }