diff --git a/includes/class-sp-team.php b/includes/class-sp-team.php index 53a3d335..d2aaba9f 100644 --- a/includes/class-sp-team.php +++ b/includes/class-sp-team.php @@ -421,12 +421,9 @@ class SP_Team extends SP_Custom_Post { */ public function tables( $admin = false ) { if ( ! $this->ID ) return null; - - $leagues = get_the_terms( $this->ID, 'sp_league' ); - $league_ids = wp_list_pluck( $leagues, 'term_id' ); - - $seasons = get_the_terms( $this->ID, 'sp_season' ); - $season_ids = wp_list_pluck( $seasons, 'term_id' ); + + $league_ids = sp_get_the_term_ids( $this->ID, 'sp_league' ); + $season_ids = sp_get_the_term_ids( $this->ID, 'sp_season' ); $args = array( 'post_type' => 'sp_table',