Merge pull request #14902 from woocommerce/fix/14841

Use term name when reordering.
This commit is contained in:
Claudio Sanches 2017-05-05 17:03:21 -03:00 committed by GitHub
commit f434fc7d9a
1 changed files with 2 additions and 1 deletions

View File

@ -588,7 +588,8 @@ class WC_Form_Handler {
foreach ( $item->get_meta_data() as $meta ) {
if ( taxonomy_is_product_attribute( $meta->key ) ) {
$variations[ $meta->key ] = $meta->value;
$term = get_term_by( 'slug', $meta->value, $meta->key );
$variations[ $meta->key ] = $term ? $term->name : $meta->value;
} elseif ( meta_is_product_attribute( $meta->key, $meta->value, $product_id ) ) {
$variations[ $meta->key ] = $meta->value;
}