Answer
It is not restricted to constant-pressure processes.
Work Step by Step
By the definition of differentials:
$dh = (\frac{\partial h}{\partial T})|_P .dT + (\frac{\partial h}{\partial P})|_T .dP$
Which, for an ideal gas, reduces to:
$dh = c_pdT + (v-T(\frac{\partial v}{\partial T})|_P)dV = c_pdT$
Therefore, if the process occurs at varying pressure, the relation is still valid.