Have you given your phone number out of commitment and regret it now?
If you want someone not to write you or see you if you are online… block the number before this person writes you. This trick can come in handy.
There is a direct link that to open an empty chat without saving the number, the Link is as follows:
http://wa.me/country + prefix+phone number (all together), copy and paste this address in the notepad of your phone to take you to the chat of the person you want to block, once in the empty chat without writing, you will get Block or Add, block and READY, that contact will not be able to see your activity on WhatsApp or write messages to you.