src/lib/Breadcrumbs.php
protected function getFirstTerm(WP_Post $post)
    {
        $taxonomies = $this->getTaxonomies($post->post_type);

        foreach ($taxonomies as $taxonomy) {
            $post_terms = \get_the_terms($post, $taxonomy);

            if (!$post_terms || \is_wp_error($post_terms)) {
                continue;
            }

            return $post_terms[0];
        }
    }
protected function getFirstTerm(WP_Post $post)
    {
        $taxonomies = $this->getTaxonomies($post->post_type);

        foreach ($taxonomies as $taxonomy) {
            $post_terms = \get_the_terms($post, $taxonomy);

            if (!$post_terms || \is_wp_error($post_terms)) {
                continue;
            }

            return $post_terms[0];
        }
    }
Get post's first term