WooCommerce change

You can test to see if the post is a product with is_product() and, if it is, remember that custom taxonomies don’t use has_category() so you have to use has_term( $old_cat, 'product_cat', $post_id ) instead.

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