To put your foot in it means to say something foolish that could potentially mess something up, which is what the speaker is warning against.
Consider the statement "When you are as ugly as him and romance strikes, the last thing you need is to open your mouth and mess it up by saying something stupid.". Based on this "When you are hideous as him and romance strikes, the last thing you need is to open your mouth and put your foot in it." a true statement? Yes, no, or I don't know?