Writing custom code to create product detail page with wordpress database.
I have displayed product title, desc, price, stock, etc and got stuck up with product attr
$args = array( 'post_type' => 'product','' ); $products = get_posts( $args );
foreach ($products as $product) { $data = get_post_meta($product->ID); $pr['regular_price'] = $data['_regular_price']['0']; $pr['sale_price'] = $data['_sale_price']['0'];