How to disable/hide /unset a block programatically? I have a page whose content is visible only in certain provinces. When people visit this page from a different province other than the one it is set for,it should be giving a message saying "the content is not available in the region" by overwriting the node's body in the same page, by using hook_node_view. But I have blocks enabled in the content area on this page. is there a way to disable the contents of the block? i tried hook__block_view and hook__block_view_alter but it did not work. Can someone help me?
You could try hook_block_list_alter to hide a specific block.

Act on blocks prior to rendering.
This hook allows you to add, remove or modify blocks in the block list. The block list contains the block definitions, not the rendered blocks. The blocks are rendered after the modules have had a chance to manipulate the block list.