Type should be checked by name not slug
This commit is contained in:
parent
045ce00390
commit
a2263d2760
|
@ -370,7 +370,7 @@ class WC_Install {
|
||||||
|
|
||||||
foreach ( $taxonomies as $taxonomy => $terms ) {
|
foreach ( $taxonomies as $taxonomy => $terms ) {
|
||||||
foreach ( $terms as $term ) {
|
foreach ( $terms as $term ) {
|
||||||
if ( ! get_term_by( 'slug', sanitize_title( $term ), $taxonomy ) ) {
|
if ( ! get_term_by( 'name', $term, $taxonomy ) ) {
|
||||||
wp_insert_term( $term, $taxonomy );
|
wp_insert_term( $term, $taxonomy );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue