Product Import Export for WooCommerce - Version 1.4.6

Version Description

  • Tested OK with WC 3.4.4
  • Bug fix:importing date.
  • Bug fix:- JSON_HEX_APOS on ajax post.
Download this release

Release Info

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

Code changes from version 1.4.5 to 1.4.6

images/storefrog.png ADDED
Binary file
includes/exporter/class-wf-prodimpexpcsv-exporter.php CHANGED
@@ -33,7 +33,7 @@ class WF_ProdImpExpCsv_Exporter {
33
@ini_set('zlib.output_compression', 0);
34
@ob_clean();
35
36
-
37
header( 'Content-Type: text/csv; charset=UTF-8' );
38
header( 'Content-Disposition: attachment; filename=woocommerce-product-export.csv' );
39
header( 'Pragma: no-cache' );
33
@ini_set('zlib.output_compression', 0);
34
@ob_clean();
35
36
+
37
header( 'Content-Type: text/csv; charset=UTF-8' );
38
header( 'Content-Disposition: attachment; filename=woocommerce-product-export.csv' );
39
header( 'Pragma: no-cache' );
includes/importer/class-wf-prodimpexpcsv-product-import.php CHANGED
@@ -154,7 +154,7 @@ class WF_ProdImpExpCsv_Product_Import extends WP_Importer {
154
var data = {
155
action: 'woocommerce_csv_import_request',
156
file: '<?php echo addslashes( $file ); ?>',
157
- mapping: '<?php echo json_encode( $_POST['map_from'] ); ?>',
158
eval_field: '<?php echo stripslashes(json_encode(($_POST['eval_field']),JSON_HEX_APOS)) ?>',
159
delimiter: '<?php echo $this->delimiter; ?>',
160
merge_empty_cells: '<?php echo $this->merge_empty_cells; ?>',
@@ -959,23 +959,23 @@ class WF_ProdImpExpCsv_Product_Import extends WP_Importer {
959
960
// Insert product
961
$this->hf_log_data_change( 'csv-import', sprintf( __('> Inserting %s', 'wf_csv_import_export'), esc_html( $processing_product_title ) ), true );
962
-
963
- $postdata = array(
964
'import_id' => $processing_product_id,
965
- 'post_author' => isset($post['post_author']) ? absint( $post['post_author'] ) : get_current_user_id(),
966
- 'post_date' => isset( $post['post_date'] ) ? date( 'Y-m-d H:i:s', strtotime( $post['post_date'] )) : '',
967
- 'post_date_gmt' => isset( $post['post_date_gmt'] ) ? date( 'Y-m-d H:i:s', strtotime( $post['post_date_gmt'] )) : '',
968
- 'post_content' => isset($post['post_content'])?$post['post_content']:"",
969
- 'post_excerpt' => isset($post['post_excerpt'])?$post['post_excerpt']:'',
970
'post_title' => $processing_product_title,
971
- 'post_name' => isset( $post['post_name'] ) ? $post['post_name'] : sanitize_title( $processing_product_title ),
972
- 'post_status' => isset( $post['post_status'] ) ? $post['post_status'] : 'publish',
973
'post_parent' => $post_parent,
974
- 'menu_order' => isset($post['menu_order'])?$post['menu_order']:'',
975
- 'post_type' => isset($post['post_type'])?$post['post_type']:"",
976
- 'post_password' => isset($post['post_password'])?$post['post_password']:'',
977
- 'comment_status' => isset($post['comment_status'])?$post['comment_status']:'',
978
);
979
$post_id = wp_insert_post( $postdata, true );
980
981
if ( is_wp_error( $post_id ) ) {
154
var data = {
155
action: 'woocommerce_csv_import_request',
156
file: '<?php echo addslashes( $file ); ?>',
157
+ mapping: '<?php echo json_encode($_POST['map_from'],JSON_HEX_APOS); ?>',
158
eval_field: '<?php echo stripslashes(json_encode(($_POST['eval_field']),JSON_HEX_APOS)) ?>',
159
delimiter: '<?php echo $this->delimiter; ?>',
160
merge_empty_cells: '<?php echo $this->merge_empty_cells; ?>',
959
960
// Insert product
961
$this->hf_log_data_change( 'csv-import', sprintf( __('> Inserting %s', 'wf_csv_import_export'), esc_html( $processing_product_title ) ), true );
962
+ $postdata = array(
963
'import_id' => $processing_product_id,
964
+ 'post_author' => !empty($post['post_author']) ? absint($post['post_author']) : get_current_user_id(),
965
+ 'post_date' => !empty( $post['post_date'] ) ? date("Y-m-d H:i:s", strtotime($post['post_date'])) : '',
966
+ 'post_date_gmt' => ( !empty($post['post_date_gmt']) && $post['post_date_gmt'] ) ? date('Y-m-d H:i:s', strtotime($post['post_date_gmt'])) : '',
967
+ 'post_content' => !empty($post['post_content'])?$post['post_content']:'',
968
+ 'post_excerpt' => !empty($post['post_excerpt'])?$post['post_excerpt']:'',
969
'post_title' => $processing_product_title,
970
+ 'post_name' => !empty( $post['post_name'] ) ? $post['post_name'] : sanitize_title( $processing_product_title ),
971
+ 'post_status' => !empty( $post['post_status'] ) ? $post['post_status'] : 'publish',
972
'post_parent' => $post_parent,
973
+ 'menu_order' => !empty($post['menu_order'])?$post['menu_order']:'',
974
+ 'post_type' => !empty($post['post_type'])?$post['post_type']:"",
975
+ 'post_password' => !empty($post['post_password'])?$post['post_password']:'',
976
+ 'comment_status' => !empty($post['comment_status'])?$post['comment_status']:'',
977
);
978
+
979
$post_id = wp_insert_post( $postdata, true );
980
981
if ( is_wp_error( $post_id ) ) {
product-csv-import-export.php CHANGED
@@ -5,8 +5,10 @@
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: 1.4.5
9
- WC tested up to: 3.4.3
10
Text Domain: wf_csv_import_export
11
*/
12
@@ -16,7 +18,7 @@ if (!defined('ABSPATH') || !is_admin()) {
16
17
18
if (!defined('WF_PIPE_CURRENT_VERSION')) {
19
- define("WF_PIPE_CURRENT_VERSION", "1.4.5");
20
}
21
if (!defined('WF_PROD_IMP_EXP_ID')) {
22
define("WF_PROD_IMP_EXP_ID", "wf_prod_imp_exp");
@@ -57,6 +59,12 @@ if (in_array('woocommerce/woocommerce.php', apply_filters('active_plugins', get_
57
add_action('admin_footer', array($this, 'deactivate_scripts'));
58
add_action('wp_ajax_pipe_submit_uninstall_reason', array($this, "send_uninstall_reason"));
59
60
include_once( 'includes/class-wf-prodimpexpcsv-system-status-tools.php' );
61
include_once( 'includes/class-wf-prodimpexpcsv-admin-screen.php' );
62
include_once( 'includes/importer/class-wf-prodimpexpcsv-importer.php' );
@@ -381,6 +389,41 @@ if (in_array('woocommerce/woocommerce.php', apply_filters('active_plugins', get_
381
wp_send_json_success();
382
}
383
384
}
385
386
endif;
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: 1.4.6
9
+ WC tested up to: 3.4.4
10
+ License: GPLv3
11
+ License URI: https://www.gnu.org/licenses/gpl-3.0.html
12
Text Domain: wf_csv_import_export
13
*/
14
18
19
20
if (!defined('WF_PIPE_CURRENT_VERSION')) {
21
+ define("WF_PIPE_CURRENT_VERSION", "1.4.6");
22
}
23
if (!defined('WF_PROD_IMP_EXP_ID')) {
24
define("WF_PROD_IMP_EXP_ID", "wf_prod_imp_exp");
59
add_action('admin_footer', array($this, 'deactivate_scripts'));
60
add_action('wp_ajax_pipe_submit_uninstall_reason', array($this, "send_uninstall_reason"));
61
62
+
63
+ if (!get_option('webtoffee_storefrog_admin_notices_dismissed')) {
64
+ add_action('admin_notices', array($this, 'webtoffee_storefrog_admin_notices'));
65
+ add_action('wp_ajax_webtoffee_storefrog_notice_dismiss', array($this, 'webtoffee_storefrog_notice_dismiss'));
66
+ }
67
+
68
include_once( 'includes/class-wf-prodimpexpcsv-system-status-tools.php' );
69
include_once( 'includes/class-wf-prodimpexpcsv-admin-screen.php' );
70
include_once( 'includes/importer/class-wf-prodimpexpcsv-importer.php' );
389
wp_send_json_success();
390
}
391
392
+ function webtoffee_storefrog_admin_notices() {
393
+ if (apply_filters('webtoffee_storefrog_suppress_admin_notices', false)) {
394
+ return;
395
+ }
396
+ $screen = get_current_screen();
397
+ $allowed_screen_ids = array('product_page_wf_woocommerce_csv_im_ex', 'admin');
398
+ if (in_array($screen->id, $allowed_screen_ids)) {
399
+
400
+ $notice = __('<h3>Save Time, Money & Hassle on Your WooCommerce Data Migration?</h3>', 'wf_csv_import_export');
401
+ $notice .= __('<h3>Use StoreFrog Migration Services.</h3>', 'wf_csv_import_export');
402
+
403
+ $content = '<style>.webtoffee-storefrog-nav-tab.updated {display: flex;align-items: center;margin: 18px 20px 10px 0;padding:23px;border-left-color: #2c85d7!important}.webtoffee-storefrog-nav-tab ul {margin: 0;}.webtoffee-storefrog-nav-tab h3 {margin-top: 0;margin-bottom: 9px;font-weight: 500;font-size: 16px;color: #2880d3;}.webtoffee-storefrog-nav-tab h3:last-child {margin-bottom: 0;}.webtoffee-storefrog-banner {flex-basis: 20%;padding: 0 15px;margin-left: auto;} .webtoffee-storefrog-banner a:focus{box-shadow: none;}</style>';
404
+ $content .= '<div class="updated woocommerce-message webtoffee-storefrog-nav-tab notice is-dismissible"><ul>' . $notice . '</ul><div class="webtoffee-storefrog-banner"><a href="http://www.storefrog.com/" target="_blank"> <img src="' . plugins_url(basename(plugin_dir_path(WF_ProdImpExpCsv_FILE))) . '/images/storefrog.png"/></a></div><div style="position: absolute;top: 0;right: 1px;z-index: 10000;" ><button type="button" id="webtoffee-storefrog-notice-dismiss" class="notice-dismiss"><span class="screen-reader-text">Dismiss this notice.</span></button></div></div>';
405
+ echo $content;
406
+
407
+
408
+ wc_enqueue_js("
409
+ jQuery( '#webtoffee-storefrog-notice-dismiss' ).click( function() {
410
+
411
+ jQuery.post( '" . admin_url("admin-ajax.php") . "', { action: 'webtoffee_storefrog_notice_dismiss' } );
412
+ jQuery('.webtoffee-storefrog-nav-tab').fadeOut();
413
+ });
414
+ ");
415
+ }
416
+ }
417
+
418
+ public function webtoffee_storefrog_notice_dismiss() {
419
+
420
+ if (!current_user_can('manage_woocommerce')) {
421
+ wp_die(-1);
422
+ }
423
+ update_option('webtoffee_storefrog_admin_notices_dismissed', 1);
424
+ wp_die();
425
+ }
426
+
427
}
428
429
endif;
readme.txt CHANGED
@@ -1,13 +1,14 @@
1
=== Product Import Export for WooCommerce===
2
Contributors: webtoffee
3
- Donate link:
4
Tags: woocommerce product import, woocommerce import products, woocommerce export products, export woocommerce products, import products into woocommerce
5
Requires at least: 3.0.1
6
- Tested up to: 4.9.7
7
- Stable tag: 1.4.5
8
License: GPLv3 or later
9
License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
11
Easily import products into WooCommerce store or export WooCommerce products from the store. Import WooCommerce Products from any CSV to WooCommerce.
12
13
== Description ==
@@ -16,10 +17,11 @@ Easily import products into WooCommerce store or export WooCommerce products fro
16
17
Are you trying to import products into WooCommerce store or export WooCommerce products from the store. This Product import export plugin allows you to import or export WooCommerce simple products ( other pproduct types such as variable products are available only in premium version). It is super simple!
18
19
- <ul>
20
- <li>Export Simple Products in to a CSV file.</li>
21
- <li>Import Simple Products in CSV format in to WooCommerce Store.</li>
22
- </ul>
23
24
Highlights: WooCommerce Product Export, WooCommerce Product CSV Import Suite, WooCommerce bulk product upload, WooCommerce import products with images, import amazon products to WooCommerce, Export Products to xls. Pro Version supports both Simple and Variable products.
25
@@ -38,18 +40,18 @@ You can create the CSV from scratch or you can export the product to get the for
38
Product Import Export Plugin for WooCommerce is the leading tool for Woocommerce product export and WooCommerce product import. Some of the major features are listed below
39
40
<ul>
41
- <li>Export WooCommerce Products (Simple, Group, External and Variations) in to a CSV file.</li>
42
- <li>Import Products in to WooCommerce (Simple, Group, External and Variations) in CSV format in to WooComemrce Store.</li>
43
- <li>Export WooCommerce Products by Category.</li>
44
- <li>Various Filter options for exporting WooCommerce Products. </li>
45
- <li>Map and Transform fields while Importing WooCommerce Products.</li>
46
- <li>Change values while importing WooCommerce products using Evaluation Fields.</li>
47
- <li>Choice to Update or Skip existing imported products. </li>
48
- <li>WPML Supported. French and German (Deutschland) language support Out of the Box.</li>
49
- <li>Import/Export file from/to a remote server via FTP.</li>
50
- <li>Automatic scheduled Import/Export.</li>
51
- <li>Supports Product Reviews Export Import.</li>
52
- <li>Excellent Support for setting it up!</li>
53
</ul>
54
55
Please visit <a rel="nofollow" href="https://www.xadapter.com/product/product-import-export-plugin-for-woocommerce/">Product Import Export Plugin for WooCommerce</a> for more details
@@ -63,26 +65,27 @@ WooCommerce import products & WooCommerce export products functionalities made e
63
[youtube http://www.youtube.com/watch?v=L-01qI1EZWE&rel=0&showinfo=0]
64
65
66
- = woocommerce export products =
67
There are multiple cases where one need to export WooCommerce products. It could be either for sending the details to someone else or integrating with a third-party system. For example, you can export woocommerce products as csv file in to an ftp folder on a regular basis using the cron job. This can be read by any third-party application to update its data.
68
69
Export WooCommerce Products: Export and download product data in CSV file format. Plugins supports,
70
71
WooCommerce Simple Products
72
WooCommerce Variable Products.
73
- WooCommerce Group Products.
74
WooCommerce External Products.
75
76
In addition, the plugin helps you export Categories, Tags, Products and other Product details into WooCommerce. You can export prices, descriptions, images etc apart from the custom fields (meta), taxonomies and attributes.
77
78
- = How to export woocommerce products =
79
80
It is as simple as clicking a button. But if you need to customize your export we have enough advanced customization options built in to the woocommerce product export plugin.
81
82
= WooCommerce Import Products =
83
WooCommerce bulk product upload is one of the main use case where WooCommerce product import functionality is used. 'How to import products into woocommerce' is one of the common question people ask. Our WooCommerce product csv import suite is the perfect answer for this. With is plugin you can import products from any xml or csv to WooCommerce. This saves lot of time and minimises errors.
84
85
- Woocommerce product import: You can use the import functionality to:
86
87
Import by selecting file from your computer
88
Import by providing file path on the server
@@ -104,7 +107,7 @@ Export Products by Category: You can even choose desired product categories from
104
Export Products by Type: You can selectively export products belonging to specific product types. All you need to do is choose the required product types from the plugin settings page while exporting.
105
Merge Products: This feature is useful for adding more information to existing products, for example when your existing products get modified. To get the modified product details into your online store, you can update the current product by importing modified product CSV file.
106
107
- Map and Transform: You can map the fields ( WooCommerce fields ) with column headings ( CSV file header ). To map, select the required field under Map to Column��? by using drop-down list for a particular column heading. An Evaluation field is used to fix/update the required value for the particular field.
108
109
Cron Job / Scheduled Import Export: WooCommerce Product Import and Export plugin facilitates to schedule the Import and Export of the products. You can auto import the products at regular intervals from CSV which is present on FTP Server by providing starting time and intervals between import. There is an option to skip new products in scheduled import too. You can also auto export the products to FTP in a CSV file at regular intervals. There is also option to use saved mapping files for auto export.
110
@@ -140,6 +143,12 @@ Yes. You can import or export product images along with other details
140
3. Premium Export Settings Screen
141
142
== Changelog ==
143
= 1.4.5 =
144
* Tested OK with WC 3.4.3
145
* Image import process improved.
@@ -230,11 +239,12 @@ Yes. You can import or export product images along with other details
230
* Enhancement: Improved label text for Product type, category , tags and shipping class.
231
* Enhancement: Included links to Documentation and sample CSV.
232
= 1.0.0 =
233
- * Import /Export Woocommerce Products.
234
235
236
== Upgrade Notice ==
237
238
- = 1.4.5 =
239
- * Tested OK with WC 3.4.3
240
- * Image import process improved.
1
=== Product Import Export for WooCommerce===
2
Contributors: webtoffee
3
+ Donate link: https://www.webtoffee.com/plugins/
4
Tags: woocommerce product import, woocommerce import products, woocommerce export products, export woocommerce products, import products into woocommerce
5
Requires at least: 3.0.1
6
+ Tested up to: 4.9.8
7
+ Stable tag: 1.4.6
8
License: GPLv3 or later
9
License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
11
+
12
Easily import products into WooCommerce store or export WooCommerce products from the store. Import WooCommerce Products from any CSV to WooCommerce.
13
14
== Description ==
17
18
Are you trying to import products into WooCommerce store or export WooCommerce products from the store. This Product import export plugin allows you to import or export WooCommerce simple products ( other pproduct types such as variable products are available only in premium version). It is super simple!
19
20
+
21
+ &#128312; Export Simple Products in to a CSV file.
22
+ &#128312; Import Simple Products in CSV format in to WooCommerce Store.
23
+ &#128312; Tested OK with WooCommerce 3.4.4.
24
+
25
26
Highlights: WooCommerce Product Export, WooCommerce Product CSV Import Suite, WooCommerce bulk product upload, WooCommerce import products with images, import amazon products to WooCommerce, Export Products to xls. Pro Version supports both Simple and Variable products.
27
40
Product Import Export Plugin for WooCommerce is the leading tool for Woocommerce product export and WooCommerce product import. Some of the major features are listed below
41
42
<ul>
43
+ <li> &#9989; Export WooCommerce Products (Simple, Group, External and Variations) in to a CSV file.</li>
44
+ <li> &#9989; Import Products in to WooCommerce (Simple, Group, External and Variations) in CSV format in to WooComemrce Store.</li>
45
+ <li> &#9989; Export WooCommerce Products by Category.</li>
46
+ <li> &#9989; Various Filter options for exporting WooCommerce Products. </li>
47
+ <li> &#9989; Map and Transform fields while Importing WooCommerce Products.</li>
48
+ <li> &#9989; Change values while importing WooCommerce products using Evaluation Fields.</li>
49
+ <li> &#9989; Choice to Update or Skip existing imported products. </li>
50
+ <li> &#9989; WPML Supported. French and German (Deutschland) language support Out of the Box.</li>
51
+ <li> &#9989; Import/Export file from/to a remote server via FTP.</li>
52
+ <li> &#9989; Automatic scheduled Import/Export.</li>
53
+ <li> &#9989; Supports Product Reviews Export Import.</li>
54
+ <li> &#9989; Excellent Support for setting it up!</li>
55
</ul>
56
57
Please visit <a rel="nofollow" href="https://www.xadapter.com/product/product-import-export-plugin-for-woocommerce/">Product Import Export Plugin for WooCommerce</a> for more details
65
[youtube http://www.youtube.com/watch?v=L-01qI1EZWE&rel=0&showinfo=0]
66
67
68
+ = WooCommerce export products =
69
There are multiple cases where one need to export WooCommerce products. It could be either for sending the details to someone else or integrating with a third-party system. For example, you can export woocommerce products as csv file in to an ftp folder on a regular basis using the cron job. This can be read by any third-party application to update its data.
70
71
Export WooCommerce Products: Export and download product data in CSV file format. Plugins supports,
72
73
WooCommerce Simple Products
74
WooCommerce Variable Products.
75
+ WooCommerce Grouped Products.
76
WooCommerce External Products.
77
+ WooCommerce Subscription Products.
78
79
In addition, the plugin helps you export Categories, Tags, Products and other Product details into WooCommerce. You can export prices, descriptions, images etc apart from the custom fields (meta), taxonomies and attributes.
80
81
+ = How to export WooCommerce products =
82
83
It is as simple as clicking a button. But if you need to customize your export we have enough advanced customization options built in to the woocommerce product export plugin.
84
85
= WooCommerce Import Products =
86
WooCommerce bulk product upload is one of the main use case where WooCommerce product import functionality is used. 'How to import products into woocommerce' is one of the common question people ask. Our WooCommerce product csv import suite is the perfect answer for this. With is plugin you can import products from any xml or csv to WooCommerce. This saves lot of time and minimises errors.
87
88
+ WooCommerce product import: You can use the import functionality to:
89
90
Import by selecting file from your computer
91
Import by providing file path on the server
107
Export Products by Type: You can selectively export products belonging to specific product types. All you need to do is choose the required product types from the plugin settings page while exporting.
108
Merge Products: This feature is useful for adding more information to existing products, for example when your existing products get modified. To get the modified product details into your online store, you can update the current product by importing modified product CSV file.
109
110
+ Map and Transform: You can map the fields ( WooCommerce fields ) with column headings ( CSV file header ). To map, select the required field under "Map to Column" by using drop-down list for a particular column heading. An Evaluation field is used to fix/update the required value for the particular field.
111
112
Cron Job / Scheduled Import Export: WooCommerce Product Import and Export plugin facilitates to schedule the Import and Export of the products. You can auto import the products at regular intervals from CSV which is present on FTP Server by providing starting time and intervals between import. There is an option to skip new products in scheduled import too. You can also auto export the products to FTP in a CSV file at regular intervals. There is also option to use saved mapping files for auto export.
113
143
3. Premium Export Settings Screen
144
145
== Changelog ==
146
+
147
+ = 1.4.6 =
148
+ * Tested OK with WC 3.4.4
149
+ * Bug fix:importing date.
150
+ * Bug fix:- JSON_HEX_APOS on ajax post.
151
+
152
= 1.4.5 =
153
* Tested OK with WC 3.4.3
154
* Image import process improved.
239
* Enhancement: Improved label text for Product type, category , tags and shipping class.
240
* Enhancement: Included links to Documentation and sample CSV.
241
= 1.0.0 =
242
+ * Import /Export WooCommerce Products.
243
244
245
== Upgrade Notice ==
246
247
+ = 1.4.6 =
248
+ * Tested OK with WC 3.4.4
249
+ * Bug fix:importing date.
250
+ * Bug fix:- JSON_HEX_APOS on ajax post.
styles/wf-style.css CHANGED
@@ -93,10 +93,6 @@
93
margin-top: 4px;
94
}
95
96
- .woocommerce-message a.button-primary, .woocommerce-message button.button-primary{
97
- background: #0085ba none repeat scroll 0 0 !important;
98
- border-color: #0073aa #006799 #006799 !important;}
99
- .woocommerce-message{border-left-color:#46b450 !important;}
100
.rate-star{
101
background: rgba(0, 0, 0, 0) url("../images/stars.png") no-repeat scroll 0 0;
102
display: inline-block;
93
margin-top: 4px;
94
}
95
96
.rate-star{
97
background: rgba(0, 0, 0, 0) url("../images/stars.png") no-repeat scroll 0 0;
98
display: inline-block;