is_admin() returns false in save_post hook with Gutenberg editor

You could try with the following instead to detect if rest

if ( is_admin() || defined( 'REST_REQUEST' ) && REST_REQUEST ) {

}

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