I am currently building a Theme for a site that is using
WooCommerce to provide a Shop to Customers. I have just started on it, and I am currently working on the Product Category pages. I have hit a road block trying to fetch the WooCommerce Product object.
I have read that using the variable
global $product should return the WC_Product object, but when I do
NULL is returned.
I tried to then create a Product object by doing
the_post(); $product = new WC_Product(get_the_ID()), but when I did the
var_dump($product) on that, it gave me general information about the product (
post_description, etc), but nothing further than if I called
Can someone tell me what I have missed please?