Couple tweaks
This commit is contained in:
parent
5a963f74c2
commit
a1580624f1
|
@ -186,7 +186,7 @@ class WC_Product_Importer extends WP_Importer {
|
|||
'data' => array()
|
||||
);
|
||||
|
||||
if ( false !== ( $handle = fopen( $file, "r" ) ) ) {
|
||||
if ( false !== ( $handle = fopen( $file, 'r' ) ) ) {
|
||||
|
||||
$data['raw_headers'] = fgetcsv( $handle, 0, $this->delimiter );
|
||||
|
||||
|
@ -240,6 +240,7 @@ class WC_Product_Importer extends WP_Importer {
|
|||
|
||||
// Columns not mentioned here will get parsed with 'esc_attr'.
|
||||
// column_name => callback
|
||||
// TODO: Use slugs instead of full column name once mapping is completed.
|
||||
$data_formatting = array(
|
||||
'ID' => 'absint',
|
||||
'Published' => array( $this, 'parse_bool_field' ),
|
||||
|
@ -268,7 +269,7 @@ class WC_Product_Importer extends WP_Importer {
|
|||
);
|
||||
$regex_match_data_formatting = array(
|
||||
'/Attribute * Value\(s\)/' => array( $this, 'parse_comma_field' ),
|
||||
'/Attribute * Visible/' => 'boolval',
|
||||
'/Attribute * Visible/' => array( $this, 'parse_bool_field' ),
|
||||
'/Download * URL/' => 'esc_url',
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in New Issue