Probably just use the taxonomy call within wordpress action callback function. add_action('init', 'my_callback_func'); function my_callback_func() {
//here you can place your get terms
}
add_action('init', 'my_callback_func');
function my_callback_func() {
//here you can place your get terms
}