Updated to sanitize data in parse_data method

This commit is contained in:
Claudio Sanches 2017-05-11 11:49:45 -03:00
parent 9a25f09c7b
commit ed09b4e350
1 changed files with 4 additions and 7 deletions

View File

@ -277,14 +277,13 @@ class WC_Product_Importer extends WP_Importer {
'height' => array( $this, 'parse_float_field' ),
'width' => array( $this, 'parse_float_field' ),
'reviews_allowed' => array( $this, 'parse_bool_field' ),
'purchase_note' => 'wp_kses',
'purchase_note' => 'wp_kses_post',
'price' => 'wc_format_decimal',
'regular_price' => 'wc_format_decimal',
'stock_quantity' => 'absint',
'category_ids' => array( $this, 'parse_categories' ),
'tag_ids' => array( $this, 'parse_comma_field' ),
'image_id' => 'absint',
'gallery_image_ids' => array( $this, 'parse_comma_field' ),
'images' => array( $this, 'parse_comma_field' ),
'upsell_ids' => array( $this, 'parse_comma_field' ),
'cross_sell_ids' => array( $this, 'parse_comma_field' ),
'download_limit' => 'absint',
@ -366,8 +365,7 @@ class WC_Product_Importer extends WP_Importer {
'category_ids',
'tag_ids',
'shipping_class_id',
'image_id',
'gallery_image_ids',
'images',
'downloads',
'download_limit',
'download_expiry',
@ -605,8 +603,7 @@ class WC_Product_Importer extends WP_Importer {
'default_attributes' => __( 'Default attribute', 'woocommerce' ),
),
),
'image_id' => __( 'Featured image', 'woocommerce' ),
'gallery_image_ids' => __( 'Gallery images', 'woocommerce' ),
'images' => __( 'Image', 'woocommerce' ),
'downloads' => __( 'Download Name:URL', 'woocommerce' ),
'download_limit' => __( 'Download Limit', 'woocommerce' ),
'download_expiry' => __( 'Download Expiry Days', 'woocommerce' ),