On a custom Wordpress theme, I'm looking to access the product info of products created using the Woo Commerce plugin. Can global product objects be pulled from anywhere within the php files?

closed as off-topic by Mark Kaplun, Nathan Johnson, Christine Cooper, EAMann Mar 3 at 0:09

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

up vote 2 down vote accepted

Yes you can - see here: https://docs.woocommerce.com/wc-apidocs/class-WC_Product.html

You'd use something like $myproduct = new WC_Product( $product_id );

Hope that helps

Not the answer you're looking for? Browse other questions tagged or ask your own question.