Changeset 3024510
- Timestamp:
- 01/20/2024 03:44:29 PM (2 years ago)
- Location:
- importify
- Files:
-
- 25 added
- 2 edited
-
tags/1.0.5 (added)
-
tags/1.0.5/assets (added)
-
tags/1.0.5/assets/ImportifyLogo.png (added)
-
tags/1.0.5/assets/banner-1544x500.png (added)
-
tags/1.0.5/assets/banner-772x250.png (added)
-
tags/1.0.5/assets/css (added)
-
tags/1.0.5/assets/css/style.css (added)
-
tags/1.0.5/assets/icon-1200.png (added)
-
tags/1.0.5/assets/icon-128x128.png (added)
-
tags/1.0.5/assets/icon-256x256.png (added)
-
tags/1.0.5/assets/images (added)
-
tags/1.0.5/assets/images/Importify_logo.png (added)
-
tags/1.0.5/assets/images/importifyLogo.png (added)
-
tags/1.0.5/assets/images/importify_icon.png (added)
-
tags/1.0.5/assets/js (added)
-
tags/1.0.5/assets/js/script.js (added)
-
tags/1.0.5/assets/screenshot-1.png (added)
-
tags/1.0.5/assets/screenshot-2.png (added)
-
tags/1.0.5/assets/screenshot-3.png (added)
-
tags/1.0.5/assets/screenshot-4.png (added)
-
tags/1.0.5/assets/screenshot-5.png (added)
-
tags/1.0.5/importify.php (added)
-
tags/1.0.5/readme.txt (added)
-
tags/1.0.5/views (added)
-
tags/1.0.5/views/importify_admin_page.php (added)
-
trunk/importify.php (modified) (10 diffs)
-
trunk/readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
importify/trunk/importify.php
r2999160 r3024510 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. 410 * Version: 1.0.5 11 11 * Author: Importify 12 12 * Author URI: https://www.importify.com/ … … 20 20 21 21 define("IMPORTIFY_API_URL", "https://app.importify.net/dashboard"); 22 define('IMPORTIFY_VERSION', '1.0. 3');22 define('IMPORTIFY_VERSION', '1.0.5'); 23 23 define('IMPORTIFY_PATH', dirname(__FILE__)); 24 24 define('IMPORTIFY_FOLDER', basename(IMPORTIFY_PATH)); 25 25 define('IMPORTIFY_URL', plugins_url() . '/' . IMPORTIFY_FOLDER); 26 26 define('IMPORTIFY_API_KEY', get_option('importify_api_key')); 27 define("IMPORTIFY_DEBUG", true);27 define("IMPORTIFY_DEBUG", false); 28 28 29 29 register_activation_hook(__FILE__, 'importify_activation_hook'); … … 32 32 add_action('admin_enqueue_scripts', 'importify_add_admin_css_js'); 33 33 add_action('admin_menu', 'importify_admin_menu'); 34 add_action("wp_ajax_nopriv_importify_installation","importify_installation");35 add_action("wp_ajax_importify_installation","importify_installation");36 34 37 35 function importify_activation_hook() … … 49 47 if ($response['success'] > 0) 50 48 { 51 importify_log('api key: '.$response['api_key'], get_site_url());52 importify_log((!get_option('importify_api_key') ? "yes" : "no"), get_site_url());53 49 54 50 if (!get_option('importify_api_key')) 55 51 { 56 52 add_option('importify_api_key',$response['api_key']); 57 58 importify_log($response['app_name']." ".$response['user_id']." ".$response['scope'], get_site_url());59 53 60 54 if (class_exists("WC_Auth")) … … 84 78 } 85 79 } 86 87 importify_log('after auth');88 80 } 89 81 else … … 94 86 else 95 87 { 96 importify_log('invalid response - api key', get_site_url());97 88 98 89 if (!get_option('importify_error')) … … 105 96 else 106 97 { 107 importify_log('error getting response - api key', get_site_url());108 98 109 99 if (!get_option('importify_error')) … … 259 249 'sslverify' => false 260 250 ); 261 importify_log('sending request', $url);251 262 252 $response = wp_remote_post($url, $data); 263 importify_log('got response', $url);264 253 265 254 if (!is_wp_error($response)) … … 274 263 catch(Exception $err) 275 264 { 276 importify_handle_error('failed sending request', $err, $data); 277 } 278 } 279 280 function importify_log($message, $data = null) 281 { 282 $log = null; 283 284 if (isset($data)) 285 { 286 $log = "\n[Importify] " . $message . ":\n" . print_r($data, true); 287 } 288 else 289 { 290 $log = "\n[Importify] " . $message; 291 } 292 error_log($log); 293 294 if (IMPORTIFY_DEBUG) 295 { 296 $plugin_log_file = plugin_dir_path(__FILE__).'debug.log'; 297 error_log($log."\n", 3, $plugin_log_file); 298 } 299 } 300 301 function importify_handle_error($message, $err, $data = null) 302 { 303 importify_log($message, $err); 304 } 265 if(IMPORTIFY_DEBUG) 266 { 267 echo $err; 268 } 269 } 270 } 271 305 272 306 273 function importify_plugin_redirect() … … 382 349 } 383 350 384 function importify_installation()385 {386 if (in_array('woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins'))) && !get_option('importify_error'))387 {388 $json['success'] = 1;389 $json['api_key'] = get_option('importify_api_key');390 }391 else392 {393 $json["success"] = 0;394 }395 396 wp_send_json($json);397 wp_die();398 }399 400 351 ?> -
importify/trunk/readme.txt
r2999159 r3024510 6 6 Requires PHP: 5.4 7 7 Tested up to: 6.4.1 8 Stable tag: 1.0. 48 Stable tag: 1.0.5 9 9 Plugin URI: https://importify.com 10 10 License: proprietary
Note: See TracChangeset
for help on using the changeset viewer.