This commit is contained in:
Mike Jolley 2017-05-23 19:46:46 +01:00
parent b1a5b23629
commit c5d7dfba6c
3 changed files with 13 additions and 13 deletions

View File

@ -5,13 +5,13 @@
* productImportForm handles the import process.
*/
var productImportForm = function( $form ) {
this.$form = $form;
this.xhr = false;
this.mapping = wc_product_import_params.mapping;
this.position = 0;
this.file = wc_product_import_params.file;
this.$form = $form;
this.xhr = false;
this.mapping = wc_product_import_params.mapping;
this.position = 0;
this.file = wc_product_import_params.file;
this.update_existing = wc_product_import_params.update_existing;
this.security = wc_product_import_params.import_nonce;
this.security = wc_product_import_params.import_nonce;
// Number of import successes/failures.
this.imported = 0;
@ -38,12 +38,12 @@
type: 'POST',
url: ajaxurl,
data: {
action : 'woocommerce_do_ajax_product_import',
position : $this.position,
mapping : $this.mapping,
file : $this.file,
action : 'woocommerce_do_ajax_product_import',
position : $this.position,
mapping : $this.mapping,
file : $this.file,
update_existing : $this.update_existing,
security : $this.security
security : $this.security
},
dataType: 'json',
success: function( response ) {

View File

@ -32,7 +32,7 @@ if ( ! defined( 'ABSPATH' ) ) {
<td class="wc-importer-mapping-table-field">
<select name="map_to[<?php echo esc_attr( $name ); ?>]">
<option value=""><?php esc_html_e( 'Do not import', 'woocommerce' ); ?></option>
<option value=""><?php echo '--------------'; ?></option>
<option value="">--------------</option>
<?php foreach ( $this->get_mapping_options( $mapped_value ) as $key => $value ) : ?>
<?php if ( is_array( $value ) ) : ?>
<optgroup label="<?php echo esc_attr( $value['name'] ); ?>">

View File

@ -36,7 +36,7 @@ class WC_Product_CSV_Importer extends WC_Product_Importer {
'lines' => -1, // Max lines to read.
'mapping' => array(), // Column mapping. csv_heading => schema_heading.
'parse' => false, // Whether to sanitize and format data.
'update_existing' => false, // Whether to skip existing items.
'update_existing' => false, // Whether to update existing items.
'delimiter' => ',', // CSV delimiter.
);