A function $f : M \to \mathbb{C}$ satisfying $\partial\bar{\partial}f = 0$ is called *pluriharmonic*. 

In any holomorphic coordinates $(z^1, \dots, z^n)$, a pluriharmonic function satisfies $\partial_{z_i}\partial_{\bar{z}_j}f = 0$ for all $1 \leq i, j \leq n$. In particular, 

$$0 = \sum_{i=1}^n\partial_{z_i}\partial_{\bar{z}_i}f = \sum_{i=1}^n\frac{1}{4}(\partial_{x_i}^2f + \partial^2_{x_{n+i}}f) = \frac{1}{4}\Delta f$$

where $x_i = \operatorname{Re}(z_i)$ and $x_{n+i} = \operatorname{Im}(z_i)$. Therefore, in local holomorphic coordinates, $f$ is harmonic so it satisfies the maximum principle. It follows that such a function must be locally constant if $M$ is compact (i.e. constant on each connected component of $M$).