I have two machines: local and deployment.
On my local machine I have the code:
$all_prods = array( 'posts_per_page' => -1, 'post_type' => 'product', ); dump(query_posts($all_prods));
The result I'm getting is my three products, that I've created earlier. But the same code on deployment machine returns an empty array despite of the website has many products in it.
I thought that somehow deployment machine has the other prefix for it's post type, than my local one, but when I type on deployment machine:
$prod = wc_get_product(440); dump($prod);
I get WC_Simple_Product object with field "post_type" equal to "product". How can I debug it?