wp_get_current_user() and is_user_logged_in() in child theme’s functions.php file don’t work

It could be due to a hook firing sequence issue. When are you hooking your function?

The safest way to detect your current user is to fire on wp_login action. Someone reported the need to call it late.

The codex recommends to use wp_get_current_user() functon on or after the init hook.