Merge pull request #24120 from woocommerce/fix/24110

add filter for product import image separator
This commit is contained in:
Claudio Sanches 2019-07-10 14:30:34 -03:00 committed by GitHub
commit 22726bd74d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -530,9 +530,10 @@ class WC_Product_CSV_Importer extends WC_Product_Importer {
return array();
}
$images = array();
$images = array();
$separator = apply_filters( 'woocommerce_product_import_image_separator', ',' );
foreach ( $this->explode_values( $value ) as $image ) {
foreach ( $this->explode_values( $value, $separator ) as $image ) {
if ( stristr( $image, '://' ) ) {
$images[] = esc_url_raw( $image );
} else {