'Wordpress WooCommerce Query Product Category
What am I doing wrong in the following query? I'm trying to get all post from a specific product category.
$postquery = new WP_Query(array('post_type' => 'product', 'posts_per_page' => '3', 'product_cat' => 415));
If I take out the category id and use the category name it works, but I need it to work with an ID.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
