Changeset 3757721
- Timestamp:
- 10/21/2026 05:05:14 AM (3 weeks ago)
- Location:
- importify/trunk
- Files:
-
- 3 edited
-
importify.php (modified) (7 diffs)
-
readme.txt (modified) (2 diffs)
-
views/importify_admin_page.php (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
importify/trunk/importify.php
r3756082 r3757721 8 8 * Plugin Name: Importify 9 9 * Description: Easily import best-selling products, and automate your entire dropshipping process, all with a single click. 10 * Version: 1.0.2 010 * Version: 1.0.21 11 11 * Author: Importify 12 12 * Author URI: https://www.importify.com/ … … 24 24 25 25 define("IMPORTIFY_API_URL", "https://app.importify.net/dashboard"); 26 define('IMPORTIFY_VERSION', '1.0.20'); 26 define('IMPORTIFY_VERSION', '1.0.21'); 27 define('IMPORTIFY_BASENAME', plugin_basename(__FILE__)); 27 28 define('IMPORTIFY_PATH', dirname(__FILE__)); 28 29 define('IMPORTIFY_FOLDER', basename(IMPORTIFY_PATH)); … … 176 177 delete_option('importify_error'); 177 178 delete_option('importify_error_message'); 179 delete_option('importify_install_message'); 178 180 importify_save_api_key(isset($response['api_key']) ? $response['api_key'] : ''); 179 181 … … 190 192 if ($response) { 191 193 update_option('importify_error_message', isset($response['message']) ? $response['message'] : 'Error activation plugin!'); 194 // 1.0.21: Importify's reason for refusing the install, shown on the setup page (the status check 195 // overwrites importify_error_message on every load) 196 if (!empty($response['message'])) update_option('importify_install_message', sanitize_text_field($response['message'])); 192 197 } else { 193 198 update_option('importify_error_message', 'Could not connect to Importify server. Please check your internet connection and try again.'); … … 217 222 delete_option('importify_last_error'); 218 223 delete_option('importify_wc_key_id'); 224 delete_option('importify_install_message'); 219 225 delete_transient('importify_status'); 220 226 … … 280 286 delete_option('importify_error'); 281 287 delete_option('importify_error_message'); 288 delete_option('importify_install_message'); 282 289 importify_save_api_key(isset($response['api_key']) ? $response['api_key'] : ''); 283 290 $status['account'] = 'ok'; … … 312 319 set_transient('importify_status', $status, IMPORTIFY_STATUS_TTL); 313 320 return $status; 321 } 322 323 /** 324 * 1.0.21: the newer Importify version WordPress already knows about (its own plugin update check), 325 * or null when this copy is up to date. No request to Importify. 326 */ 327 function importify_update_info() 328 { 329 $updates = get_site_transient('update_plugins'); 330 if (!is_object($updates) || empty($updates->response[IMPORTIFY_BASENAME])) return null; 331 $u = $updates->response[IMPORTIFY_BASENAME]; 332 $new = is_object($u) && !empty($u->new_version) ? (string)$u->new_version : ''; 333 if ($new === '' || version_compare($new, IMPORTIFY_VERSION, '<=')) return null; 334 $url = current_user_can('update_plugins') 335 ? wp_nonce_url(self_admin_url('update.php?action=upgrade-plugin&plugin=' . rawurlencode(IMPORTIFY_BASENAME)), 'upgrade-plugin_' . IMPORTIFY_BASENAME) 336 : ''; 337 return array('version' => $new, 'url' => $url); 314 338 } 315 339 -
importify/trunk/readme.txt
r3756082 r3757721 5 5 Requires PHP: 7.2 6 6 Tested up to: 7.0 7 Stable tag: 1.0.2 07 Stable tag: 1.0.21 8 8 Plugin URI: https://importify.com 9 9 License: GPLv2 or later … … 383 383 == Changelog == 384 384 385 = 1.0.21 = 386 * NEW: The setup page shows a Plugin Version check. When a newer Importify is available, it says so and links to the one-click update. 387 * NEW: When Importify can't reconnect a reinstalled store (for example, the WordPress admin email changed), the API Connection check shows Importify's reason and the next step, such as approving the store from the email sent to the account owner. 388 385 389 = 1.0.20 = 386 390 * SECURITY: The settings page now proves which Importify account it belongs to before Importify answers with account details, and reconnecting after a reinstall is verified with WooCommerce keys that work on your store. -
importify/trunk/views/importify_admin_page.php
r3756082 r3757721 5 5 /** 6 6 * Importify settings page, 1.0.20 (Claude Design "Importify WooCommerce Plugin Settings"). 7 * Header, account strip, one card with sevenchecks, footer actions. System fonts and inline SVG icons.7 * Header, account strip, one card with eight checks, footer actions. System fonts and inline SVG icons. 8 8 * Inputs: $importify_status (importify_get_status) and the importify_check option, both set by 9 9 * importify_admin_menu_page_html(). … … 33 33 'cf' => 'M7 18h10.5a4 4 0 00.6-7.95A6 6 0 006.3 9.5 4.3 4.3 0 007 18z', 34 34 'api' => 'M9 3v5M15 3v5M6 8h12v3a6 6 0 01-12 0zM12 17v4', 35 'ver' => 'M4 12a8 8 0 0114-5.3L20 9M20 4v5h-5M20 12a8 8 0 01-14 5.3L4 15M4 20v-5h5', 35 36 ); 36 37 $importify_pill_icons = array('pass' => 'M3.5 8.3l3 3 6-6.6', 'fail' => 'M4.5 4.5l7 7M11.5 4.5l-7 7', 'info' => 'M8 7.2v4.6M8 4.4v.1'); … … 40 41 } 41 42 42 /* ── The sevenchecks: [id, name, state pass|fail|info, description, pill (null = Passed/Failed), steps, guide] ── */43 /* ── The eight checks: [id, name, state pass|fail|info, description, pill (null = Passed/Failed), steps, guide] ── */ 43 44 $checks = array(); 44 45 … … 94 95 $conn = array('fail', 'No answer'); 95 96 } elseif ($st['account'] === 'not_found') { 96 $api = array('fail', 'Importify couldn’t find an account for this store’s plugin key.', 'Account not found', $reconnect_steps); 97 $conn = array('fail', 'Account not found'); 97 // 1.0.21: when Importify refused the install, show its reason (e.g. the approval email it sent) 98 $install_msg = (string)get_option('importify_install_message', ''); 99 if ($install_msg !== '') { 100 $api = array('fail', $install_msg, 'Not connected', stripos($install_msg, 'emailed') !== false 101 ? array('Open the email sent to the account owner and click Approve this store.', 'Go to Plugins → Installed Plugins, click Deactivate under Importify, then Activate.', 'Come back here and re-run the checks.') 102 : array('Contact us at <a href="https://www.importify.com/contact/" target="_blank" rel="noopener noreferrer">importify.com/contact</a> and we’ll reconnect this store.')); 103 } else { 104 $api = array('fail', 'Importify couldn’t find an account for this store’s plugin key.', 'Account not found', $reconnect_steps); 105 } 106 $conn = array('fail', $install_msg !== '' ? 'Not connected' : 'Account not found'); 98 107 } elseif ($st['connected'] !== 'yes') { 99 108 $api = array('fail', 'Importify doesn’t have access to your WooCommerce store yet.', 'Not connected', … … 113 122 $checks[] = array('api', 'API Connection', $api[0], $api[1], $api[2], $api[3], $api[0] === 'fail' ? $guide_connection : ''); 114 123 124 // 1.0.21: plugin version, from WordPress's own update check (importify_update_info) 125 $upd = importify_update_info(); 126 $checks[] = array('ver', 'Plugin Version', $upd ? 'info' : 'pass', 127 $upd ? sprintf('Version %s is available. You have %s.', $upd['version'], IMPORTIFY_VERSION) : sprintf('Importify %s is the latest version.', IMPORTIFY_VERSION), 128 $upd ? 'Update available' : null, 129 $upd ? ($upd['url'] !== '' 130 ? array('<a href="' . esc_url($upd['url']) . '">Update Importify now</a>. It takes a few seconds and keeps your settings.', 'Come back here and re-run the checks.') 131 : array('Ask a site administrator to update Importify in Plugins → Installed Plugins.')) 132 : array(), 133 ''); 134 115 135 /* ── Preview overrides (support tool, admin-only): ?error1=preview … ?error7=preview, ?preview=all, ?preview=mixed ── */ 116 136 $importify_preview_map = array( … … 122 142 5 => array('info', 'Cloudflare detected. Its bot protection can block Importify.', 'Detected'), 123 143 6 => array('fail', 'Importify couldn’t find an account for this store’s plugin key.', 'Account not found'), 144 7 => array('info', 'Version 9.9.9 is available. You have ' . IMPORTIFY_VERSION . '.', 'Update available'), 124 145 ); 125 146 $importify_preview = isset($_GET['preview']) ? sanitize_key(wp_unslash($_GET['preview'])) : ''; … … 147 168 if ($ok) { 148 169 $headline = 'Your store is ready for Importify'; 149 $sub = $infos ? 'All required checks passed. Blue items are worth a look but won’t stop imports.' : 'All 7 checks passed. You can start importing products.';150 $summary = $infos ? sprintf('%d passed · %d to review', $passed, $infos) : '7 of 7 passed';170 $sub = $infos ? 'All required checks passed. Blue items are worth a look but won’t stop imports.' : sprintf('All %d checks passed. You can start importing products.', count($checks)); 171 $summary = $infos ? sprintf('%d passed · %d to review', $passed, $infos) : sprintf('%d of %d passed', count($checks), count($checks)); 151 172 } else { 152 173 $headline = $fails === 1 ? '1 issue needs fixing before you import' : sprintf('%d issues need fixing before you import', $fails); … … 164 185 ); 165 186 $recheck_url = wp_nonce_url(admin_url('admin.php?page=importify&importify_recheck=1'), 'importify_recheck'); 166 $step_tags = array('code' => array(), 'em' => array(), 'strong' => array() );187 $step_tags = array('code' => array(), 'em' => array(), 'strong' => array(), 'a' => array('href' => array(), 'target' => array(), 'rel' => array())); 167 188 ?> 168 189 <div id="importify-setup-wrap" class="wrap"> … … 172 193 <?php if ($importify_any_preview): ?> 173 194 <div class="imf-preview" role="note"> 174 <span>Preview mode: showing simulated data. <a href="<?php echo esc_url(remove_query_arg(array('preview', 'error1', 'error2', 'error3', 'error4', 'error5', 'error6', 'error7' ))); ?>">Exit preview</a></span>195 <span>Preview mode: showing simulated data. <a href="<?php echo esc_url(remove_query_arg(array('preview', 'error1', 'error2', 'error3', 'error4', 'error5', 'error6', 'error7', 'error8'))); ?>">Exit preview</a></span> 175 196 </div> 176 197 <?php endif; ?>
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)