| @@ -10,8 +10,9 @@ | ||
| 10 | 10 | |
| 11 | 11 | namespace WCPOS\WooCommercePOS\Admin; |
| 12 | 12 | |
| 13 | 13 | use WCPOS\WooCommercePOS\API\V1\Logs; |
| 14 | +use WCPOS\WooCommercePOS\Services\Cloudflare_Detector; | |
| 14 | 15 | use WCPOS\WooCommercePOS\Services\Extensions as ExtensionsService; |
| 15 | 16 | use WCPOS\WooCommercePOS\Services\Settings as SettingsService; |
| 16 | 17 | use const WCPOS\WooCommercePOS\PLUGIN_NAME; |
| 17 | 18 | use const WCPOS\WooCommercePOS\PLUGIN_URL; |
| @@ -146,8 +147,9 @@ | ||
| 146 | 147 | $site_uuid = get_option( 'woocommerce_pos_uuid', '' ); |
| 147 | 148 | |
| 148 | 149 | return \sprintf( |
| 149 | 150 | 'var wcpos = wcpos || {}; wcpos.settings = { |
| 151 | + environment: %s, | |
| 150 | 152 | barcodes: %s, |
| 151 | 153 | order_statuses: %s, |
| 152 | 154 | countries: %s, |
| 153 | 155 | storeCountry: %s, |
| @@ -157,8 +159,9 @@ | ||
| 157 | 159 | currentUserId: %s, |
| 158 | 160 | anon_id: %s, |
| 159 | 161 | site_uuid: %s |
| 160 | 162 | }; wcpos.translationVersion = %s;', |
| 163 | + json_encode( array( 'cloudflare' => ( new Cloudflare_Detector() )->detect() ) ), | |
| 161 | 164 | json_encode( $barcodes ), |
| 162 | 165 | json_encode( $order_statuses ), |
| 163 | 166 | json_encode( $countries ), |
| 164 | 167 | json_encode( $store_country ), |