Problems updating nested ACF field groups

I came here looking for an answer to this same error. For what it is worth, I resolved the issue by wrapping my functionality into a function and adding it to the init action.

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