You can't attach a discount code to an Opportunity itself, but you can offer unique discount codes to the creators participating in one. Codes are set up per creator, so each creator gets their own. To assign a discount code to a creator, follow the steps in [How do I issue a discount code to a creator?]
When the Opportunity ends, codes don't retire automatically and aren't tied to the Opportunity's end date. If you'd like to remove a code, delete it from the creator's talent card. Keep in mind that removing a code fully retires it: it's deleted from ShopMy and from your connected store, so it will stop working at checkout. If you'd like a code to keep working after the Opportunity ends, leave it in place.
