Grab IDs of products from WP_Query which is run elsewhere

The most efficient approach: Just run the query again wherever you need it.

Add this to the $args array: 'fields' => 'ids',

$post_query->posts will only be an array of product ids.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)