wordpress - WooCommerce get value of attribute -


how can value of specific attribute in woocommerce order?

i tried following code, attribute name. how value of attribute?

$items = $order->get_items(); foreach ( $items $item ) {     $product_id = $item['product_id'];     $product_variation_id = $item['variation_id'];     $variation_data = get_post_meta( $product_variation_id );     foreach ( $variation_data $name => $value ) {         if ( ! $value )         {             continue;         }         if ( taxonomy_exists( esc_attr( str_replace( 'attribute_', '', $name ) ) ) )         {             $attribute = $variation_data[$name][0];             $value_of_attribute = ???;         }                } }    


Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -