In the latest data breach involving consumer data, Whole Foods Market said card-payment information of customers who drank and dined in its taprooms and full-service restaurants has been hacked.

The grocery-store chain, now part of Amazon.com Inc., said its restaurants and taprooms use a separate checkout system and information of its grocery shoppers weren’t affected. Amazon transactions were also not accessed in the breach, Whole Foods said in a statement on its website.

The...