Wordpress - WordPress Query and Database
What is wrong with this WP_Query usage?
$query = new WP_Query(['post_type' => 'product']);
while ($query->have_posts()) {
the_post();
echo get_the_title();
}
wp_reset_postdata();