Ultimate CSV Importer - Version 5.0.2

Version Description

Download this release

Release Info

Developer smackcoders
Plugin Icon 128x128 Ultimate CSV Importer
Version 5.0.2
Comparing to
See all releases

Code changes from version 5.0.1 to 5.0.2

Readme.txt CHANGED
@@ -4,8 +4,8 @@ Donate link: https://www.paypal.me/smackcoders
4
  Tags: csv importer, import csv, import woocommerce, import marketpress, import seo by yoast, import all in one seo, scheduled import, import remote file, export woocommerce, import types fields, import acf fields, import inline images
5
  Requires at least: 4.0
6
  Tested up to: 4.7
7
- Stable tag: 5.0.1
8
- Version: 5.0.1
9
  Author: smackcoders
10
  Author URI: http://profiles.wordpress.org/smackcoders/
11
  License: GPLv2 or later
@@ -106,6 +106,8 @@ This will solve your issue or get support from hosting if you didn’t have suff
106
  For more FAQ, you can refer [here](https://goo.gl/eH7BHT).
107
 
108
  == Changelog ==
 
 
109
  = 5.0.1 =
110
  * Fixed: WP Customer Reviews import feature.
111
  = 5.0 =
@@ -397,6 +399,8 @@ For more FAQ, you can refer [here](https://goo.gl/eH7BHT).
397
  * Initial release version. Tested and found works well without any issues.
398
 
399
  == Upgrade Notice ==
 
 
400
  = 5.0.1 =
401
  * Upgrade now to get the fix for WP Customer Review add-on support.
402
  = 5.0 =
4
  Tags: csv importer, import csv, import woocommerce, import marketpress, import seo by yoast, import all in one seo, scheduled import, import remote file, export woocommerce, import types fields, import acf fields, import inline images
5
  Requires at least: 4.0
6
  Tested up to: 4.7
7
+ Stable tag: 5.0.2
8
+ Version: 5.0.2
9
  Author: smackcoders
10
  Author URI: http://profiles.wordpress.org/smackcoders/
11
  License: GPLv2 or later
106
  For more FAQ, you can refer [here](https://goo.gl/eH7BHT).
107
 
108
  == Changelog ==
109
+ = 5.0.2 =
110
+ * Added: Compatibility from PHP 5.3.
111
  = 5.0.1 =
112
  * Fixed: WP Customer Reviews import feature.
113
  = 5.0 =
399
  * Initial release version. Tested and found works well without any issues.
400
 
401
  == Upgrade Notice ==
402
+ = 5.0.2 =
403
+ * Upgrade now to get the fix for PHP 5.3 compatibility.
404
  = 5.0.1 =
405
  * Upgrade now to get the fix for WP Customer Review add-on support.
406
  = 5.0 =
admin/views/form-support-view.php CHANGED
@@ -77,12 +77,15 @@ if ( ! defined( 'ABSPATH' ) )
77
  <fieldset class="scheduler-border"> <legend class="scheduler-border" style="margin-top:20px;">News Letter Subscription</legend>
78
  <div class="form-group">
79
  <label>Email</label>
80
- <input name="" id="" class="form-control" value="" type="text">
81
- </div>
 
 
 
82
  <div class="col-md-12">
83
  <div class="col-md-offset-9 col-sm-offset-7 col-xs-offset-2 mb10">
84
- <input name="" id="" class="smack-btn smack-btn-primary btn-radius" value="Subscribe" type="button">
85
- </div>
86
  </div>
87
  </fieldset>
88
  </div>
77
  <fieldset class="scheduler-border"> <legend class="scheduler-border" style="margin-top:20px;">News Letter Subscription</legend>
78
  <div class="form-group">
79
  <label>Email</label>
80
+ <input name="subscribe_email" id="subscribe_email" class="form-control" value="" type="text">
81
+ </div>
82
+ <div id="loading" style="opacity:0.7;background-color: #fff;z-index: 99;text-align: center;">
83
+ <img class="col-md-offset-10 col-sm-offset-9 col-xs-offset-4 mb10" id="loading-img-subs" src="<?php echo plugins_url().'/'.SM_UCI_SLUG ;?>/assets/images/loading.gif" width="24" height="24" alt="Loading" style="display:none;margin-left:300px;" />
84
+ </div>
85
  <div class="col-md-12">
86
  <div class="col-md-offset-9 col-sm-offset-7 col-xs-offset-2 mb10">
87
+ <input name="" id="" class="smack-btn smack-btn-primary btn-radius" value="Subscribe" onclick="send_subscribe_email();" type="button">
88
+ </div>
89
  </div>
90
  </fieldset>
91
  </div>
assets/js/ultimate-importer.js CHANGED
@@ -1884,6 +1884,22 @@ function send_support_email() {
1884
 
1885
  }
1886
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1887
 
1888
  function GetDynamicTextBox(value) {
1889
  swal('Warning!', 'Please Upgrade the PRO for Advance Media Handling.', 'warning')
@@ -1916,4 +1932,4 @@ function dismiss_notices(type) {
1916
  //swal('Success!', 'Thanks for submitting the query.', 'success')
1917
  }
1918
  });
1919
- }
1884
 
1885
  }
1886
 
1887
+ function send_subscribe_email() {
1888
+ document.getElementById('loading-img-subs').style.display = "block";
1889
+ var email = document.getElementById('subscribe_email').value;
1890
+ jQuery.ajax({
1891
+ url: ajaxurl,
1892
+ type: 'post',
1893
+ data: {
1894
+ 'action': 'send_subscribe_email',
1895
+ 'subscribe_email': email,
1896
+ },
1897
+ success: function (response) {
1898
+ document.getElementById('loading-img-subs').style.display = "none";
1899
+ swal('Success!', 'Thanks for submitting.', 'success')
1900
+ }
1901
+ });
1902
+ }
1903
 
1904
  function GetDynamicTextBox(value) {
1905
  swal('Warning!', 'Please Upgrade the PRO for Advance Media Handling.', 'warning')
1932
  //swal('Success!', 'Thanks for submitting the query.', 'success')
1933
  }
1934
  });
1935
+ }
includes/class-uci-admin-ajax.php CHANGED
@@ -55,6 +55,7 @@ class SmackUCIAdminAjax {
55
  'parseDataToImport' => false,
56
  'parseDataToExport' => false,
57
  'sendmail' => false,
 
58
  'static_formula_method_handler' => false,
59
  'check_templatename' => false,
60
  'delete_template' => false,
@@ -243,7 +244,8 @@ class SmackUCIAdminAjax {
243
 
244
  public static function parseDataToImport() {
245
  global $uci_admin;
246
- if(empty($uci_admin->getEventInformation())) {
 
247
  $uci_admin->setEventKey(sanitize_text_field($_POST['postData']['event_key']));
248
  $uci_admin->setImportType(sanitize_text_field($_POST['postData']['import_type']));
249
  $uci_admin->setImportMethod(sanitize_text_field($_POST['postData']['importMethod']));
@@ -317,7 +319,8 @@ class SmackUCIAdminAjax {
317
  try {
318
  $uci_admin->importData($eventKey, $importType, $importMethod, $mode, $data[$i], $i, $eventMapping, $affectedRecords, $mediaConfig, $importConfig);
319
  $manage_records[$mode][] = $uci_admin->getLastImportId();
320
- if (!empty($uci_admin->detailed_log)) {
 
321
  $uciEventLogger = new SmackUCIEventLogging();
322
  $eventLogFile = $eventDir . '/'.$eventKey.'.log';
323
  $eventInfoFile = $eventDir . '/'.$eventKey.'.txt';
@@ -807,7 +810,22 @@ class SmackUCIAdminAjax {
807
  //send email
808
  mail($to, $subject, $message , $headers); //This method sends the mail.
809
  }
810
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
811
 
812
 
813
  }
55
  'parseDataToImport' => false,
56
  'parseDataToExport' => false,
57
  'sendmail' => false,
58
+ 'send_subscribe_email' =>false,
59
  'static_formula_method_handler' => false,
60
  'check_templatename' => false,
61
  'delete_template' => false,
244
 
245
  public static function parseDataToImport() {
246
  global $uci_admin;
247
+ $event_information = $uci_admin->getEventInformation();
248
+ if(empty($event_information)) {
249
  $uci_admin->setEventKey(sanitize_text_field($_POST['postData']['event_key']));
250
  $uci_admin->setImportType(sanitize_text_field($_POST['postData']['import_type']));
251
  $uci_admin->setImportMethod(sanitize_text_field($_POST['postData']['importMethod']));
319
  try {
320
  $uci_admin->importData($eventKey, $importType, $importMethod, $mode, $data[$i], $i, $eventMapping, $affectedRecords, $mediaConfig, $importConfig);
321
  $manage_records[$mode][] = $uci_admin->getLastImportId();
322
+ $detailed_log = $uci_admin->detailed_log;
323
+ if (!empty($detailed_log)) {
324
  $uciEventLogger = new SmackUCIEventLogging();
325
  $eventLogFile = $eventDir . '/'.$eventKey.'.log';
326
  $eventInfoFile = $eventDir . '/'.$eventKey.'.txt';
810
  //send email
811
  mail($to, $subject, $message , $headers); //This method sends the mail.
812
  }
813
+ }
814
+
815
+ public static function send_subscribe_email(){
816
+ if($_POST){
817
+ $email = $_POST['subscribe_email'];
818
+ $message = 'Hi Team: I want to subscribe to your newsletter.';
819
+ $url = get_option('siteurl');
820
+ $sitename = get_option('blogname');
821
+ $headers = "From: ".$sitename ."<$email>";
822
+ $to = 'support@smackcoders.com';
823
+ $subject = 'Newsletter Subscription';
824
+ $message = " Site URL: " .$url. "\n Message: ".$message;
825
+ //send email
826
+ mail($to, $subject, $message, $headers); //This method sends the mail.
827
+ }
828
+ }
829
 
830
 
831
  }
includes/class-uci-helper.php CHANGED
@@ -1677,7 +1677,8 @@ class SmackUCIHelper {
1677
  if(!empty($data)) {
1678
  $uci_admin->setRowMapping( $this->generateDataArrayBasedOnGroups( $available_groups_type, $eventMapping, $data ) );
1679
  }
1680
- if(empty($uci_admin->getEventInformation())) {
 
1681
  $screen_data = $uci_admin->GetPostValues( $eventKey );
1682
  } else {
1683
  $screen_data = $uci_admin->getEventInformation();
@@ -1757,7 +1758,8 @@ class SmackUCIHelper {
1757
  # Note: Removed data import for CCTM fields
1758
  break;
1759
  case 'AIOSEO':
1760
- if(empty($this->getRowMapping('AIOSEO')) || !file_exists(SM_UCI_PRO_DIR . 'includes/class-uci-aioseo-data-import.php'))
 
1761
  break;
1762
  require_once "class-uci-aioseo-data-import.php";
1763
  break;
@@ -1765,7 +1767,8 @@ class SmackUCIHelper {
1765
  # Note: Removed data import for WordPress Yoast SEO fields
1766
  break;
1767
  case 'TERMS':
1768
- if(empty($this->getRowMapping('TERMS')))
 
1769
  break;
1770
  $this->importTermsAndTaxonomies($groupValue, $this->getLastImportId(), $importType);
1771
  break;
1677
  if(!empty($data)) {
1678
  $uci_admin->setRowMapping( $this->generateDataArrayBasedOnGroups( $available_groups_type, $eventMapping, $data ) );
1679
  }
1680
+ $event_information = $uci_admin->getEventInformation();
1681
+ if(empty($event_information)) {
1682
  $screen_data = $uci_admin->GetPostValues( $eventKey );
1683
  } else {
1684
  $screen_data = $uci_admin->getEventInformation();
1758
  # Note: Removed data import for CCTM fields
1759
  break;
1760
  case 'AIOSEO':
1761
+ $aio_seo_row_mapping = $this->getRowMapping('AIOSEO');
1762
+ if(empty($aio_seo_row_mapping) || !file_exists(SM_UCI_PRO_DIR . 'includes/class-uci-aioseo-data-import.php'))
1763
  break;
1764
  require_once "class-uci-aioseo-data-import.php";
1765
  break;
1767
  # Note: Removed data import for WordPress Yoast SEO fields
1768
  break;
1769
  case 'TERMS':
1770
+ $terms_row_mapping = $this->getRowMapping('TERMS');
1771
+ if(empty($terms_row_mapping))
1772
  break;
1773
  $this->importTermsAndTaxonomies($groupValue, $this->getLastImportId(), $importType);
1774
  break;
index.php CHANGED
@@ -2,7 +2,7 @@
2
  /******************************
3
  * Plugin Name: WP Ultimate CSV Importer
4
  * Description: Seamlessly create posts, custom posts, pages, media, SEO and more from your CSV data with ease.
5
- * Version: 5.0.1
6
  * Author: smackcoders
7
  * Text Domain: wp-ultimate-csv-importer
8
  * Domain Path: /languages
@@ -45,7 +45,6 @@
45
  * Notices must display the words
46
  * "Copyright Smackcoders. 2016. All rights reserved".
47
  ********************************************************************************/
48
-
49
  if ( ! defined( 'ABSPATH' ) )
50
  exit; // Exit if accessed directly
51
 
@@ -58,7 +57,7 @@ if ( ! class_exists( 'SM_WPUltimateCSVImporter' ) ) :
58
  */
59
  class SM_WPUltimateCSVImporter {
60
 
61
- public $version = '5.0.1';
62
 
63
  /**
64
  * The single instance of the class.
2
  /******************************
3
  * Plugin Name: WP Ultimate CSV Importer
4
  * Description: Seamlessly create posts, custom posts, pages, media, SEO and more from your CSV data with ease.
5
+ * Version: 5.0.2
6
  * Author: smackcoders
7
  * Text Domain: wp-ultimate-csv-importer
8
  * Domain Path: /languages
45
  * Notices must display the words
46
  * "Copyright Smackcoders. 2016. All rights reserved".
47
  ********************************************************************************/
 
48
  if ( ! defined( 'ABSPATH' ) )
49
  exit; // Exit if accessed directly
50
 
57
  */
58
  class SM_WPUltimateCSVImporter {
59
 
60
+ public $version = '5.0.2';
61
 
62
  /**
63
  * The single instance of the class.
libs/parsers/SmackCSVLogger.php CHANGED
@@ -59,7 +59,8 @@ class SmackCSVLogger
59
  if (!(is_writable($log_file) || $this->win_is_writable($log_file)))
60
  {
61
  //Cant write to file,
62
- throw new Exception("LOGGER ERROR: Can't write to log", 1);
 
63
  }
64
 
65
  }
59
  if (!(is_writable($log_file) || $this->win_is_writable($log_file)))
60
  {
61
  //Cant write to file,
62
+ #throw new Exception("LOGGER ERROR: Can't write to log", 1);
63
+ #TODO: Handle the log file exists or not.
64
  }
65
 
66
  }