A DHCP lease almost certainly has nothing to do with this problem.
I'm not sure what you mean by a "new wifi code," but the likely issue is that your router has assigned a new IP address to the printer but Windows is still attempting to print to the old IP address. The simplest way to fix this is the following:
- Go to Devices and Printers, right-click on the printer's icon, and "Remove device"
- Click the link at the top of the Devices and Printers window to "Add a printer"
- Click "Add a network, wireless, or Bluetooth printer," wait until your wireless printer is detected, and complete the wizard.
If this doesn't work, reply and I'll give you some more detailed instructions for diagnosing the problem.