There are about six or seven explanations for the origin of that slur; the word “Guappo” being the most likely but no one is really sure. Guappo in the neopolitan dialect means thug or bully or bandit. The “G” is very soft sounding to an American ear like a “Y” or a “W”.
Just review passenger ship lists. Every once in a while you’ll come across an Italian or Irish immigrant with the handwritten word “WOP” where it is suppose to be confirmed that they are carrying the proper documents to come to the United States.
In Tagalog, guapo is male beauty (handsome) .. guapa; female beauty