Skip to content

Commit

Permalink
Fixed undefined variable for importer default mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
claudiosanches committed Jun 23, 2017
1 parent 1cccb8f commit e1e36ab
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions includes/admin/importers/mappings/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function wc_importer_default_english_mappings( $mappings ) {

$weight_unit = get_option( 'woocommerce_weight_unit' );
$dimension_unit = get_option( 'woocommerce_dimension_unit' );
$default_mappings = array(
$new_mappings = array(
'ID' => 'id',
'Type' => 'type',
'SKU' => 'sku',
Expand Down Expand Up @@ -73,7 +73,7 @@ function wc_importer_default_english_mappings( $mappings ) {
'Button text' => 'button_text',
);

return array_merge( $mappings, $default_mappings );
return array_merge( $mappings, $new_mappings );
}
add_filter( 'woocommerce_csv_product_import_mapping_default_columns', 'wc_importer_default_english_mappings', 100 );

Expand All @@ -89,7 +89,7 @@ function wc_importer_default_special_english_mappings( $mappings ) {
return $mappings;
}

$default_mappings = array(
$new_mappings = array(
'Attribute %d name' => 'attributes:name',
'Attribute %d value(s)' => 'attributes:value',
'Attribute %d visible' => 'attributes:visible',
Expand All @@ -100,6 +100,6 @@ function wc_importer_default_special_english_mappings( $mappings ) {
'Meta: %s' => 'meta:',
);

return array_merge( $mappings, $generic_mappings );
return array_merge( $mappings, $new_mappings );
}
add_filter( 'woocommerce_csv_product_import_mapping_special_columns', 'wc_importer_default_special_english_mappings', 100 );

0 comments on commit e1e36ab

Please sign in to comment.