From 16b0a3e3a1762598663f38b51b50b662a4e14662 Mon Sep 17 00:00:00 2001 From: savvasha Date: Wed, 12 Apr 2023 11:40:03 +0300 Subject: [PATCH] Next team was not working with shortcodes --- modules/sportspress-next-team-preset.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/sportspress-next-team-preset.php b/modules/sportspress-next-team-preset.php index 1915410d..529f70b1 100644 --- a/modules/sportspress-next-team-preset.php +++ b/modules/sportspress-next-team-preset.php @@ -104,7 +104,7 @@ if ( ! class_exists( 'SportsPress_Next_Team_Preset' ) ) : ); if ( get_option( 'sportspress_table_next_team_filter_league', 'no' ) === 'yes' ) { - $leagues = get_the_terms( get_the_ID(), 'sp_league' ); + $leagues = get_the_terms( $post_id, 'sp_league' ); if ( ! isset( $league_ids ) ) { $league_ids = array(); } @@ -113,7 +113,7 @@ if ( ! class_exists( 'SportsPress_Next_Team_Preset' ) ) : $league_ids[] = $league->term_id; endforeach; endif; - $league_ids = sp_add_auto_term( $league_ids, get_the_ID(), 'sp_league' ); + $league_ids = sp_add_auto_term( $league_ids, $post_id, 'sp_league' ); if ( isset( $league_ids ) ) { $args['tax_query'][] = array(