From f4a9ff48c15de2ce7111b458ad4740426e038413 Mon Sep 17 00:00:00 2001 From: Mohamed Raouf Date: Thu, 10 Sep 2020 14:37:51 +0200 Subject: [PATCH] Fix REST API positions of the player --- includes/class-sp-player-list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/class-sp-player-list.php b/includes/class-sp-player-list.php index 70b5fee9e..02e2f55d9 100644 --- a/includes/class-sp-player-list.php +++ b/includes/class-sp-player-list.php @@ -670,7 +670,7 @@ public function data( $admin = false, $leagues = null, $seasons = null, $team_id endif; if ( in_array( 'position', $this->columns ) ): - $player_data['position'] = null; + $player_data['position'] = wp_get_post_terms($player_id, 'sp_position'); endif; foreach( $player_data as $key => $value ):