/** * @return mixed|void */ public function payload() { WC_POS_Server::check_ajax_referer(); $this->params = new WC_POS_Params(); $payload = array('templates' => $this->templates_payload(), 'params' => $this->params->payload(), 'i18n' => WC_POS_i18n::payload()); WC_POS_Server::response($payload); }
/** * Force update translations from AJAX */ public function update_translations() { // security WC_POS_Server::check_ajax_referer(); header("Content-Type: text/event-stream"); header("Cache-Control: no-cache"); header("Access-Control-Allow-Origin: *"); echo ":" . str_repeat(" ", 2048) . PHP_EOL; // 2 kB padding for IE $this->manual_update(); die; }
/** * POS Settings stored in options table */ public function admin_settings() { WC_POS_Server::check_ajax_referer(); $result = $this->process_admin_settings(); WC_POS_Server::response($result); }