WooCommerce function not working correctly after moving from the functions.php into a class

WooCommerce function not working correctly after moving from the functions.php into a class

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