Product Import Export for WooCommerce - Version 2.2.4

Version Description

2022-08-26 = * Bugfix: Product - Filter data does not work on product tags/categories for non-latin languages * Bugfix: Category - Child category import with parent connection * WooCommerce 6.8 Tested OK.

Download this release

Release Info

Developer webtoffee
Plugin Icon 128x128 Product Import Export for WooCommerce
Version 2.2.4
Comparing to
See all releases

Code changes from version 2.2.3 to 2.2.4

admin/css/wt-import-export-for-woo-admin.css CHANGED
@@ -766,7 +766,8 @@ img.tips {
766
  color: #001A69;
767
  list-style: none;
768
  position: relative;
769
- padding-left: 49px;
 
770
  margin: 0 0 15px 0;
771
  display: flex;
772
  align-items: center;
@@ -785,8 +786,8 @@ img.tips {
785
  .wt-ierpro-allfeat li:before{
786
  content: '';
787
  position: absolute;
788
- height: 18px;
789
- width: 18px;
790
  background-image: url(../../assets/images/gopro/tick.svg);
791
  background-size: contain;
792
  background-repeat: no-repeat;
@@ -1169,4 +1170,5 @@ ul.wt-ierpro-newfeat li {
1169
  display: flex;
1170
  }
1171
  }
1172
- /* end marketing */
 
766
  color: #001A69;
767
  list-style: none;
768
  position: relative;
769
+ padding-left: 35px;
770
+ padding-right: 5px;
771
  margin: 0 0 15px 0;
772
  display: flex;
773
  align-items: center;
786
  .wt-ierpro-allfeat li:before{
787
  content: '';
788
  position: absolute;
789
+ height: 16px;
790
+ width: 16px;
791
  background-image: url(../../assets/images/gopro/tick.svg);
792
  background-size: contain;
793
  background-repeat: no-repeat;
1170
  display: flex;
1171
  }
1172
  }
1173
+ /* end marketing */
1174
+ .wt-iew-upgrade-to-pro-new-feature{ display:inline-block; width:60px; height:21px; background: url(../../assets/images/gopro/new_flag.svg) no-repeat; color:#fff; text-align:center; font-weight:normal; padding-left:4px; line-height:20px; font-size:12px; text-shadow:0px 2px 4px rgba(0, 0, 0, 0.35);}
admin/modules/import/import.php CHANGED
@@ -956,7 +956,6 @@ class Wt_Import_Export_For_Woo_Basic_Import
956
 
957
  /* important: prepare deafult mapping formdata for quick import */
958
  $input_data=$reader->get_data_as_batch($file_path, $offset, $batch_count, $this, $form_data);
959
-
960
  if(empty($input_data['data_arr'])){
961
  $out['msg']=__('CSV is empty');
962
  return $out;
956
 
957
  /* important: prepare deafult mapping formdata for quick import */
958
  $input_data=$reader->get_data_as_batch($file_path, $offset, $batch_count, $this, $form_data);
 
959
  if(empty($input_data['data_arr'])){
960
  $out['msg']=__('CSV is empty');
961
  return $out;
admin/modules/product/product.php CHANGED
@@ -88,7 +88,7 @@ class Wt_Import_Export_For_Woo_Basic_Product {
88
  public function wt_add_products_bulk_actions() {
89
  global $post_type, $post_status;
90
 
91
- if ($post_type == 'product' && $post_status != 'trash') {
92
  ?>
93
  <script type="text/javascript">
94
  jQuery(document).ready(function ($) {
@@ -834,7 +834,7 @@ class Wt_Import_Export_For_Woo_Basic_Product {
834
  'help_text' => __( 'Export products belonging to a particular or from multiple categories. Just select the respective categories.' ),
835
  'type' => 'multi_select',
836
  'css_class' => 'wc-enhanced-select',
837
- 'validation_rule' => array('type'=>'skip')
838
  );
839
 
840
  $fields['product_tags'] = array(
@@ -845,7 +845,7 @@ class Wt_Import_Export_For_Woo_Basic_Product {
845
  'help_text' => __( 'Enter the product tags to export only the respective products that have been tagged accordingly.' ),
846
  'type' => 'multi_select',
847
  'css_class' => 'wc-enhanced-select',
848
- 'validation_rule' => array('type'=>'text_arr')
849
  );
850
 
851
  $fields['product_status'] = array(
88
  public function wt_add_products_bulk_actions() {
89
  global $post_type, $post_status;
90
 
91
+ if ( 'product' === $post_type && 'trash' !== $post_status && !is_plugin_active( 'wt-import-export-for-woo/wt-import-export-for-woo.php' ) ) {
92
  ?>
93
  <script type="text/javascript">
94
  jQuery(document).ready(function ($) {
834
  'help_text' => __( 'Export products belonging to a particular or from multiple categories. Just select the respective categories.' ),
835
  'type' => 'multi_select',
836
  'css_class' => 'wc-enhanced-select',
837
+ 'validation_rule' => array('type'=>'sanitize_title_with_dashes_arr')
838
  );
839
 
840
  $fields['product_tags'] = array(
845
  'help_text' => __( 'Enter the product tags to export only the respective products that have been tagged accordingly.' ),
846
  'type' => 'multi_select',
847
  'css_class' => 'wc-enhanced-select',
848
+ 'validation_rule' => array('type'=>'sanitize_title_with_dashes_arr')
849
  );
850
 
851
  $fields['product_status'] = array(
admin/modules/product_categories/import/import.php CHANGED
@@ -114,7 +114,7 @@ class Wt_Import_Export_For_Woo_Basic_Categories_Import {
114
 
115
  public function process_taxonomy_by_type($data, $is_update = 0, $taxonomy_type = 'product_cat') {
116
 
117
- $parent_id = '';
118
  $name = isset($data['name']) ? $data['name'] : '';
119
  $slug = isset($data['slug']) ? $data['slug'] : '';
120
  $term_id = isset($data['term_id']) ? $data['term_id'] : '';
@@ -165,8 +165,9 @@ class Wt_Import_Export_For_Woo_Basic_Categories_Import {
165
  if ($taxonomy_type == 'product_tag' || $taxonomy_type == 'product_cat') {
166
 
167
  $res = $wpdb->get_results($wpdb->prepare("SELECT term_id FROM $wpdb->termmeta WHERE meta_key = %s and meta_value = %d ORDER BY meta_key,meta_id", $term_meta_tbl_key, $parent_id), ARRAY_A);
168
-
169
- $term_id = $term_id;
 
170
 
171
  if (!empty($res)) {
172
  $pid = $res[0]['term_id'];
114
 
115
  public function process_taxonomy_by_type($data, $is_update = 0, $taxonomy_type = 'product_cat') {
116
 
117
+
118
  $name = isset($data['name']) ? $data['name'] : '';
119
  $slug = isset($data['slug']) ? $data['slug'] : '';
120
  $term_id = isset($data['term_id']) ? $data['term_id'] : '';
165
  if ($taxonomy_type == 'product_tag' || $taxonomy_type == 'product_cat') {
166
 
167
  $res = $wpdb->get_results($wpdb->prepare("SELECT term_id FROM $wpdb->termmeta WHERE meta_key = %s and meta_value = %d ORDER BY meta_key,meta_id", $term_meta_tbl_key, $parent_id), ARRAY_A);
168
+ if(empty($res)){
169
+ $res = $wpdb->get_results($wpdb->prepare("SELECT term_id FROM $wpdb->terms WHERE term_id = %d ORDER BY term_id", $parent_id), ARRAY_A);
170
+ }
171
 
172
  if (!empty($res)) {
173
  $pid = $res[0]['term_id'];
assets/images/gopro/new_flag.svg ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ <svg width="43" height="21" viewBox="0 0 43 21" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <rect x="6" width="36.1395" height="21" rx="2" fill="#6E6ADD"/>
3
+ <path d="M0 9.8125L6 5V16L0 9.8125Z" fill="#6E6ADD"/>
4
+ </svg>
helpers/class-wt-import-export-helper.php CHANGED
@@ -85,7 +85,11 @@ if(!class_exists('Wt_Iew_IE_Basic_Helper'))
85
  foreach ($mapping_form_data['mapping_fields'] as $key => $value)
86
  {
87
  $new_key=sanitize_text_field($key);
88
- $value=array(sanitize_text_field($value[0]), absint($value[1]));
 
 
 
 
89
  unset($mapping_form_data['mapping_fields'][$key]);
90
  $mapping_form_data['mapping_fields'][$new_key]=$value;
91
  }
@@ -104,7 +108,11 @@ if(!class_exists('Wt_Iew_IE_Basic_Helper'))
104
  {
105
  $new_key=sanitize_text_field($key);
106
  unset($mapping_form_data['mapping_selected_fields'][$key]);
107
- $mapping_form_data['mapping_selected_fields'][$new_key]=sanitize_text_field($value);
 
 
 
 
108
  }
109
  }
110
 
85
  foreach ($mapping_form_data['mapping_fields'] as $key => $value)
86
  {
87
  $new_key=sanitize_text_field($key);
88
+ if(apply_filters( 'wt_iew_allow_html_form_data', false, $key )){
89
+ $value = $value;
90
+ }else{
91
+ $value=array(sanitize_text_field($value[0]), absint($value[1]));
92
+ }
93
  unset($mapping_form_data['mapping_fields'][$key]);
94
  $mapping_form_data['mapping_fields'][$new_key]=$value;
95
  }
108
  {
109
  $new_key=sanitize_text_field($key);
110
  unset($mapping_form_data['mapping_selected_fields'][$key]);
111
+ if(apply_filters( 'wt_iew_allow_html_form_data', false, $new_key )){
112
+ $mapping_form_data['mapping_selected_fields'][$new_key] = $value ;
113
+ }else{
114
+ $mapping_form_data['mapping_selected_fields'][$new_key]=sanitize_text_field($value);
115
+ }
116
  }
117
  }
118
 
helpers/class-wt-security-helper.php CHANGED
@@ -60,6 +60,12 @@ if(!class_exists('Wt_Iew_Sh'))
60
  case 'url_arr':
61
  $val = self::sanitize_arr($val, 'url');
62
  break;
 
 
 
 
 
 
63
  case 'textarea':
64
  $val=sanitize_textarea_field($val);
65
  break;
60
  case 'url_arr':
61
  $val = self::sanitize_arr($val, 'url');
62
  break;
63
+ case 'sanitize_title_with_dashes':
64
+ $val = sanitize_title_with_dashes($val);
65
+ break;
66
+ case 'sanitize_title_with_dashes_arr':
67
+ $val = self::sanitize_arr($val, 'sanitize_title_with_dashes');
68
+ break;
69
  case 'textarea':
70
  $val=sanitize_textarea_field($val);
71
  break;
includes/class-wt-import-export-for-woo.php CHANGED
@@ -80,7 +80,7 @@ class Wt_Import_Export_For_Woo_Basic {
80
  if ( defined( 'WT_P_IEW_VERSION' ) ) {
81
  $this->version = WT_P_IEW_VERSION;
82
  } else {
83
- $this->version = '2.2.3';
84
  }
85
  $this->plugin_name = 'wt-import-export-for-woo-basic';
86
 
80
  if ( defined( 'WT_P_IEW_VERSION' ) ) {
81
  $this->version = WT_P_IEW_VERSION;
82
  } else {
83
+ $this->version = '2.2.4';
84
  }
85
  $this->plugin_name = 'wt-import-export-for-woo-basic';
86
 
product-import-export-for-woo.php CHANGED
@@ -5,12 +5,12 @@
5
  Description: Import and Export Products From and To your WooCommerce Store.
6
  Author: WebToffee
7
  Author URI: https://www.webtoffee.com/product/product-import-export-woocommerce/
8
- Version: 2.2.3
9
  License: GPLv3
10
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
11
  Text Domain: product-import-export-for-woo
12
  Domain Path: /languages
13
- WC tested up to: 6.7
14
  Requires at least: 3.0
15
  Requires PHP: 5.6
16
  */
@@ -46,7 +46,7 @@ if ( !defined( 'WT_IEW_DEBUG_BASIC_TROUBLESHOOT' ) ) {
46
  * Start at version 1.0.0 and use SemVer - https://semver.org
47
  * Rename this for your plugin and update it as you release new versions.
48
  */
49
- define( 'WT_P_IEW_VERSION', '2.2.3' );
50
 
51
  /**
52
  * The code that runs during plugin activation.
@@ -253,10 +253,11 @@ function wt_product_addon_basic_gopro_content() {
253
  ?>
254
  <div class="wt-ier-product wt-ier-product_review wt-ier-product_tags wt-ier-product_categories wt-ier-gopro-cta wt-ierpro-features" style="display: none;">
255
  <ul class="ticked-list wt-ierpro-allfeat">
256
- <li><?php _e('All free version features'); ?></li>
 
 
257
  <li><?php _e('Export and import variable products, subscription products and custom product types'); ?></li>
258
- <li><?php _e('Import and export custom fields and hidden metadata.'); ?></li>
259
- <li><?php _e('XML file type support'); ?></li>
260
  <li><?php _e('Run scheduled automatic import and export'); ?></li>
261
  <li><?php _e('Import from URL, FTP/SFTP'); ?></li>
262
  <li><?php _e('Export to FTP/SFTP'); ?></li>
@@ -282,7 +283,7 @@ function export_csv_linkin_product_listing_page($which) {
282
 
283
  $currentScreen = get_current_screen();
284
 
285
- if ('edit-product' === $currentScreen->id) {
286
  echo '<a target="_blank" href="' . admin_url('admin.php?page=wt_import_export_for_woo_basic_export&wt_to_export=product') . '" class="button" style="height:32px;" >' . __('Export to CSV') . ' </a>';
287
  }
288
  }
5
  Description: Import and Export Products From and To your WooCommerce Store.
6
  Author: WebToffee
7
  Author URI: https://www.webtoffee.com/product/product-import-export-woocommerce/
8
+ Version: 2.2.4
9
  License: GPLv3
10
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
11
  Text Domain: product-import-export-for-woo
12
  Domain Path: /languages
13
+ WC tested up to: 6.8
14
  Requires at least: 3.0
15
  Requires PHP: 5.6
16
  */
46
  * Start at version 1.0.0 and use SemVer - https://semver.org
47
  * Rename this for your plugin and update it as you release new versions.
48
  */
49
+ define( 'WT_P_IEW_VERSION', '2.2.4' );
50
 
51
  /**
52
  * The code that runs during plugin activation.
253
  ?>
254
  <div class="wt-ier-product wt-ier-product_review wt-ier-product_tags wt-ier-product_categories wt-ier-gopro-cta wt-ierpro-features" style="display: none;">
255
  <ul class="ticked-list wt-ierpro-allfeat">
256
+ <li><?php _e('Import and export in XLS and XLSX formats'); ?><span class="wt-iew-upgrade-to-pro-new-feature"><?php esc_html_e( 'New' ); ?></span></li>
257
+ <li><?php _e('All free version features'); ?></li>
258
+ <li><?php _e('XML file type support'); ?></li>
259
  <li><?php _e('Export and import variable products, subscription products and custom product types'); ?></li>
260
+ <li><?php _e('Export and import custom fields and third-party plugin fields'); ?></li>
 
261
  <li><?php _e('Run scheduled automatic import and export'); ?></li>
262
  <li><?php _e('Import from URL, FTP/SFTP'); ?></li>
263
  <li><?php _e('Export to FTP/SFTP'); ?></li>
283
 
284
  $currentScreen = get_current_screen();
285
 
286
+ if ( 'edit-product' === $currentScreen->id && !is_plugin_active( 'wt-import-export-for-woo/wt-import-export-for-woo.php' ) ) {
287
  echo '<a target="_blank" href="' . admin_url('admin.php?page=wt_import_export_for_woo_basic_export&wt_to_export=product') . '" class="button" style="height:32px;" >' . __('Export to CSV') . ' </a>';
288
  }
289
  }
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: product export, product import, CSV import export, woocommerce, CSV, produ
5
  Requires at least: 3.0.1
6
  Tested up to: 6.0
7
  Requires PHP: 5.6
8
- Stable tag: 2.2.3
9
  License: GPLv3 or later
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
11
 
@@ -34,15 +34,16 @@ With this plugin, you can export and import WooCommerce products to and from a C
34
 
35
  * <strong>Export WooCommerce products into CSV</strong>.
36
  * <strong>Import products from CSV</strong> to WooCommerce.
 
37
  * Supported product types - <strong>simple, grouped, external/affiliate</strong>.
38
  * Export and import WooCommerce <strong>products with images (featured product image and gallery images)</strong>.
39
  * Export and import WooCommerce <strong>product reviews</strong> along with ratings.
40
  * Export and import WooCommerce <strong>products based on category/tags/selected products/status/stock</strong>.
 
41
  * Export and import WooCommerce products with <strong>attributes, taxonomies, price, stock, and more</strong>.
42
- * <strong>Bulk edit products-</strong> Edit thousands of product data all at once.
43
- * Import and export <strong>product categories [New]</strong>.
44
- * Import and export <strong>product tags [New]</strong>.
45
- * Export products based on stock status (In Stock, Out of Stock, On backorder) <strong>[New]</strong>.
46
 
47
 
48
  ##ADDITIONAL FEATURES##
@@ -56,12 +57,11 @@ With this plugin, you can export and import WooCommerce products to and from a C
56
  * <strong>Save frequently used import/export configurations</strong> as templates and use the template for future imports and exports.
57
  * The plugin <strong>stores all the past imports and exports</strong> and <strong>lets you re-run</strong> them when needed.
58
  * <strong>Easy debugging:</strong> View and download import log for debugging purpose.
59
- * Tested OK with WooCommerce 6.7
60
 
61
  ###COMPATIBLE PLUGINS###
62
 
63
  * [Yoast SEO](https://wordpress.org/plugins/wordpress-seo/)
64
- * [All-in-one SEO](https://wordpress.org/plugins/all-in-one-seo-pack/)
65
  * [Cost of Goods](https://woocommerce.com/products/woocommerce-cost-of-goods/)
66
 
67
  ###USE-CASES HANDLED BY PRODUCT IMPORT EXPORT PLUGIN###
@@ -131,10 +131,10 @@ The <a href="https://www.webtoffee.com/product/product-import-export-woocommerce
131
 
132
  = PREMIUM VERSION FEATURES =
133
 
134
- ✅ Export/Import simple, grouped, external, subscription, custom and variation product types.</li>
135
  ✅ Export/Import WooCommerce bookings.</li>
136
- ✅ Export/Import custom fields(meta) and hidden meta.</li>
137
- ✅ Choose from XML/CSV format for import/export.</li>
138
  ✅ <a href="https://www.webtoffee.com/product-import-export-for-woocommerce/#Step_3_Fil_4">Various filter options for exporting products</a>
139
  ✅ <a href="https://www.webtoffee.com/product-import-export-for-woocommerce/#Step_3_Map_10">Map and transform fields during import</a>
140
  ✅ <a href="https://www.webtoffee.com/product-import-export-for-woocommerce/#Evaluate_f_11">Bulk edit/evaluate data during import</a>
@@ -242,6 +242,10 @@ Yes, you can import grouped, affiliate/external products in addition to simple p
242
 
243
  == CHANGELOG ==
244
 
 
 
 
 
245
  = 2.2.3 2022-08-09 =
246
  * Enhancement: Product - total sales count in export/import.
247
  * Bugfix: Delimiter reset when using the re-run option from the History section.
@@ -615,7 +619,7 @@ Yes, you can import grouped, affiliate/external products in addition to simple p
615
 
616
  == Upgrade Notice ==
617
 
618
- = 2.2.3 =
619
- * Enhancement: Product - total sales count in export/import.
620
- * Bugfix: Delimiter reset when using the re-run option from the History section.
621
- * WooCommerce 6.7 Tested OK.
5
  Requires at least: 3.0.1
6
  Tested up to: 6.0
7
  Requires PHP: 5.6
8
+ Stable tag: 2.2.4
9
  License: GPLv3 or later
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
11
 
34
 
35
  * <strong>Export WooCommerce products into CSV</strong>.
36
  * <strong>Import products from CSV</strong> to WooCommerce.
37
+ * Bulk add products
38
  * Supported product types - <strong>simple, grouped, external/affiliate</strong>.
39
  * Export and import WooCommerce <strong>products with images (featured product image and gallery images)</strong>.
40
  * Export and import WooCommerce <strong>product reviews</strong> along with ratings.
41
  * Export and import WooCommerce <strong>products based on category/tags/selected products/status/stock</strong>.
42
+ * Export specific products
43
  * Export and import WooCommerce products with <strong>attributes, taxonomies, price, stock, and more</strong>.
44
+ * <strong>Bulk edit products, categories, price, stock, attributes</strong>
45
+ * Import, export or bulk add <strong>product categories, attributes, and tags.</strong>
46
+ * Export products based on stock status (In Stock, Out of Stock, On backorder).
 
47
 
48
 
49
  ##ADDITIONAL FEATURES##
57
  * <strong>Save frequently used import/export configurations</strong> as templates and use the template for future imports and exports.
58
  * The plugin <strong>stores all the past imports and exports</strong> and <strong>lets you re-run</strong> them when needed.
59
  * <strong>Easy debugging:</strong> View and download import log for debugging purpose.
60
+ * Tested OK with WooCommerce 6.8
61
 
62
  ###COMPATIBLE PLUGINS###
63
 
64
  * [Yoast SEO](https://wordpress.org/plugins/wordpress-seo/)
 
65
  * [Cost of Goods](https://woocommerce.com/products/woocommerce-cost-of-goods/)
66
 
67
  ###USE-CASES HANDLED BY PRODUCT IMPORT EXPORT PLUGIN###
131
 
132
  = PREMIUM VERSION FEATURES =
133
 
134
+ ✅ Export/Import simple, variable, grouped, external, subscription, and custom product types.</li>
135
  ✅ Export/Import WooCommerce bookings.</li>
136
+ ✅ Export/Import custom fields(meta), third-party plugin fields and hidden meta.</li>
137
+ ✅ Choose from XML/CSV/Excel format for import/export.</li>
138
  ✅ <a href="https://www.webtoffee.com/product-import-export-for-woocommerce/#Step_3_Fil_4">Various filter options for exporting products</a>
139
  ✅ <a href="https://www.webtoffee.com/product-import-export-for-woocommerce/#Step_3_Map_10">Map and transform fields during import</a>
140
  ✅ <a href="https://www.webtoffee.com/product-import-export-for-woocommerce/#Evaluate_f_11">Bulk edit/evaluate data during import</a>
242
 
243
  == CHANGELOG ==
244
 
245
+ = 2.2.4 2022-08-26 =
246
+ * Bugfix: Product - Filter data does not work on product tags/categories for non-latin languages
247
+ * Bugfix: Category - Child category import with parent connection
248
+ * WooCommerce 6.8 Tested OK.
249
  = 2.2.3 2022-08-09 =
250
  * Enhancement: Product - total sales count in export/import.
251
  * Bugfix: Delimiter reset when using the re-run option from the History section.
619
 
620
  == Upgrade Notice ==
621
 
622
+ = 2.2.4 =
623
+ * Bugfix: Product - Filter data does not work on product tags/categories for non-latin languages
624
+ * Bugfix: Category - Child category import with parent connection
625
+ * WooCommerce 6.8 Tested OK.