wc_get_products() not return the images details

The WC_Product object has an image_id (string) and an gallery_image_ids (array) attribute for product image and product’s gallery images. Both of them are attachment ids, so you should get the image src from it’s attachment id with the wp_get_attachment_image_url() method and add it to your $products array.

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