get('form'); $settings = $form->get_settings(); $registered = $this->get('registered'); $is_blocked = $this->get('is_blocked'); //TODO: use or remove $page_settings = [ 'account' => [ 'login' => $this->get('login'), 'subdomain' => $this->get('subdomain'), 'api_key' => $this->get('api_key'), 'registered' => (bool)$registered, 'url' => $this->get('account_url'), 'short_url' => $this->get('account_short_url'), ], 'account_actions' => $this->get('account_actions'), 'is_blocked' => (bool)$is_blocked, 'show_stats_reporting' => (bool)$this->get('show_stats_reporting'), 'libphonenumber_path' => plugins_url('/amoforms/js/vendor/libphonenumber/build/utils.js'), 'country' => 'us', ]; if (!$registered && $ip_info = IpInfo::instance()->get_info($_SERVER['REMOTE_ADDR'])) { if (!empty($ip_info['country'])) { $page_settings['country'] = strtolower($ip_info['country']); } } ?>