In 2010, Hei-Chi Chan introduced the cubic partition function a(n) in connection with Ramanujan's cubic continued fraction. Chen and Lin, and Ahmed, Baruah and Dastidar proved that a(25n + 22) ≡ 0 (mod 5) for n ⩾ 0. In this paper, we prove several infinite families of congruences modulo 5 and 7 for a(n). Our results generalize the congruence a(25n + 22) ≡ 0 (mod 5) and four congruences modulo 7 for a(n) due to Chen and Lin. Moreover, we present some non-standard congruences modulo 5 for a(n) by using an identity of Newman. For example, we prove that $a((({15\times 17^{3\alpha }+1})/{8})) \equiv 3^{\alpha +1} \ ({\rm mod}\ 5)$ for α ⩾ 0.