In Hartshorne's Algebraic Geometry, in Chapter II.6 on Divisors he computes the Cartier class group (denoted $\operatorname{CaCl}$) of the cuspidal cubic cut out by $y^2z=x^3$ in $\mathbb{P}^2$. He claims that there is a surjective degree homomorphism $\operatorname{CaCl}\rightarrow \mathbb{Z}$, and that there is a one to one correspondence between non-singular closed points of the cuspidal cubic and the kernel of the degree map.
I am confused about his proof of this statement. In particular, he begins with "note that any Cartier divisor is linearly equivalent to one whose local function in some neighborhood of the singular point $Z=(0,0,1)$". How can he do that? Could you do that for any curve and argument that the points in the kernel of the degree map are in one to one correspondence with the all closed points but that one (but the same correspondence would not work). I guess part of my question is where in the proof does he actually use the cuspness?
Any clarification would be appreciated. Thank you.