Mexican forces fought on the side of the allies in WWII.
You are correct!
It was WWI.
While Mexico was close to Germany during WWI, and Germany wanted Mexico to attack and attempt to take the Southwestern US, rhe government of Mexico decided not to carry out the German plan.