wc_get_product in a none woocommerce page

I am creating a new shortcode in which I want to show some details about a product in a review-like page.

If I got it right – I can only use wc_get_product if the current page is using the WooCommerce plugin. Since it’s a post page it does not includes the WooCommerce plugin and hence I can’t use the wc_get_product.

(Please currect me if I’m wrong – I’m here to learn 😀 )

Is there a way I can get a product details by it’s id on a page?

Thanks!

Read more here:: wc_get_product in a none woocommerce page

Leave a Reply

Your email address will not be published. Required fields are marked *