Hackers swiped credit-card data from customers at Madison Square Garden, Radio City Music Hall and the Beacon Theater for nearly the past year, the venues’ owner revealed Tuesday.

The stunning data security breach affected patrons who used their plastic to purchase food and merchandise in person at the three entertainment hubs, as well as The Theater at Madison Square Garden and The Chicago Theater, the company said in a statement.

“Not all cards used during this time frame were affected,’’ and, “This incident did not involve cards used on MSG websites, at the venues’ Box Offices, or on Ticketmaster,’’ the Madison Square Garden Company said.

The thieves targeted “data contained in the magnetic stripe on the back of payment cards swiped in person to purchase merchandise and food and beverage items’’ the company said.