?> " data-label="<?php echo $setting->label; ?> " type="text/template"> <?php echo $setting->output(); ?> </script> <?php $data = $setting->get(); if (isset($data)) { ?> <script type="text/javascript"> wc_pos_settings['<?php echo $setting->id; ?> '] = <?php echo wc_pos_json_encode($data); ?> </script> <?php } ?> <?php } }
/** * Start the Settings App */ public function admin_inline_js() { $params = apply_filters('woocommerce_pos_admin_params', array()); echo '<script type="text/javascript">POS.options = ' . wc_pos_json_encode($params) . '; POS.start();</script>'; }