The PIC can be woken up by the watchdog timer, OR by enabled interrupts. It could be an External Interrupt pin, an I2C word, or a serial word, etc.
Code cannot Wake a processor at all, because it's not executing code; that being the point.
When the period you need to sleep exceeds the max WDT period, you just allow it to Wake, increment a counter, check that nothing needs to be done, and put it to Sleep again. 10 counts of the counter of a 2 min period is 20 min. This is very fast and in general the energy used is inconsequential.
Be aware the WDT period is not exactly precision, varies with lot and temp. It cannot be used as an accurate clock.
There are sometimes issues with Sleep mode. For example, the clock is not immediately stable so it often can't read a serial UART word properly.