City cops boycotted Dunkin’ Donuts on Friday to protest the treatment of two NYPD cops who were refused service at one of the chain’s Brooklyn stores by a police-hating worker.

Staffers at several Dunkin’ Donuts stores in Manhattan told The Post they hadn’t seen any members of New York’s Finest, though they’re usually regular customers.

A worker at the Dunkin’ Donuts on West 48th Street and Seventh Avenue said the store typically slings coffee and donuts to about 20 police officers every day.

“[There were] actually none today,” the worker said.

It was a similar situation at a Dunkin’ Donuts on West 40th Street near Seventh Avenue.

“Today I did not see [them],” store worker Setu Mallick said. “There are usually maybe four or five.”

On Sunday, two cops assigned to the 73rd Precinct’s detective squad went into a Dunkin’ Donuts/Baskin-Robbins at 1993 Atlantic Ave. in Bedford-Stuyvesant to buy ice cream — but a store clerk ignored them.

“I don’t serve cops,” he declared, according to law-enforcement sources.

The incident prompted the detectives union to call for an NYPD boycott of the coffee chain — and an apology from the donut shop’s corporate parent.

“Since the story was reported, the union office received a lot of feedback from active and retired members supporting the boycott,” said Michael Palladino, head of the Detectives Endowment Association. “I know that Dunkin Donuts supports law enforcement, which is why I am disappointed that their official statements are weak and suggest denial.”

A Dunkin’ Donuts executive blasted out an e-mail to New York franchise owners on Friday, warning them to avoid talking to the press.

“By now you are probably aware of a news situation concerning two New York City police detective who feel they were denied service by a Dunkin’ Donuts crew member,” Bob Wiggins, a regional vice president at the coffee chain, wrote in the e-mail, which was obtained by The Post.

When asked if any disciplinary action had been taken, Dunkin’ Brands spokeswoman Michelle King said “that is a private matter between the franchisee and his employee.”