Merge pull request #14902 from woocommerce/fix/14841
Use term name when reordering.
This commit is contained in:
commit
f434fc7d9a
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue