fix csv import when the taxonomy has empty value
This commit is contained in:
parent
855b83055b
commit
6527b6c942
|
@ -650,9 +650,7 @@ class CSV extends Importer {
|
||||||
foreach ( $exploded_values as $key => $value) {
|
foreach ( $exploded_values as $key => $value) {
|
||||||
$value = trim($value);
|
$value = trim($value);
|
||||||
$exists = term_exists( $value ,$taxonomy->get_db_identifier(), $parent );
|
$exists = term_exists( $value ,$taxonomy->get_db_identifier(), $parent );
|
||||||
if( 0 !== $exists && null !== $exists && isset($exists['term_id']) ){
|
if ((0 !== $exists && null !== $exists && isset($exists['term_id'])) || ($value=='') ) {
|
||||||
//$exists = new Entities\Term($exists['term_id']);
|
|
||||||
//$parent = $exists->get_id();
|
|
||||||
$parent = $value;
|
$parent = $value;
|
||||||
} else {
|
} else {
|
||||||
$term = new Entities\Term();
|
$term = new Entities\Term();
|
||||||
|
|
Loading…
Reference in New Issue