How to find out a node's comment status (open, closed) from node ID?
The following code should do the trick:

$node = node_load($argument); // load the node object based on the nid
if($node-&gt;comment == COMMENT_NODE_CLOSED) {
  // comments are closed - hide the view
}


There are 3 constants that define the different comment states:


COMMENT_NODE_HIDDEN 
COMMENT_NODE_CLOSED
COMMENT_NODE_OPEN


For more information see the Node object reference.