How to display woocommerce product base on it's Id.Hi,
I have small issue in displaying woocommerce single product base on it's id. i want to show specific products by using it's id. is there any way so i can use it to fetch specific product?
Here is my code.
$my_query = new WP_Query(array( 'post_type' => "product", 'product_id' => 4977 ));
if ( $my_query->have_posts() ):
while ( $my_query->have_posts() ):
Please let me know if i did something wrong.
Oct 28, 2017