Fix assigment order issues

This commit is contained in:
Almira Krdzic
2018-12-02 22:18:09 +01:00
parent 3dbdb657c9
commit e87d1521dd
23 changed files with 873 additions and 256 deletions

View File

@@ -175,15 +175,17 @@ class Wiaas_Countries {
}
$name = $choices[$code];
$result = wp_insert_term($name, 'product_country');
$result = wp_insert_term($name, 'product_country', array(
'slug' => $code
));
if (is_wp_error($result)) {
continue;
}
update_term_meta($result->term_id, '_wiaas_country_code', $code);
update_term_meta($result->term_id, '_wiaas_country_currency', $info['currency']);
update_term_meta($result->term_id, '_wiaas_country_vat', $info['vat']);
update_term_meta($result['term_id'], '_wiaas_country_code', $code);
update_term_meta($result['term_id'], '_wiaas_country_currency', $info['currency']);
update_term_meta($result['term_id'], '_wiaas_country_vat', $info['vat']);
}
}