WhatsApp is releasing the ability to hide 'online' status for some beta users through the Android 2.22.20.9 update.
The feature can be accessed through the 'Privacy' section under 'Account' settings.
Users will get the option of making their 'online' status visible to everyone or to those contacts who can see the user's 'last seen' status.