Let $\varphi\colon X_1\to X_2$ be dominant proper morphism of finite degree (in particular $\dim X_1=\dim X_2$) between varieties.

Let $D \subset X_2$ be a Cartier divisor.

Is it true that $$\varphi_*([\varphi^*(D)])=(\deg\varphi)[D]?$$ Here $[E]$ is the Weil divisor corresponding to $E$.

Remark: pullback on Cartier divisors is defined for any dominant morphism and pushforward on Weil divisors is defined for any proper morphism. So the formula make sense.

I do not assume varieties to be smooth nor the morphism to be flat. So for example $X_2$ can be singular at $D$.

In [Liu02, Proposition 9.2.11] it is proved for projective morphism between surfaces. In what generality is this statement true?

Q. Liu. Algebraic geometry and arithmetic curves

What do you think about this statement? Is it something standard? Or we need to assume some additional condition?