Contacted Whatsapp and this was their reply.
“You need to adjust settings on both WhatsApp and iPhone depending on what you'd like to be displayed in new message notifications.
To turn on previews that display both the contact name and message:
- Go to WhatsApp > Settings > Notifications > turn Show Preview on.
- Go to iPhone Settings > Notifications > WhatsApp > Show Previews > Always (Default)or When Unlocked.
To turn on previews that display the contact name but not message:
- Go to WhatsApp > Settings > Notifications > turn Show Preview on.
- Go to iPhone Settings > Notifications > WhatsApp > Show Previews > Never.
To turn off previews:
- Go to WhatsApp > Settings > Notifications > turn Show Preview off.
- Go to iPhone Settings > Notifications > WhatsApp.
- Turn off Show on Lock Screen, Show in Historyand Show as Banners.
- Tap Show Previews > Never.
Note: In iPhone Settings, Show Previews and the ability to see just the contact name in previews are only available on iOS 11+.”
Hope this helps. :)