Whole Foods Market said Tuesday it has eliminated packaging with a cancer-linked chemical from its stores.

The Amazon.com-owned grocery store chain declined to comment to CNBC about the cost of this effort, which was first reported by Bloomberg.

The announcement came after advocacy groups Safer Chemicals, Healthy Families and Toxic-Free Future released a study that named Whole Foods as the worst of five grocery chains for packaging takeout food and bakery items in containers with PFAS, or polyfluoroalkyl substances. The groups found high levels of fluorine in five of 17 items tested at Whole Foods, and the presence of this chemical is a sign that they were likely treated with some type of PFAS. The chemical can be used to treat packaging so it doesn't leak.