Remove WF_DEBUG constant check in hook display function

Checking too late.
Check WF_DEBUG constant earlier for efficiency

Check for WF_DEBUG constant much earlier and don't hook function if not required.