Plugin Directory

Changeset 3024510


Ignore:
Timestamp:
01/20/2024 03:44:29 PM (2 years ago)
Author:
importify
Message:

1.0.5 version

Location:
importify
Files:
25 added
2 edited

Legend:

Unmodified
Added
Removed
  • importify/trunk/importify.php

    r2999160 r3024510  
    88 * Plugin Name: Importify
    99 * Description: Easily import best-selling products, and automate your entire dropshipping process, all with a single click.
    10  * Version: 1.0.4
     10 * Version: 1.0.5
    1111 * Author: Importify
    1212 * Author URI: https://www.importify.com/
     
    2020
    2121define("IMPORTIFY_API_URL", "https://app.importify.net/dashboard");
    22 define('IMPORTIFY_VERSION', '1.0.3');
     22define('IMPORTIFY_VERSION', '1.0.5');
    2323define('IMPORTIFY_PATH', dirname(__FILE__));
    2424define('IMPORTIFY_FOLDER', basename(IMPORTIFY_PATH));
    2525define('IMPORTIFY_URL', plugins_url() . '/' . IMPORTIFY_FOLDER);
    2626define('IMPORTIFY_API_KEY', get_option('importify_api_key'));
    27 define("IMPORTIFY_DEBUG", true);
     27define("IMPORTIFY_DEBUG", false);
    2828
    2929register_activation_hook(__FILE__, 'importify_activation_hook');
     
    3232add_action('admin_enqueue_scripts', 'importify_add_admin_css_js');
    3333add_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");
    3634
    3735function importify_activation_hook()
     
    4947        if ($response['success'] > 0)
    5048        {
    51             importify_log('api key: '.$response['api_key'], get_site_url());
    52       importify_log((!get_option('importify_api_key') ? "yes" : "no"), get_site_url());
    5349
    5450            if (!get_option('importify_api_key'))
    5551            {
    5652                add_option('importify_api_key',$response['api_key']);
    57 
    58         importify_log($response['app_name']." ".$response['user_id']." ".$response['scope'], get_site_url());
    5953       
    6054        if (class_exists("WC_Auth"))
     
    8478          }
    8579        }
    86 
    87         importify_log('after auth');
    8880            }
    8981            else
     
    9486        else
    9587        {
    96             importify_log('invalid response - api key', get_site_url());
    9788     
    9889      if (!get_option('importify_error'))
     
    10596    else
    10697    {
    107         importify_log('error getting response - api key', get_site_url());
    10898
    10999    if (!get_option('importify_error'))
     
    259249      'sslverify' => false
    260250    );
    261     importify_log('sending request', $url);
     251   
    262252    $response = wp_remote_post($url, $data);
    263     importify_log('got response', $url);
    264253   
    265254    if (!is_wp_error($response))
     
    274263  catch(Exception $err)
    275264  {
    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
    305272
    306273function importify_plugin_redirect()
     
    382349}
    383350
    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   else
    392   {
    393     $json["success"] = 0;
    394   }
    395 
    396   wp_send_json($json);
    397   wp_die();
    398 }
    399 
    400351?>
  • importify/trunk/readme.txt

    r2999159 r3024510  
    66Requires PHP: 5.4
    77Tested up to: 6.4.1
    8 Stable tag: 1.0.4
     8Stable tag: 1.0.5
    99Plugin URI: https://importify.com
    1010License: proprietary
Note: See TracChangeset for help on using the changeset viewer.