Radiative cooling is central to a wide range of astrophysical problems. Despite its importance, cooling rates are generally computed using very restrictive assumptions, such as collisional ionization equilibrium and solar relative abundances. We simultaneously relax both assumptions and investigate the effects of photo-ionization of heavy elements by the meta-galactic UV/X-ray background and of variations in relative abundances on the cooling rates of optically thin gas in ionization equilibrium. We find that photo-ionization by the meta-galactic background radiation reduces the net cooling rates by up to an order of magnitude for gas densities and temperatures typical of the shock-heated intergalactic medium and proto-galaxies. In addition, photo-ionization changes the relative contributions of different elements to the cooling rates. We conclude that photo-ionization by the ionizing background and heavy elements both need to be taken into account in order for the cooling rates to be correct to order of magnitude. Moreover, if the rates need to be known to better than a factor of a few, then departures of the relative abundances from solar need to be taken into account. We propose a method to compute cooling rates on an element-by-element basis by interpolating pre-computed tables that take photo-ionization into account. We provide such tables for a popular model of the evolving UV/X-ray background radiation, computed using the photo-ionization package CLOUDY.