title: how to get product attributes from wordpress database
body: <p>Writing custom code to create product detail page with wordpress database.</p>
  
  <p>I have displayed product title, desc, price, stock, etc and got stuck up with product attributes.
  In the database, _product_attributes is stored in serialized manner in wp_postmeta table in database. And i couldn't unserailize attributes from it. But i found, each attribute value with it own price has been stored in wp_postmeta in some other post_id. </p>
  
  <p>for example, product with post_id=55 has attribute name 'Size value' having values 14 and 18 and price 300 and 350, is displayed as attributes value and price in post_id=110,111</p>
  
  <p><img src="https://i.stack.imgur.com/HTI8q.png" alt="wp_postmeta">
  <img src="https://i.stack.imgur.com/dLOcc.png" alt="wp-postmeta-example"></p>
  
  <p>is there any formula behind? Any idea to find this product attribute value and corresponding price value?</p>