Battery saving - WhatsApp
Go to the Settings app,
Go to Battery,
Tap the ... button in the upper-right corner,
Tap Battery Optimization,
Tap the Not Optimized drop-down and select All Apps.


Disabling battery optimization for a specific app


Locate the app you want to disable battery optimization for.
Tap the app in question.
From the popup, tap Don't optimize.
Tap DONE.


Enabling battery optimization for a specific app


Locate the app you want to enable battery optimization for.
Tap the app in question.
From the popup, tap Optimize.
Tap DONE.


Source: TechRepublic