Type should be checked by name not slug

This commit is contained in:
Mike Jolley 2016-12-07 18:08:59 +00:00
parent 045ce00390
commit a2263d2760
1 changed files with 1 additions and 1 deletions

View File

@ -370,7 +370,7 @@ class WC_Install {
foreach ( $taxonomies as $taxonomy => $terms ) {
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 );
}
}