/** * Automatically aggregate games from otg_rangers_games and update/insert otg_coach_statistics. */ private static function sync_rangers_season_stats($coach_id, $season) { global $wpdb; if ($coach_id <= 0 || empty($season)) { echo '
Invalid Coach or Season specified for sync.
Successfully synced Rangers stats for season ' . esc_html($season) . '!
Successfully inserted synced Rangers stats for season ' . esc_html($season) . '!