It was a short way of writing a different spelling of the words all correct. Some foreign-born people wrote all correct as o-l-l k-o-r-r-e-c-t, and used the letters O.K.
VOA: special.2010.02.28
For foreign-born Americans, it supported their right to full citizenship.