Per The Athletic's David Lombardi, Foster received two years of probation, 232 hours of community service and $235 in fines after pleading no contest.
ESPN's Adam Schefter reported the NFL is still determining whether or not Foster will receive a multi-game suspension for violating the league's personal conduct policy.
Foster was arrested in California in February and charged with suspicion of domestic violence, making criminal threats and possession of an assault weapon.
Last month, a California judge ruled there was insufficient evidence to continue with domestic violence charges against Foster and his possession of an assault weapon charge was reduced to a misdemeanor.
Foster returned to the 49ers the day after the judge's ruling.
After being drafted 31st overall by San Francisco in 2017, Foster recorded 72 total tackles in 10 games as a rookie.