The Guthrie Theater in Minneapolis was staging Matthew Lopez’s “The Legend of Georgia McBride” this summer when a national brouhaha erupted that could have affected the production.

The chairman of Papa John’s Pizza was forced to resign after using a racial slur. Yet the hero of the 2015 play, a lighthearted comedy, is a broke Elvis impersonator who turns to drag to support his family when a splurge order of Papa John’s leads to the rent check bouncing.

The theater went to Mr. Lopez with a request: Would he agree to substitute another corporate pizza chain so as not to be distracting? Mr. Lopez readily agreed. Problem solved. (He declined to discuss the decision.)

But for many playwrights, the productions that follow a play’s premiere — when it is handed over to theaters around the country and the world — can be fraught. And more than the purveyor of pepperoni is at stake.