Grocery store chains SuperValu Inc. and New Albertson’s Inc. again dodged class claims over a 2014 data breach that impacted over 1,000 stores, after a federal court said hacked payment card data didn’t inflict enough direct harm to sustain a lawsuit.

Judge Ann D. Montgomery of the U.S. District Court for the District of Minnesota granted the shopping chains’ motion to dismiss March 7. The case was on remand from the U.S. Court of Appeals for the Eighth Circuit.

In general, consumers have struggled to succeed in data breach class actions, and the stumbling block has been an inability to...