If we are appraising a project then we discount at the WACC (which is always calculated after taking into account the tax relief on the debt interest).
As far as the cash flows are concerned, again if we are appraising a project then we always bring in the tax flows as well.
All of this is covered in my free lectures on investment appraisal and on calculating the cost of capital, and I cannot type out all my lectures here 🙂
The lectures are a complete free course for Paper F9 and cover everything needed to be able to pass the exam well.