Use term name for tax-based attribute reorder
This commit is contained in:
parent
e005fe0207
commit
afe1a0dd21
|
@ -588,9 +588,12 @@ 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;
|
||||
$test['tax'][] = $meta->key;
|
||||
} elseif ( meta_is_product_attribute( $meta->key, $meta->value, $product_id ) ) {
|
||||
$variations[ $meta->key ] = $meta->value;
|
||||
$test['tax'][] = $meta->key;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue