WC displaying products from category

For custom taxonomies, including Product Categories, you should use the tax_query argument:

$args = array(
    'post_type'      => 'product',
    'posts_per_page' => 12,
    'tax_query'      => array(
        array(
            'taxonomy' => 'product_cat',
            'terms'    => 40,
        ),
    ),
);

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