Let $p$, $ q$ and $r$ be fixed non-negative integers. In this note, it is shown that if $R$ is left (right) $s$-unital ring satisfying $[f(x^py^q) - x^ry, x] = 0$ ($[f(x^py^q) - yx^r, x] = 0$, respectively) where $f(\lambda ) \in {\lambda }^2{\mathbb Z}[\lambda ]$, then $R$ is commutative. Moreover, commutativity of $R$ is also obtained under different sets of constraints on integral exponents. Also, we provide some counterexamples which show that the hypotheses are not altogether superfluous. Thus, many well-known commutativity theorems become corollaries of our results.