Global $wp_admin_bar always returns null

You need to hook this after admin bar renders for it to work. Also, die() will make WP die.

function test()
{
    global $wp_admin_bar;
    var_dump($wp_admin_bar);
}
add_action('wp_after_admin_bar_render', 'test');

techhipbettruvabetnorabahisbahis forumutaraftarium24edusedueduedueduedueduseduseduedu