PluginProbe
Importify – AI Dropshipping for WooCommerce / 1.0.12
Importify – AI Dropshipping for WooCommerce v1.0.12
1.0.19 trunk 1.0.0 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.16 1.0.17 1.0.18 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9
importify / views / importify_admin_page.php

importify_admin_page.php in Importify – AI Dropshipping for WooCommerce 1.0.12, at views/importify_admin_page.php

152 lines 6.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 // Prevent direct file access
4 if (!defined('ABSPATH')) {
5 exit;
6 }
7
8 if (!current_user_can('manage_options')) {
9 wp_die(__('You do not have sufficient permissions to access this page.'));
10 }
11
12 $api_key = get_option('importify_api_key');
13 $error = get_option('importify_error');
14 $error_message = get_option('importify_error_message');
15
16 $importify_check = get_option('importify_check');
17
18 $show_error_design = false;
19
20 if($importify_check['ssl_active'] == "false" || strlen($importify_check['permalinks']) < 1 || $importify_check['woocomerce_installed'] == FALSE || $importify_check['firewall_active'] == TRUE || $importify_check['cloudflare_active'] == TRUE)
21 {
22 $show_error_design = true;
23 }
24
25 $button_prop = IMPORTIFY_API_URL.'/woocomerce/login-by-token?token='.$api_key;
26
27
28 ?>
29 <div id="importify_page">
30 <?php
31 if($show_error_design)
32 {
33 ?>
34 <div class="container mx-auto p-4 max-w-4xl">
35 <div class="card bg-white p-8 mb-4">
36 <div class="flex flex-col items-center mb-6">
37 <img src="<?php echo esc_url(IMPORTIFY_URL);?>/assets/images/importifyLogo.png" alt="Importify Logo" class="logo">
38 <p class="text-center success-message mb-2">
39 Plugin activated successfully
40 <i data-feather="check-circle" class="checkmark inline"></i>
41 </p>
42 <p class="text-center text-gray-600 mb-6">
43 Importify has been activated, but we need to address a few issues before you can start using it.
44 </p>
45 </div>
46
47 <table>
48 <thead>
49 <tr>
50 <th>Component</th>
51 <th>Status</th>
52 <th>How to Fix</th>
53 </tr>
54 </thead>
55 <tbody>
56 <?php
57 if($importify_check['woocomerce_installed'] == FALSE)
58 {?>
59 <tr>
60 <td>WooCommerce plugin</td>
61 <td class="status-critical">Missing</td>
62 <td><a href="https://help.importify.com/article/532/how-to-install-the-woocommerce-plugin" class="text-blue-600 hover:underline" target="_blank">Install the WooCommerce Plugin</a></td>
63 </tr>
64 <?php
65 }
66 if($importify_check['ssl_active'] == "false")
67 {
68 ?>
69 <tr>
70 <td>SSL certificate</td>
71 <td class="status-warning">Not installed</td>
72 <td><a href="https://help.importify.com/article/526/importify-woocommerce-store-connection-troubleshooting-guide" class="text-blue-600 hover:underline" target="_blank">Set Up SSL</a></td>
73 </tr>
74 <?php
75 }
76 if(strlen($importify_check['permalinks']) < 1)
77 {
78 ?>
79 <tr>
80 <td>Permalinks Setting</td>
81 <td class="status-warning">Issue detected</td>
82 <td><a href="https://help.importify.com/article/533/how-do-i-set-up-the-correct-permalink-structure-for-woocommerce-in-wordpress" class="text-blue-600 hover:underline" target="_blank">Change Permalinks structure to "Post name"</a></td>
83 </tr>
84 <?php
85 }
86 if($importify_check['firewall_active'])
87 {
88 ?>
89 <tr>
90 <td>Security Plugins</td>
91 <td class="status-critical">Importify ip blocked</td>
92 <td><a href="https://help.importify.com/article/526/importify-woocommerce-store-connection-troubleshooting-guide" class="text-blue-600 hover:underline" target="_blank">Configure Firewall</a></td>
93 </tr>
94 <?php
95 }
96 if($importify_check['cloudflare_active'])
97 {
98 ?>
99 <tr>
100 <td>Security Plugins</td>
101 <td class="status-critical">Cloudflare Block</td>
102 <td><a href="https://help.importify.com/article/562/how-to-fix-woocommerce-api-issues-caused-by-cloudflare" class="text-blue-600 hover:underline" target="_blank">Cloudflare Fix</a></td>
103 </tr>
104 <?php
105 }
106 ?>
107 </tbody>
108 </table>
109 </div>
110
111 <div class="text-center mt-4">
112 <a href="<?php echo esc_attr($button_prop);?>" target='_blank' class="dashboard-btn inline-block">
113 Skip and Proceed to Dashboard
114 </a>
115 </div>
116
117 <p class="small-text text-center">
118 <a href='https://help.importify.com/article/526/importify-woocommerce-store-connection-troubleshooting-guide' target="_blank">* These issues must be resolved before you can fully use the Importify app.</a>
119 </p>
120 </div>
121 <?php
122 }
123 else
124 {
125 ?>
126 <div class="container mx-auto p-4 max-w-2xl">
127 <div class="card bg-white p-8 mb-4">
128 <div class="flex flex-col items-center mb-6">
129 <img src="<?php echo esc_url(IMPORTIFY_URL);?>/assets/images/importifyLogo.png" alt="Importify Logo" class="logo">
130 <p class="text-center success-message mb-2 text-xl">
131 Plugin activated successfully
132 <i data-feather="check-circle" class="checkmark inline"></i>
133 </p>
134 <p class="text-center text-gray-600 mb-6">
135 Great news! Importify has been activated and is ready to use. No issues were detected during the setup process.
136 </p>
137 </div>
138 </div>
139
140 <div class="text-center mt-4">
141 <a href="<?php echo esc_attr($button_prop);?>" target='_blank' class="dashboard-btn inline-block">
142 Proceed to Importify Dashboard
143 </a>
144 </div>
145 </div>
146 <?php
147 }
148 ?>
149 <script>
150 feather.replace()
151 </script>
152 </div>